L2JMobius

C6 Mass Resurrecction

zebb · 4 · 5945

Offline zebb

  • Heir
  • **
    • Posts: 17
Without many words I show you a video of the skill's behavior.



Offline G-hamsteR

  • Viscount
  • *****
    • Posts: 326
Try this. This should also fix an issue for clan-targeting skills:

Code: [Select]
diff --git java/org/l2jmobius/gameserver/model/Skill.java java/org/l2jmobius/gameserver/model/Skill.java
index 6c3d9a8..d9994a1 100644
--- java/org/l2jmobius/gameserver/model/Skill.java
+++ java/org/l2jmobius/gameserver/model/Skill.java
@@ -2123,7 +2123,7 @@
  {
  continue;
  }
- if (newPlayer.isDead())
+ if (newPlayer.isDead() && (_targetType != SkillTargetType.TARGET_CORPSE_ALLY))
  {
  continue;
  }
@@ -2212,6 +2212,10 @@
  }
  }
  }
+ else if (newTarget.isDead())
+ {
+ continue;
+ }
  if (!Util.checkIfInRange(radius, creature, newTarget, true))
  {
  continue;


In case the patch doesn't work (since I have changed a lot of lines on my version), here is the full code:

Code: [Select]
case TARGET_CORPSE_ALLY:
case TARGET_ALLY:
{
if (creature instanceof PlayerInstance)
{
final int radius = _skillRadius;
final PlayerInstance player = (PlayerInstance) creature;
final Clan clan = player.getClan();
if (_targetType != SkillTargetType.TARGET_CORPSE_ALLY) // if corpose, the caster is not included
{
if (player.isInOlympiadMode())
{
targetList.add(player);
return targetList;
}

targetList.add(player);
if (onlyFirst)
{
return targetList;
}
}
if (clan != null)
{
// Get all visible objects in a spheric area near the Creature
for (WorldObject newTarget : player.getKnownList().getKnownCharactersInRadius(radius))
{
final PlayerInstance newPlayer = newTarget.getActingPlayer();
if (newPlayer == null)
{
continue;
}
if (newPlayer.isDead() && (_targetType != SkillTargetType.TARGET_CORPSE_ALLY))
{
continue;
}
if (player.isInDuel() && (player.getDuelId() != newPlayer.getDuelId()))
{
continue;
}
if (((player.getAllyId() == 0) && (newPlayer.getClanId() != player.getClanId())) || (player.getAllyId() != newPlayer.getAllyId()))
{
continue;
}
targetList.add(newPlayer);
if (onlyFirst)
{
return targetList;
}

}
return targetList;
}
}
return targetList;
}
case TARGET_CORPSE_CLAN:
case TARGET_CLAN:
{
if (creature instanceof PlayerInstance)
{
final int radius = _skillRadius;
final PlayerInstance player = (PlayerInstance) creature;
final Clan clan = player.getClan();
if (_targetType != SkillTargetType.TARGET_CORPSE_CLAN)
{
if (player.isInOlympiadMode())
{
targetList.add(player);
return targetList;
}
targetList.add(player);
if (onlyFirst)
{
return targetList;
}
}
if (clan != null)
{
// Get all visible objects in a spheric area near the Creature
// Get Clan Members
for (ClanMember member : clan.getMembers())
{
final PlayerInstance newTarget = member.getPlayerInstance();
if ((newTarget == null) || (newTarget == player))
{
continue;
}
if (player.isInDuel() && ((player.getDuelId() != newTarget.getDuelId()) || ((player.getParty() == null) && (player.getParty() != newTarget.getParty()))))
{
continue;
}
final PlayerInstance trg = newTarget;
final PlayerInstance src = player;
// if src is in event and trg not OR viceversa:
// to be fixed for mixed events status (in TvT joining phase, someone can attack a partecipating CTF player with area attack)
if (((src._inEvent || src._inEventCTF || src._inEventDM || src._inEventTvT || src._inEventVIP) && (!trg._inEvent && !trg._inEventCTF && !trg._inEventDM && !trg._inEventTvT && !trg._inEventVIP)) || ((trg._inEvent || trg._inEventCTF || trg._inEventDM || trg._inEventTvT || trg._inEventVIP) && (!src._inEvent && !src._inEventCTF && !src._inEventDM && !src._inEventTvT && !src._inEventVIP)))
{
continue;
}
final Summon pet = newTarget.getPet();
if ((pet != null) && Util.checkIfInRange(radius, creature, pet, true) && !onlyFirst && (((_targetType == SkillTargetType.TARGET_CORPSE_CLAN) && pet.isDead()) || ((_targetType == SkillTargetType.TARGET_CLAN) && !pet.isDead())) && player.checkPvpSkill(newTarget, this))
{
targetList.add(pet);
}
if (_targetType == SkillTargetType.TARGET_CORPSE_CLAN)
{
if (!newTarget.isDead())
{
continue;
}
if (_skillType == SkillType.RESURRECT)
{
// check target is not in a active siege zone
final Siege siege = SiegeManager.getInstance().getSiege(newTarget);
if ((siege != null) && siege.isInProgress())
{
continue;
}
}
}
else if (newTarget.isDead())
{
continue;
}
if (!Util.checkIfInRange(radius, creature, newTarget, true))
{
continue;
}
// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
if (!player.checkPvpSkill(newTarget, this))
{
continue;
}
targetList.add(newTarget);
if (onlyFirst)
{
return targetList;
}
}
}
}
else if (creature instanceof NpcInstance)
{
// for buff purposes, returns friendly mobs nearby and mob itself
final NpcInstance npc = (NpcInstance) creature;
if ((npc.getFactionId() == null) || npc.getFactionId().isEmpty())
{
targetList.add(creature);
return targetList;
}
targetList.add(creature);
final Collection<WorldObject> objs = creature.getKnownList().getKnownObjects().values();
// synchronized (activeChar.getKnownList().getKnownObjects())
{
for (WorldObject newTarget : objs)
{
if ((newTarget instanceof NpcInstance) && npc.getFactionId().equals(((NpcInstance) newTarget).getFactionId()))
{
if (!Util.checkIfInRange(_castRange, creature, newTarget, true))
{
continue;
}
targetList.add((NpcInstance) newTarget);
}
}
}
}
return targetList;
}


Offline zebb

  • Heir
  • **
    • Posts: 17
Try this. This should also fix an issue for clan-targeting skills:

Code: [Select]
diff --git java/org/l2jmobius/gameserver/model/Skill.java java/org/l2jmobius/gameserver/model/Skill.java
index 6c3d9a8..d9994a1 100644
--- java/org/l2jmobius/gameserver/model/Skill.java
+++ java/org/l2jmobius/gameserver/model/Skill.java
@@ -2123,7 +2123,7 @@
  {
  continue;
  }
- if (newPlayer.isDead())
+ if (newPlayer.isDead() && (_targetType != SkillTargetType.TARGET_CORPSE_ALLY))
  {
  continue;
  }
@@ -2212,6 +2212,10 @@
  }
  }
  }
