All pastes #24091 Raw Edit

Miscellany

public text v1 · immutable
#24091 ·published 2005-09-28 06:28 UTC
rendered paste body
L2ControlTowerInstance.java
	public L2ControlTowerInstance(int castleId, int objectId, L2NpcTemplate template)
	{
		super(objectId, template);
		_CastleId = castleId;
	}

	public boolean isAutoAttackable(L2Character attacker) 
	{
        if (attacker != null && attacker instanceof L2PcInstance)
            return L2Castle.getCastles()[L2Castle.findCastleIndex(_CastleId)].getSiege().checkIsAttacker(((L2PcInstance)attacker).getClanId());

        return false;
	}

L2SiegeGuardInstance.java
    public L2SiegeGuardInstance(int castleId, int objectId, L2NpcTemplate template)
    {
        super(objectId, template);
		_CastleId = castleId;
    }

    public boolean isAutoAttackable(L2Character attacker) 
	{
        if (attacker != null && attacker instanceof L2PcInstance)
            return L2Castle.getCastles()[L2Castle.findCastleIndex(_CastleId)].getSiege().checkIsAttacker(((L2PcInstance)attacker).getClanId());
		
        return false;
    }