Faction guards.

This commit is contained in:
mobius
2015-01-14 23:56:04 +00:00
parent 6c78bb3be3
commit 227f42cf73
8 changed files with 85 additions and 16 deletions

View File

@@ -209,6 +209,10 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
// Check if the actor is a L2GuardInstance
if (me instanceof L2GuardInstance)
{
if (Config.FACTION_SYSTEM_ENABLED && Config.FACTION_GUARDS_ENABLED && (player != null) && ((player.isGood() && me.getTemplate().isClan(Config.FACTION_EVIL_TEAM_NAME)) || (player.isEvil() && me.getTemplate().isClan(Config.FACTION_GOOD_TEAM_NAME))))
{
return GeoData.getInstance().canSeeTarget(me, player);
}
// Check if the L2PcInstance target has karma (=PK)
if ((player != null) && (player.getKarma() > 0))
{