Fix the nofaction wilderness invuln bug.

This commit is contained in:
Olof Larsson 2011-11-06 09:20:03 +01:00
parent da15de2b52
commit c43d34af79

View File

@ -207,7 +207,7 @@ public class FactionsEntityListener extends EntityListener
// You can not hurt neutrals in their own territory.
boolean ownTerritory = defender.isInOwnTerritory();
if (ownTerritory && relation == Rel.NEUTRAL)
if (defender.hasFaction() && ownTerritory && relation == Rel.NEUTRAL)
{
attacker.msg("<i>You can't hurt %s<i> in their own territory unless you declare them as an enemy.", defender.describeTo(attacker));
defender.msg("%s<i> tried to hurt you.", attacker.describeTo(defender, true));