Unhardcoded faction guards, fixed aggro and various improvements.
This commit is contained in:
@@ -57,6 +57,14 @@ public class L2GuardInstance extends L2Attackable
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_GUARDS_ENABLED && attacker.isPlayable())
|
||||
{
|
||||
L2PcInstance player = attacker.getActingPlayer();
|
||||
if ((player.isGood() && getTemplate().isClan(Config.FACTION_EVIL_TEAM_NAME)) || (player.isEvil() && getTemplate().isClan(Config.FACTION_GOOD_TEAM_NAME)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return super.isAutoAttackable(attacker);
|
||||
}
|
||||
|
||||
|
@@ -8364,6 +8364,10 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
if (attacker instanceof L2GuardInstance)
|
||||
{
|
||||
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_GUARDS_ENABLED && ((_isGood && ((L2Npc) attacker).getTemplate().isClan(Config.FACTION_EVIL_TEAM_NAME)) || (_isEvil && ((L2Npc) attacker).getTemplate().isClan(Config.FACTION_GOOD_TEAM_NAME))))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return (getReputation() < 0); // Guards attack only PK players.
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user