diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 80b5d159f6..eb864ffb29 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index 7463bb4eff..d2c2af61bc 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 80b5d159f6..eb864ffb29 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index 7463bb4eff..d2c2af61bc 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 80b5d159f6..eb864ffb29 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index c0bacbfc77..6d80b5a231 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 80b5d159f6..eb864ffb29 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index c0bacbfc77..6d80b5a231 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 80b5d159f6..eb864ffb29 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index c0bacbfc77..6d80b5a231 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_5.0_Salvation/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 80b5d159f6..eb864ffb29 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index c0bacbfc77..6d80b5a231 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_5.5_EtinasFate/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 41eb11552e..a8415d676a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index f5196e7f37..ee07714efd 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 41eb11552e..a8415d676a 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index f5196e7f37..ee07714efd 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 41eb11552e..a8415d676a 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index f5196e7f37..ee07714efd 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java index 467f70a972..bc3a1e7227 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/BlockActions.java @@ -29,7 +29,6 @@ import com.l2jmobius.gameserver.model.effects.AbstractEffect; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.effects.L2EffectType; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; /** * Block Actions effect implementation. @@ -63,10 +62,7 @@ public final class BlockActions extends AbstractEffect _allowedSkills.stream().forEach(effected::addBlockActionsAllowedSkill); effected.startParalyze(); // Cancel running skill casters. - for (SkillCaster skillCaster : effected.getSkillCasters()) - { - skillCaster.stopCasting(true); - } + effected.abortAllSkillCasters(); } @Override diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java index 41eb11552e..a8415d676a 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -2836,6 +2836,21 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe } } + /** + * Abort the cast of all skills. + */ + public final void abortAllSkillCasters() + { + for (SkillCaster skillCaster : getSkillCasters()) + { + skillCaster.stopCasting(true); + if (isPlayer()) + { + getActingPlayer().setQueuedSkill(null, null, false, false); + } + } + } + /** * Abort the cast of normal non-simultaneous skills. * @return {@code true} if a skill casting has been aborted, {@code false} otherwise. diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Summon.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Summon.java index f5196e7f37..ee07714efd 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Summon.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/L2Summon.java @@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable } // Cancel running skill casters. - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); stopAllEffects(); stopHpMpRegeneration(); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java index c7fe70ee1b..135ab0aa11 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/com/l2jmobius/gameserver/model/actor/instance/L2MonsterInstance.java @@ -26,7 +26,6 @@ import com.l2jmobius.gameserver.model.actor.templates.L2NpcTemplate; import com.l2jmobius.gameserver.model.effects.EffectFlag; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.model.skills.SkillCaster; import com.l2jmobius.gameserver.util.MinionList; /** @@ -249,10 +248,7 @@ public class L2MonsterInstance extends L2Attackable // Might need some exceptions here, but it will prevent the monster buffing player bug. if (!skill.isBad() && (getTarget() != null) && getTarget().isPlayer()) { - for (SkillCaster skillCaster : getSkillCasters()) - { - skillCaster.stopCasting(true); - } + abortAllSkillCasters(); return; } super.doCast(skill, item, ctrlPressed, shiftPressed);