Created L2Character method abortAllSkillCasters.
This commit is contained in:
@ -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.
|
||||
|
@ -425,10 +425,7 @@ public abstract class L2Summon extends L2Playable
|
||||
}
|
||||
|
||||
// Cancel running skill casters.
|
||||
for (SkillCaster skillCaster : getSkillCasters())
|
||||
{
|
||||
skillCaster.stopCasting(true);
|
||||
}
|
||||
abortAllSkillCasters();
|
||||
|
||||
stopAllEffects();
|
||||
stopHpMpRegeneration();
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user