+ else if (newTarget.isDead())
+ {
+ continue;
+ }
  if (!Util.checkIfInRange(radius, creature, newTarget, true))
  {
  continue;


In case the patch doesn't work (since I have changed a lot of lines on my version), here is the full code:

Code: [Select]
case TARGET_CORPSE_ALLY:
case TARGET_ALLY:
{
if (creature instanceof PlayerInstance)
{
final int radius = _skillRadius;
final PlayerInstance player = (PlayerInstance) creature;
final Clan clan = player.getClan();
if (_targetType != SkillTargetType.TARGET_CORPSE_ALLY) // if corpose, the caster is not included
{
if (player.isInOlympiadMode())
{
targetList.add(player);
return targetList;
}

targetList.add(player);
if (onlyFirst)
{
return targetList;
}
}
if (clan != null)
{
// Get all visible objects in a spheric area near the Creature
for (WorldObject newTarget : player.getKnownList().getKnownCharactersInRadius(radius))
{
final PlayerInstance newPlayer = newTarget.getActingPlayer();
if (newPlayer == null)
{
continue;
}
if (newPlayer.isDead() && (_targetType != SkillTargetType.TARGET_CORPSE_ALLY))
{
continue;
}
if (player.isInDuel() && (player.getDuelId() != newPlayer.getDuelId()))
{
continue;
}
if (((player.getAllyId() == 0) && (newPlayer.getClanId() != player.getClanId())) || (player.getAllyId() != newPlayer.getAllyId()))
{
continue;
}
targetList.add(newPlayer);
if (onlyFirst)
{
return targetList;
}

}
return targetList;
}
}
return targetList;
}
case TARGET_CORPSE_CLAN:
case TARGET_CLAN:
{
if (creature instanceof PlayerInstance)
{
final int radius = _skillRadius;
final PlayerInstance player = (PlayerInstance) creature;
final Clan clan = player.getClan();
if (_targetType != SkillTargetType.TARGET_CORPSE_CLAN)
{
if (player.isInOlympiadMode())
{
targetList.add(player);
return targetList;
}
targetList.add(player);
if (onlyFirst)
{
return targetList;
}
}
if (clan != null)
{
// Get all visible objects in a spheric area near the Creature
// Get Clan Members
for (ClanMember member : clan.getMembers())
{
final PlayerInstance newTarget = member.getPlayerInstance();
if ((newTarget == null) || (newTarget == player))
{
continue;
}
if (player.isInDuel() && ((player.getDuelId() != newTarget.getDuelId()) || ((player.getParty() == null) && (player.getParty() != newTarget.getParty()))))
{
continue;
}
final PlayerInstance trg = newTarget;
final PlayerInstance src = player;
// if src is in event and trg not OR viceversa:
// to be fixed for mixed events status (in TvT joining phase, someone can attack a partecipating CTF player with area attack)
if (((src._inEvent || src._inEventCTF || src._inEventDM || src._inEventTvT || src._inEventVIP) && (!trg._inEvent && !trg._inEventCTF && !trg._inEventDM && !trg._inEventTvT && !trg._inEventVIP)) || ((trg._inEvent || trg._inEventCTF || trg._inEventDM || trg._inEventTvT || trg._inEventVIP) && (!src._inEvent && !src._inEventCTF && !src._inEventDM && !src._inEventTvT && !src._inEventVIP)))
{
continue;
}
final Summon pet = newTarget.getPet();
if ((pet != null) && Util.checkIfInRange(radius, creature, pet, true) && !onlyFirst && (((_targetType == SkillTargetType.TARGET_CORPSE_CLAN) && pet.isDead()) || ((_targetType == SkillTargetType.TARGET_CLAN) && !pet.isDead())) && player.checkPvpSkill(newTarget, this))
{
targetList.add(pet);
}
if (_targetType == SkillTargetType.TARGET_CORPSE_CLAN)
{
if (!newTarget.isDead())
{
continue;
}
if (_skillType == SkillType.RESURRECT)
{
// check target is not in a active siege zone
final Siege siege = SiegeManager.getInstance().getSiege(newTarget);
if ((siege != null) && siege.isInProgress())
{
continue;
}
}
}
else if (newTarget.isDead())
{
continue;
}
if (!Util.checkIfInRange(radius, creature, newTarget, true))
{
continue;
}
// Don't add this target if this is a Pc->Pc pvp casting and pvp condition not met
if (!player.checkPvpSkill(newTarget, this))
{
continue;
}
targetList.add(newTarget);
if (onlyFirst)
{
return targetList;
}
}
}
}
else if (creature instanceof NpcInstance)
{
// for buff purposes, returns friendly mobs nearby and mob itself
final NpcInstance npc = (NpcInstance) creature;
if ((npc.getFactionId() == null) || npc.getFactionId().isEmpty())
{
targetList.add(creature);
return targetList;
}
targetList.add(creature);
final Collection<WorldObject> objs = creature.getKnownList().getKnownObjects().values();
// synchronized (activeChar.getKnownList().getKnownObjects())
{
for (WorldObject newTarget : objs)
{
if ((newTarget instanceof NpcInstance) && npc.getFactionId().equals(((NpcInstance) newTarget).getFactionId()))
{
if (!Util.checkIfInRange(_castRange, creature, newTarget, true))
{
continue;
}
targetList.add((NpcInstance) newTarget);
}
}
}
}
return targetList;
}

Fixed! thx!!!