All pastes #425233 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-05 11:04 UTC
rendered paste body
 public void updatePvPStatus(L2Character target)
    {
        if (checkIfPvP(target) && (!ZoneManager.getInstance().checkIfInZonePvP(this) || // Player is not inside pvp zone or
            !ZoneManager.getInstance().checkIfInZonePvP(target)) // Target player is not inside pvp zone
             && 
             (
             (target instanceof L2PcInstance && !(((L2PcInstance) target).getKarma() > 0)) // Target is a player and target doesn't have Karma (Attacking a PK doesn't flag you.)
             || 
             (target instanceof L2Summon && !(((L2Summon)target).getOwner().getKarma()  > 0)) // Target is a Summon and Owner of the summon doesn't have karma
             ) || (((target.getRace() == Race.human || target.getRace() == Race.elf) && (this.getRace() == Race.elf || this.getRace() == Race.human)) || ((target.getRace() == Race.darkelf || target.getRace() == Race.orc || target.getRace() == Race.dwarf) && (this.getRace() == Race.darkelf || this.getRace() == Race.orc || this.getRace() == Race.dwarf))))
             updatePvPStatus();
    }