L2Skill
public java v1 · immutableIndex: C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Skill.java===================================================================--- C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Skill.java (revision 1680)+++ C:/Documents and Settings/Vivian/workspace/L2_GameServer_c4/java/net/sf/l2j/gameserver/model/L2Skill.java (working copy)@@ -1045,8 +1045,18 @@ boolean skillUserIsL2PcInstance = (activeChar instanceof L2PcInstance); boolean effectOriginIsL2PcInstance = (cha instanceof L2PcInstance);+ boolean skillUserIsL2PetOrSummon = (activeChar instanceof L2PetInstance); boolean objIsL2PcInstance;+ boolean objIsL2PetInstance;+ boolean objIsL2Summon; int radius = getSkillRadius();+ if (skillUserIsL2PetOrSummon == false)+ skillUserIsL2PetOrSummon = (activeChar instanceof L2Summon);+ if (skillUserIsL2PetOrSummon == true)+ activeChar = ((L2Summon)activeChar).getOwner();+ else+ if (skillUserIsL2PetOrSummon == true)+ activeChar = ((L2PetInstance)activeChar).getOwner(); for (L2Object obj : cha.getKnownList().getKnownObjects()) { if (!(obj instanceof L2Character)) continue;@@ -1058,8 +1068,9 @@ continue; objIsL2PcInstance = (obj instanceof L2PcInstance);-- if (skillUserIsL2PcInstance) // Skill attacker is L2PcInstance, hit everything except+ objIsL2PetInstance = (obj instanceof L2PetInstance);+ objIsL2Summon = (obj instanceof L2Summon);+ if ((skillUserIsL2PcInstance) || (skillUserIsL2PetOrSummon)) // Skill attacker is L2PcInstance or Pet, Summon, hit everything except { if ( ( // (@@ -1073,11 +1084,75 @@ (((L2PcInstance)activeChar).getParty() != null && ((L2PcInstance)obj).getParty() != null) && ((L2PcInstance)activeChar).getParty().getPartyLeaderOID() == ((L2PcInstance)obj).getParty().getPartyLeaderOID() ) || // or not pvp with - !((L2PcInstance)activeChar).checkPvpSkill(obj, this)+ (+ !((L2PcInstance)activeChar).checkPvpSkill(obj, this)+ ) || // or not in pvp zone+ (+ !((L2PcInstance)obj).getInPvpZone() + ) || // or not Karma <= 0+ (+ ((L2PcInstance)obj).getKarma() <= 0+ ) ) // ) ) ) continue;+ if (+ ( // (+ objIsL2PetInstance && // obj is L2PcInstance and+ ( // (+ ( // In same clan+ (((L2PcInstance)activeChar).getClan() != null && ((L2PetInstance)obj).getOwner().getClan() != null) &&+ ((L2PcInstance)activeChar).getClan().getClanId() == ((L2PetInstance)obj).getOwner().getClan().getClanId()+ ) || // or in same party+ (+ (((L2PcInstance)activeChar).getParty() != null && ((L2PetInstance)obj).getOwner().getParty() != null) &&+ ((L2PcInstance)activeChar).getParty().getPartyLeaderOID() == ((L2PetInstance)obj).getOwner().getParty().getPartyLeaderOID()+ ) || // or not pvp with + (+ !((L2PcInstance)activeChar).checkPvpSkill(obj, this)+ ) || // or not in pvp zone+ (+ !((L2PetInstance)obj).getOwner().getInPvpZone() + ) || // or not Karma <= 0+ (+ ((L2PetInstance)obj).getOwner().getKarma() <= 0+ ) ||+ (+ ((L2PetInstance)obj).getOwner() == (L2PcInstance)activeChar+ )+ ) // )+ )+ )+ continue;+ if (+ ( // (+ objIsL2Summon && // obj is L2PcInstance and+ ( // (+ ( // In same clan+ (((L2PcInstance)activeChar).getClan() != null && ((L2Summon)obj).getOwner().getClan() != null) &&+ ((L2PcInstance)activeChar).getClan().getClanId() == ((L2Summon)obj).getOwner().getClan().getClanId()+ ) || // or in same party+ (+ (((L2PcInstance)activeChar).getParty() != null && ((L2Summon)obj).getOwner().getParty() != null) &&+ ((L2PcInstance)activeChar).getParty().getPartyLeaderOID() == ((L2Summon)obj).getOwner().getParty().getPartyLeaderOID()+ ) || // or not pvp with + (+ !((L2PcInstance)activeChar).checkPvpSkill(obj, this)+ ) || // or not in pvp zone+ (+ !((L2Summon)obj).getOwner().getInPvpZone() + ) || // or not Karma <= 0+ (+ ((L2Summon)obj).getOwner().getKarma() <= 0+ ) ||+ (+ ((L2Summon)obj).getOwner() == (L2PcInstance)activeChar+ )+ ) // )+ )+ )+ continue; } else // Skill user is not L2PcInstance {@@ -1085,7 +1160,6 @@ !objIsL2PcInstance) // Object is not L2PcInstance continue; }- targetList.add((L2Character)obj); // Add obj to target lists } }@@ -1284,6 +1358,141 @@ activeChar.sendPacket(new SystemMessage(SystemMessage.TARGET_IS_INCORRECT)); return null; }+ case TARGET_AREA_CORPSE_MOB:+ {+ if (!(target instanceof L2Attackable) || !target.isDead())+ {+ activeChar.sendPacket(new SystemMessage(SystemMessage.TARGET_IS_INCORRECT));+ return null;+ }+ L2Character cha;+ if (this.getCastRange() >= 0)+ {+ cha = target;+ targetList.add((L2Character)cha); // Add target to target list+ }+ else+ cha = activeChar;++ boolean skillUserIsL2PcInstance = (activeChar instanceof L2PcInstance);+ boolean effectOriginIsL2PcInstance = (cha instanceof L2PcInstance);+ boolean objIsL2PcInstance;+ boolean objIsL2PetInstance;+ boolean objIsL2Summon;+ int radius = getSkillRadius();+ for (L2Object obj : cha.getKnownList().getKnownObjects())+ {+ if (!(obj instanceof L2Character)) continue;++ target = (L2Character) obj;+ if(!target.isAlikeDead() && target != activeChar) // If target is not dead/fake death and not self+ {+ if (!Util.checkIfInRange(radius, cha, obj, true)) // Go to next obj if obj isn't in range+ continue;+ + objIsL2PcInstance = (obj instanceof L2PcInstance);+ objIsL2PetInstance = (obj instanceof L2PetInstance);+ objIsL2Summon = (obj instanceof L2Summon);++ if (skillUserIsL2PcInstance) // Skill attacker is L2PcInstance, hit everything except+ {+ if (+ ( // (+ objIsL2PcInstance && // obj is L2PcInstance and+ ( // (+ ( // In same clan+ (((L2PcInstance)activeChar).getClan() != null && ((L2PcInstance)obj).getClan() != null) &&+ ((L2PcInstance)activeChar).getClan().getClanId() == ((L2PcInstance)obj).getClan().getClanId()+ ) || // or in same party+ (+ (((L2PcInstance)activeChar).getParty() != null && ((L2PcInstance)obj).getParty() != null) &&+ ((L2PcInstance)activeChar).getParty().getPartyLeaderOID() == ((L2PcInstance)obj).getParty().getPartyLeaderOID()+ ) || // or not pvp with + (+ !((L2PcInstance)activeChar).checkPvpSkill(obj, this)+ ) || // or not in pvp zone+ (+ !((L2PcInstance)obj).getInPvpZone() + ) || // or not Karma <= 0+ (+ ((L2PcInstance)obj).getKarma() <= 0+ )+ ) // )+ )+ )+ continue;+ if (+ ( // (+ objIsL2PetInstance && // obj is L2PcInstance and+ ( // (+ ( // In same clan+ (((L2PcInstance)activeChar).getClan() != null && ((L2PetInstance)obj).getOwner().getClan() != null) &&+ ((L2PcInstance)activeChar).getClan().getClanId() == ((L2PetInstance)obj).getOwner().getClan().getClanId()+ ) || // or in same party+ (+ (((L2PcInstance)activeChar).getParty() != null && ((L2PetInstance)obj).getOwner().getParty() != null) &&+ ((L2PcInstance)activeChar).getParty().getPartyLeaderOID() == ((L2PetInstance)obj).getOwner().getParty().getPartyLeaderOID()+ ) || // or not pvp with + (+ !((L2PcInstance)activeChar).checkPvpSkill(obj, this)+ ) || // or not in pvp zone+ (+ !((L2PetInstance)obj).getOwner().getInPvpZone() + ) || // or not Karma <= 0+ (+ ((L2PetInstance)obj).getOwner().getKarma() <= 0+ ) ||+ (+ ((L2PetInstance)obj).getOwner() == (L2PcInstance)activeChar+ )+ ) // )+ )+ )+ continue;+ if (+ ( // (+ objIsL2Summon && // obj is L2PcInstance and+ ( // (+ ( // In same clan+ (((L2PcInstance)activeChar).getClan() != null && ((L2Summon)obj).getOwner().getClan() != null) &&+ ((L2PcInstance)activeChar).getClan().getClanId() == ((L2Summon)obj).getOwner().getClan().getClanId()+ ) || // or in same party+ (+ (((L2PcInstance)activeChar).getParty() != null && ((L2Summon)obj).getOwner().getParty() != null) &&+ ((L2PcInstance)activeChar).getParty().getPartyLeaderOID() == ((L2Summon)obj).getOwner().getParty().getPartyLeaderOID()+ ) || // or not pvp with + (+ !((L2PcInstance)activeChar).checkPvpSkill(obj, this)+ ) || // or not in pvp zone+ (+ !((L2Summon)obj).getOwner().getInPvpZone() + ) || // or not Karma <= 0+ (+ ((L2Summon)obj).getOwner().getKarma() <= 0+ ) ||+ (+ ((L2Summon)obj).getOwner() == (L2PcInstance)activeChar+ )+ ) // )+ )+ )+ continue;+ }+ else // Skill user is not L2PcInstance+ {+ if (effectOriginIsL2PcInstance && // If effect starts at L2PcInstance and+ !objIsL2PcInstance) // Object is not L2PcInstance+ continue;+ }++ targetList.add((L2Character)obj); // Add obj to target lists+ }+ }+ + if (targetList.size() == 0)+ return null;+ return targetList.toArray(new L2Character[targetList.size()]);+ } case TARGET_CORPSE_MOB: { if(!(target instanceof L2Attackable) || !target.isDead())