I am trying to implement a very simple Faction system. This is separate from the existing factions. Essentially, each faction has eight towns. It is currently possible to join the a town and to join the militia of that town. Each of these is based on a variable I added to PlayerMobile. I am trying to edit Notoriety such that members of opposing towns that are also militiia members are considered as enemies.
I added the following code to the Mobile Notoriety method in Notoriety, and it compiles, but I am not sure if it accomplish what I want, and whether or not I need to add additional checks elsewhere. Any help would be greatly appreciated.
I should note that the methods for checking town and militia are already set up in PlayerMobile.
I added the following code to the Mobile Notoriety method in Notoriety, and it compiles, but I am not sure if it accomplish what I want, and whether or not I need to add additional checks elsewhere. Any help would be greatly appreciated.
Code:
#region Militia Notoriety
if( source is PlayerMobile && target is PlayerMobile )
{
PlayerMobile pmAtckr = (PlayerMobile)source;
PlayerMobile pmAtckd = (PlayerMobile)target;
if ( pmAtckr.IsGoodTownMember(pmAtckr) && pmAtckr.IsMilitia && pmAtckd.IsEvilTownMember(pmAtckd) && pmAtckd.IsMilitia )
return Notoriety.Enemy;
#endregion
}
Post automatically merged:
I should note that the methods for checking town and militia are already set up in PlayerMobile.
Last edited: