Permalink
Browse files

Merge pull request #51 from qbradq/faction_fix

Allow opposing factions to fight when harmful map restrictions are in effect
  • Loading branch information...
Ravenwolfe committed Jan 21, 2016
2 parents 4d4eabc + 16cf29c commit f8c33a7b0c58b7e4c45c0a1fc36df4fb79af2d80
Showing with 12 additions and 2 deletions.
  1. +12 −2 Scripts/Misc/Notoriety.cs
@@ -168,6 +168,18 @@ public static bool Mobile_AllowHarmful(Mobile from, Mobile target)
if (from == null || target == null || from.IsStaff() || target.IsStaff())
return true;

Map map = from.Map;

#region Factions
Faction targetFaction = Faction.Find(target, true);

if ((!Core.ML || map == Faction.Facet) && targetFaction != null)
{
if (Faction.Find(from, true) != targetFaction)
return true; // In factions, anything goes
}
#endregion

#region Mondain's Legacy
if (target is Gregorio)
{
@@ -228,8 +240,6 @@ public static bool Mobile_AllowHarmful(Mobile from, Mobile target)
return false;
#endregion

Map map = from.Map;

if (map != null && (map.Rules & MapRules.HarmfulRestrictions) == 0)
return true; // In felucca, anything goes

0 comments on commit f8c33a7

Please sign in to comment.