Removal of stopAllEffectsWithoutExclusions method.

Thanks to Sahar.
This commit is contained in:
MobiusDevelopment
2019-09-27 11:55:27 +00:00
parent 04f4c3dc8d
commit 603cbf4492
28 changed files with 40 additions and 451 deletions

View File

@@ -658,28 +658,6 @@ public class EffectList
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.
*/

View File

@@ -64,7 +64,6 @@ import org.l2jmobius.gameserver.model.EffectList;
import org.l2jmobius.gameserver.model.Location;
import org.l2jmobius.gameserver.model.Party;
import org.l2jmobius.gameserver.model.PlayerCondOverride;
import org.l2jmobius.gameserver.model.Spawn;
import org.l2jmobius.gameserver.model.TeleportWhereType;
import org.l2jmobius.gameserver.model.TimeStamp;
import org.l2jmobius.gameserver.model.World;
@@ -2404,15 +2403,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
if (isMonster())
{
final Spawn spawn = ((Npc) this).getSpawn();
if ((spawn != null) && spawn.isRespawnEnabled())
{
stopAllEffects();
}
else
{
_effectList.stopAllEffectsWithoutExclusions(true, true);
}
stopAllEffects();
}
else
{
@@ -2459,9 +2450,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe
getAI().stopAITask();
}
// Remove all effects, do not broadcast changes.
_effectList.stopAllEffectsWithoutExclusions(false, false);
// Cancel the BuffFinishTask related to this creature.
cancelBuffFinishTask();