Removal of stopAllEffectsWithoutExclusions method.
Thanks to Sahar.
This commit is contained in:
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-11
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -658,28 +658,6 @@ public class EffectList
|
|||||||
updateEffectList(update);
|
updateEffectList(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all effects in this effect list without excluding anything.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_buffs.stream().forEach(this::stopAndRemove);
|
|
||||||
_triggered.stream().forEach(this::stopAndRemove);
|
|
||||||
_dances.stream().forEach(this::stopAndRemove);
|
|
||||||
_toggles.stream().forEach(this::stopAndRemove);
|
|
||||||
_debuffs.stream().forEach(this::stopAndRemove);
|
|
||||||
_passives.stream().forEach(this::stopAndRemove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop all effects that doesn't stay on sub-class change.
|
* Stop all effects that doesn't stay on sub-class change.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ import org.l2jmobius.gameserver.model.EffectList;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -2403,18 +2402,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -2459,9 +2450,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
getAI().stopAITask();
|
getAI().stopAITask();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all effects, do not broadcast changes.
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
|
||||||
|
|
||||||
// Cancel the BuffFinishTask related to this creature.
|
// Cancel the BuffFinishTask related to this creature.
|
||||||
cancelBuffFinishTask();
|
cancelBuffFinishTask();
|
||||||
|
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-11
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1649,18 +1648,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1709,8 +1700,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-11
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1649,18 +1648,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1709,8 +1700,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-11
@@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1649,18 +1648,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1709,8 +1700,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-11
@@ -75,7 +75,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
-20
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-11
@@ -75,7 +75,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
@@ -344,26 +344,6 @@ public class EffectList
|
|||||||
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
stopEffects(info -> !info.getSkill().isStayAfterDeath(), true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Exits all active, passive and option effects in this effect list without excluding anything,<br>
|
|
||||||
* like necessary toggles, irreplacable buffs or effects that last through death.<br>
|
|
||||||
* Stops all the effects, clear the effect lists and updates the effect flags and icons.
|
|
||||||
* @param update set to true to update the effect flags and icons.
|
|
||||||
* @param broadcast {@code true} to broadcast update packets, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public void stopAllEffectsWithoutExclusions(boolean update, boolean broadcast)
|
|
||||||
{
|
|
||||||
_actives.stream().forEach(this::remove);
|
|
||||||
_passives.stream().forEach(this::remove);
|
|
||||||
_options.stream().forEach(this::remove);
|
|
||||||
|
|
||||||
// Update stats, effect flags and icons.
|
|
||||||
if (update)
|
|
||||||
{
|
|
||||||
updateEffectList(broadcast);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stops all active toggle skills.
|
* Stops all active toggle skills.
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-11
@@ -75,7 +75,6 @@ import org.l2jmobius.gameserver.model.Hit;
|
|||||||
import org.l2jmobius.gameserver.model.Location;
|
import org.l2jmobius.gameserver.model.Location;
|
||||||
import org.l2jmobius.gameserver.model.Party;
|
import org.l2jmobius.gameserver.model.Party;
|
||||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||||
import org.l2jmobius.gameserver.model.Spawn;
|
|
||||||
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
import org.l2jmobius.gameserver.model.TeleportWhereType;
|
||||||
import org.l2jmobius.gameserver.model.TimeStamp;
|
import org.l2jmobius.gameserver.model.TimeStamp;
|
||||||
import org.l2jmobius.gameserver.model.World;
|
import org.l2jmobius.gameserver.model.World;
|
||||||
@@ -1650,18 +1649,10 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_status.stopHpMpRegeneration();
|
_status.stopHpMpRegeneration();
|
||||||
|
|
||||||
if (isMonster())
|
if (isMonster())
|
||||||
{
|
|
||||||
final Spawn spawn = ((Npc) this).getSpawn();
|
|
||||||
if ((spawn != null) && spawn.isRespawnEnabled())
|
|
||||||
{
|
{
|
||||||
stopAllEffects();
|
stopAllEffects();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
_effectList.stopAllEffectsWithoutExclusions(true, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
stopAllEffectsExceptThoseThatLastThroughDeath();
|
stopAllEffectsExceptThoseThatLastThroughDeath();
|
||||||
}
|
}
|
||||||
@@ -1710,8 +1701,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
|
|||||||
_summoner.removeSummonedNpc(getObjectId());
|
_summoner.removeSummonedNpc(getObjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all active, passive and option effects, do not broadcast changes.
|
// Remove all effects, do not broadcast changes.
|
||||||
_effectList.stopAllEffectsWithoutExclusions(false, false);
|
_effectList.stopAllEffects(false);
|
||||||
|
|
||||||
// Cancel all timers related to this Creature
|
// Cancel all timers related to this Creature
|
||||||
TimersManager.getInstance().cancelTimers(getObjectId());
|
TimersManager.getInstance().cancelTimers(getObjectId());
|
||||||
|
|||||||
Reference in New Issue
Block a user