diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 0215597d21..34565dbeda 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8451,7 +8451,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11146,7 +11146,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index c7b7724b2e..1f2d5da83b 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8458,7 +8458,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11153,7 +11153,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index d7840736c1..2d3eec5641 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8460,7 +8460,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11155,7 +11155,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 5511823480..eda207ae4d 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8455,7 +8455,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11136,7 +11136,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 8b8533006f..43e75df601 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8438,7 +8438,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11123,7 +11123,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index db46359fbf..e1f81efaaa 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8438,7 +8438,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11126,7 +11126,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index ebd402ef2a..6b15f996ab 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8439,7 +8439,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11132,7 +11132,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index ea559de12e..fd3ac75be7 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8420,7 +8420,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11104,7 +11104,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java index cb751d517b..77cb98b4b8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java @@ -29,11 +29,11 @@ import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.actor.Playable; import org.l2jmobius.gameserver.model.actor.instance.PetInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.SkillDat; import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; import org.l2jmobius.gameserver.model.entity.event.CTF; import org.l2jmobius.gameserver.model.entity.event.DM; import org.l2jmobius.gameserver.model.entity.event.TvT; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.spawn.Spawn; import org.l2jmobius.gameserver.network.SystemMessageId; @@ -227,8 +227,8 @@ public class SummonItems implements IItemHandler { try { - final SkillDat skilldat = _player.getCurrentSkill(); - if (!_player.isCastingNow() || ((skilldat != null) && (skilldat.getSkillId() != 2046))) + final SkillUseHolder skill = _player.getCurrentSkill(); + if (!_player.isCastingNow() || ((skill != null) && (skill.getSkillId() != 2046))) { return; } diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java index 6f1b27cc65..e71abd684b 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -73,7 +73,6 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance; import org.l2jmobius.gameserver.model.actor.instance.NpcWalkerInstance; import org.l2jmobius.gameserver.model.actor.instance.PetInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.SkillDat; import org.l2jmobius.gameserver.model.actor.instance.RaidBossInstance; import org.l2jmobius.gameserver.model.actor.instance.RiftInvaderInstance; import org.l2jmobius.gameserver.model.actor.instance.SiegeFlagInstance; @@ -89,6 +88,7 @@ import org.l2jmobius.gameserver.model.entity.event.GameEvent; import org.l2jmobius.gameserver.model.entity.event.TvT; import org.l2jmobius.gameserver.model.entity.event.VIP; import org.l2jmobius.gameserver.model.entity.olympiad.Olympiad; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.itemcontainer.Inventory; import org.l2jmobius.gameserver.model.items.Weapon; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; @@ -7586,11 +7586,11 @@ public abstract class Creature extends WorldObject implements ISkillsHolder if (this instanceof PlayerInstance) { final PlayerInstance currPlayer = (PlayerInstance) this; - final SkillDat skilldat = currPlayer.getCurrentSkill(); + final SkillUseHolder skillUseHolder = currPlayer.getCurrentSkill(); // Like L2OFF if the skill is BLOW the player doesn't auto attack // If on XML skill nextActionAttack = true the char auto attack // If CTRL is pressed the autoattack is aborted (like L2OFF) - if ((skilldat != null) && !skilldat.isCtrlPressed() && skill.nextActionIsAttack() && (_target != null) && (_target instanceof Creature)) + if ((skillUseHolder != null) && !skillUseHolder.isCtrlPressed() && skill.nextActionIsAttack() && (_target != null) && (_target instanceof Creature)) { getAI().setIntention(AI_INTENTION_ATTACK, _target); } @@ -7608,8 +7608,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder if (this instanceof PlayerInstance) { final PlayerInstance currPlayer = (PlayerInstance) this; - final SkillDat skilldat = currPlayer.getCurrentSkill(); - if ((skilldat != null) && !skilldat.isCtrlPressed() && (skill.isOffensive()) && (skill.getSkillType() != SkillType.UNLOCK) && (skill.getSkillType() != SkillType.BLOW) && (skill.getSkillType() != SkillType.DELUXE_KEY_UNLOCK) && (skill.getId() != 345) && (skill.getId() != 346)) + final SkillUseHolder skillUseHolder = currPlayer.getCurrentSkill(); + if ((skillUseHolder != null) && !skillUseHolder.isCtrlPressed() && (skill.isOffensive()) && (skill.getSkillType() != SkillType.UNLOCK) && (skill.getSkillType() != SkillType.BLOW) && (skill.getSkillType() != SkillType.DELUXE_KEY_UNLOCK) && (skill.getId() != 345) && (skill.getId() != 346)) { if (!skill.isMagic() && skill.nextActionIsAttack()) { @@ -7643,7 +7643,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder if (this instanceof PlayerInstance) { final PlayerInstance currPlayer = (PlayerInstance) this; - final SkillDat queuedSkill = currPlayer.getQueuedSkill(); + final SkillUseHolder queuedSkill = currPlayer.getQueuedSkill(); currPlayer.setCurrentSkill(null, false, false); if (queuedSkill != null) { diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 93cdf65248..07482a7769 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -134,6 +134,7 @@ import org.l2jmobius.gameserver.model.entity.siege.FortSiege; import org.l2jmobius.gameserver.model.entity.siege.Siege; import org.l2jmobius.gameserver.model.entity.siege.clanhalls.DevastatedCastle; import org.l2jmobius.gameserver.model.holders.PlayerStatsHolder; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.holders.SummonRequestHolder; import org.l2jmobius.gameserver.model.itemcontainer.Inventory; import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer; @@ -462,9 +463,9 @@ public class PlayerInstance extends Playable private final List _validLink = new ArrayList<>(); private Forum _forumMail; private Forum _forumMemo; - private SkillDat _currentSkill; - private SkillDat _currentPetSkill; - private SkillDat _queuedSkill; + private SkillUseHolder _currentSkill; + private SkillUseHolder _currentPetSkill; + private SkillUseHolder _queuedSkill; private boolean _isWearingFormalWear = false; private Location _currentSkillWorldPosition; private int _reviveRequested = 0; @@ -818,70 +819,6 @@ public class PlayerInstance extends Playable } } - /** - * Skill casting information (used to queue when several skills are cast in a short time) *. - */ - public class SkillDat - { - /** The _skill. */ - private final Skill _skill; - - /** The _ctrl pressed. */ - private final boolean _ctrlPressed; - - /** The _shift pressed. */ - private final boolean _shiftPressed; - - /** - * Instantiates a new skill dat. - * @param skill the skill - * @param ctrlPressed the ctrl pressed - * @param shiftPressed the shift pressed - */ - protected SkillDat(Skill skill, boolean ctrlPressed, boolean shiftPressed) - { - _skill = skill; - _ctrlPressed = ctrlPressed; - _shiftPressed = shiftPressed; - } - - /** - * Checks if is ctrl pressed. - * @return true, if is ctrl pressed - */ - public boolean isCtrlPressed() - { - return _ctrlPressed; - } - - /** - * Checks if is shift pressed. - * @return true, if is shift pressed - */ - public boolean isShiftPressed() - { - return _shiftPressed; - } - - /** - * Gets the skill. - * @return the skill - */ - public Skill getSkill() - { - return _skill; - } - - /** - * Gets the skill id. - * @return the skill id - */ - public int getSkillId() - { - return getSkill() != null ? getSkill().getId() : -1; - } - } - /** * Gets the account name. * @return the account name @@ -9775,7 +9712,7 @@ public class PlayerInstance extends Playable final int skillId = skill.getId(); int currSkillId = -1; - final SkillDat current = getCurrentSkill(); + final SkillUseHolder current = getCurrentSkill(); if (current != null) { currSkillId = current.getSkillId(); @@ -9855,7 +9792,7 @@ public class PlayerInstance extends Playable // failed to cast, or the casting is not yet in progress when this is rechecked if ((currSkillId != -1) && (isCastingNow() || isCastingPotionNow())) { - final SkillDat currentSkill = getCurrentSkill(); + final SkillUseHolder currentSkill = getCurrentSkill(); // Check if new skill different from current skill in progress if ((currentSkill != null) && (skill.getId() == currentSkill.getSkillId())) { @@ -9863,7 +9800,7 @@ public class PlayerInstance extends Playable return; } - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(skill, forceUse, dontMove); sendPacket(ActionFailed.STATIC_PACKET); return; @@ -9897,7 +9834,7 @@ public class PlayerInstance extends Playable // ************************************* Check Casting in Progress ******************************************* - // Create a new SkillDat object and set the player _currentSkill + // Create a new SkillUseHolder object and set the player _currentSkill // This is used mainly to save & queue the button presses, since Creature has // _lastSkillCast which could otherwise replace it setCurrentSkill(skill, forceUse, dontMove); @@ -9972,8 +9909,8 @@ public class PlayerInstance extends Playable } // Like L2OFF you can't heal random purple people without using CTRL - final SkillDat skilldat = getCurrentSkill(); - if ((skilldat != null) && (skill.getSkillType() == SkillType.HEAL) && !skilldat.isCtrlPressed() && (target instanceof PlayerInstance) && (((PlayerInstance) target).getPvpFlag() == 1) && (this != target)) + final SkillUseHolder skillUseHolder = getCurrentSkill(); + if ((skillUseHolder != null) && (skill.getSkillType() == SkillType.HEAL) && !skillUseHolder.isCtrlPressed() && (target instanceof PlayerInstance) && (((PlayerInstance) target).getPvpFlag() == 1) && (this != target)) { if (((getClanId() == 0) || (((PlayerInstance) target).getClanId() == 0)) || (getClanId() != ((PlayerInstance) target).getClanId())) { @@ -10331,7 +10268,7 @@ public class PlayerInstance extends Playable return; } - // If all conditions are checked, create a new SkillDat object and set the player _currentSkill + // If all conditions are checked, create a new SkillUseHolder object and set the player _currentSkill setCurrentSkill(skill, forceUse, dontMove); // Check if the active Skill can be casted (ex : not sleeping...), Check if the target is correct and Notify the AI with AI_INTENTION_CAST and target @@ -10406,11 +10343,9 @@ public class PlayerInstance extends Playable (target != this) && // target is not self and (target instanceof PlayerInstance) && // target is PlayerInstance and !isInsideZone(ZoneId.PVP) && // Pc is not in PvP zone - !((PlayerInstance) target).isInsideZone(ZoneId.PVP) // target is not in PvP zone - ) + !((PlayerInstance) target).isInsideZone(ZoneId.PVP)) // target is not in PvP zone { - final SkillDat skilldat = getCurrentSkill(); - // SkillDat skilldatpet = getCurrentPetSkill(); + final SkillUseHolder skillUseHolder = getCurrentSkill(); if (skill.isPvpSkill()) // pvp skill { if ((getClan() != null) && (((PlayerInstance) target).getClan() != null) && getClan().isAtWarWith(((PlayerInstance) target).getClan().getClanId()) && ((PlayerInstance) target).getClan().isAtWarWith(getClan().getClanId())) @@ -10423,7 +10358,7 @@ public class PlayerInstance extends Playable return false; } } - else if ((skilldat != null) && !skilldat.isCtrlPressed() && skill.isOffensive() && !srcIsSummon) + else if ((skillUseHolder != null) && !skillUseHolder.isCtrlPressed() && skill.isOffensive() && !srcIsSummon) { if ((getClan() != null) && (((PlayerInstance) target).getClan() != null) && getClan().isAtWarWith(((PlayerInstance) target).getClan().getClanId()) && ((PlayerInstance) target).getClan().isAtWarWith(getClan().getClanId())) { @@ -14423,13 +14358,13 @@ public class PlayerInstance extends Playable * Get the current skill in use or return null. * @return the current skill */ - public SkillDat getCurrentSkill() + public SkillUseHolder getCurrentSkill() { return _currentSkill; } /** - * Create a new SkillDat object and set the player _currentSkill. + * Create a new SkillUseHolder object and set the player _currentSkill. * @param currentSkill the current skill * @param ctrlPressed the ctrl pressed * @param shiftPressed the shift pressed @@ -14441,20 +14376,20 @@ public class PlayerInstance extends Playable _currentSkill = null; return; } - _currentSkill = new SkillDat(currentSkill, ctrlPressed, shiftPressed); + _currentSkill = new SkillUseHolder(currentSkill, ctrlPressed, shiftPressed); } /** * Gets the queued skill. * @return the queued skill */ - public SkillDat getQueuedSkill() + public SkillUseHolder getQueuedSkill() { return _queuedSkill; } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill the queued skill * @param ctrlPressed the ctrl pressed * @param shiftPressed the shift pressed @@ -14466,7 +14401,7 @@ public class PlayerInstance extends Playable _queuedSkill = null; return; } - _queuedSkill = new SkillDat(queuedSkill, ctrlPressed, shiftPressed); + _queuedSkill = new SkillUseHolder(queuedSkill, ctrlPressed, shiftPressed); } /** @@ -16291,13 +16226,13 @@ public class PlayerInstance extends Playable * Get the current pet skill in use or return null.
* @return */ - public SkillDat getCurrentPetSkill() + public SkillUseHolder getCurrentPetSkill() { return _currentPetSkill; } /** - * Create a new SkillDat object and set the player _currentPetSkill. + * Create a new SkillUseHolder object and set the player _currentPetSkill. * @param currentSkill * @param ctrlPressed * @param shiftPressed @@ -16309,7 +16244,7 @@ public class PlayerInstance extends Playable _currentPetSkill = null; return; } - _currentPetSkill = new SkillDat(currentSkill, ctrlPressed, shiftPressed); + _currentPetSkill = new SkillUseHolder(currentSkill, ctrlPressed, shiftPressed); } @Override diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/holders/SkillUseHolder.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/holders/SkillUseHolder.java new file mode 100644 index 0000000000..c2639c11d7 --- /dev/null +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/holders/SkillUseHolder.java @@ -0,0 +1,84 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.l2jmobius.gameserver.model.holders; + +import org.l2jmobius.gameserver.model.Skill; + +/** + * Skill casting information (used to queue when several skills are cast in a short time). + * @author Mobius + */ +public class SkillUseHolder +{ + /** The _skill. */ + private final Skill _skill; + + /** The _ctrl pressed. */ + private final boolean _ctrlPressed; + + /** The _shift pressed. */ + private final boolean _shiftPressed; + + /** + * Instantiates a new skill dat. + * @param skill the skill + * @param ctrlPressed the ctrl pressed + * @param shiftPressed the shift pressed + */ + public SkillUseHolder(Skill skill, boolean ctrlPressed, boolean shiftPressed) + { + _skill = skill; + _ctrlPressed = ctrlPressed; + _shiftPressed = shiftPressed; + } + + /** + * Checks if is ctrl pressed. + * @return true, if is ctrl pressed + */ + public boolean isCtrlPressed() + { + return _ctrlPressed; + } + + /** + * Checks if is shift pressed. + * @return true, if is shift pressed + */ + public boolean isShiftPressed() + { + return _shiftPressed; + } + + /** + * Gets the skill. + * @return the skill + */ + public Skill getSkill() + { + return _skill; + } + + /** + * Gets the skill id. + * @return the skill id + */ + public int getSkillId() + { + return getSkill() != null ? getSkill().getId() : -1; + } +} diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java index 664a07a3ba..21c95c80a8 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java @@ -21,7 +21,7 @@ import java.util.logging.Logger; import org.l2jmobius.Config; import org.l2jmobius.gameserver.datatables.xml.AdminData; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.SkillDat; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.items.Item; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; @@ -154,7 +154,7 @@ public class RequestDropItem extends GameClientPacket if (player.isCastingNow()) { - final SkillDat skill = player.getCurrentSkill(); + final SkillUseHolder skill = player.getCurrentSkill(); if (skill != null) { // Cannot discard item that the skill is consuming. diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java index 2a2f7e86ee..b4fd6ffba0 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/handler/itemhandlers/SummonItems.java @@ -29,11 +29,11 @@ import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.actor.Playable; import org.l2jmobius.gameserver.model.actor.instance.PetInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.SkillDat; import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; import org.l2jmobius.gameserver.model.entity.event.CTF; import org.l2jmobius.gameserver.model.entity.event.DM; import org.l2jmobius.gameserver.model.entity.event.TvT; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.spawn.Spawn; import org.l2jmobius.gameserver.network.SystemMessageId; @@ -233,8 +233,8 @@ public class SummonItems implements IItemHandler { try { - final SkillDat skilldat = _player.getCurrentSkill(); - if (!_player.isCastingNow() || ((skilldat != null) && (skilldat.getSkillId() != 2046))) + final SkillUseHolder skill = _player.getCurrentSkill(); + if (!_player.isCastingNow() || ((skill != null) && (skill.getSkillId() != 2046))) { return; } diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java index 13bfdd86c5..6a247eb4d2 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -74,7 +74,6 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance; import org.l2jmobius.gameserver.model.actor.instance.NpcWalkerInstance; import org.l2jmobius.gameserver.model.actor.instance.PetInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.SkillDat; import org.l2jmobius.gameserver.model.actor.instance.RaidBossInstance; import org.l2jmobius.gameserver.model.actor.instance.RiftInvaderInstance; import org.l2jmobius.gameserver.model.actor.instance.SiegeFlagInstance; @@ -91,6 +90,7 @@ import org.l2jmobius.gameserver.model.entity.event.GameEvent; import org.l2jmobius.gameserver.model.entity.event.TvT; import org.l2jmobius.gameserver.model.entity.event.VIP; import org.l2jmobius.gameserver.model.entity.olympiad.Olympiad; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.itemcontainer.Inventory; import org.l2jmobius.gameserver.model.items.Weapon; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; @@ -7635,11 +7635,11 @@ public abstract class Creature extends WorldObject implements ISkillsHolder if (this instanceof PlayerInstance) { final PlayerInstance currPlayer = (PlayerInstance) this; - final SkillDat skilldat = currPlayer.getCurrentSkill(); + final SkillUseHolder skillUseHolder = currPlayer.getCurrentSkill(); // Like L2OFF if the skill is BLOW the player doesn't auto attack // If on XML skill nextActionAttack = true the char auto attack // If CTRL is pressed the autoattack is aborted (like L2OFF) - if ((skilldat != null) && !skilldat.isCtrlPressed() && skill.nextActionIsAttack() && (_target != null) && (_target instanceof Creature)) + if ((skillUseHolder != null) && !skillUseHolder.isCtrlPressed() && skill.nextActionIsAttack() && (_target != null) && (_target instanceof Creature)) { getAI().setIntention(AI_INTENTION_ATTACK, _target); } @@ -7657,8 +7657,8 @@ public abstract class Creature extends WorldObject implements ISkillsHolder if (this instanceof PlayerInstance) { final PlayerInstance currPlayer = (PlayerInstance) this; - final SkillDat skilldat = currPlayer.getCurrentSkill(); - if ((skilldat != null) && !skilldat.isCtrlPressed() && (skill.isOffensive()) && (skill.getSkillType() != SkillType.UNLOCK) && (skill.getSkillType() != SkillType.BLOW) && (skill.getSkillType() != SkillType.DELUXE_KEY_UNLOCK) && (skill.getId() != 345) && (skill.getId() != 346)) + final SkillUseHolder skillUseHolder = currPlayer.getCurrentSkill(); + if ((skillUseHolder != null) && !skillUseHolder.isCtrlPressed() && (skill.isOffensive()) && (skill.getSkillType() != SkillType.UNLOCK) && (skill.getSkillType() != SkillType.BLOW) && (skill.getSkillType() != SkillType.DELUXE_KEY_UNLOCK) && (skill.getId() != 345) && (skill.getId() != 346)) { if (!skill.isMagic() && skill.nextActionIsAttack()) { @@ -7692,7 +7692,7 @@ public abstract class Creature extends WorldObject implements ISkillsHolder if (this instanceof PlayerInstance) { final PlayerInstance currPlayer = (PlayerInstance) this; - final SkillDat queuedSkill = currPlayer.getQueuedSkill(); + final SkillUseHolder queuedSkill = currPlayer.getQueuedSkill(); currPlayer.setCurrentSkill(null, false, false); if (queuedSkill != null) { diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 84fb88f505..0f403f4a3e 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -137,6 +137,7 @@ import org.l2jmobius.gameserver.model.entity.siege.FortSiege; import org.l2jmobius.gameserver.model.entity.siege.Siege; import org.l2jmobius.gameserver.model.entity.siege.clanhalls.DevastatedCastle; import org.l2jmobius.gameserver.model.holders.PlayerStatsHolder; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.holders.SummonRequestHolder; import org.l2jmobius.gameserver.model.itemcontainer.Inventory; import org.l2jmobius.gameserver.model.itemcontainer.ItemContainer; @@ -475,9 +476,9 @@ public class PlayerInstance extends Playable private final List _validLink = new ArrayList<>(); private Forum _forumMail; private Forum _forumMemo; - private SkillDat _currentSkill; - private SkillDat _currentPetSkill; - private SkillDat _queuedSkill; + private SkillUseHolder _currentSkill; + private SkillUseHolder _currentPetSkill; + private SkillUseHolder _queuedSkill; private boolean _isWearingFormalWear = false; private Location _currentSkillWorldPosition; private int _cursedWeaponEquipedId = 0; @@ -832,70 +833,6 @@ public class PlayerInstance extends Playable } } - /** - * Skill casting information (used to queue when several skills are cast in a short time) *. - */ - public class SkillDat - { - /** The _skill. */ - private final Skill _skill; - - /** The _ctrl pressed. */ - private final boolean _ctrlPressed; - - /** The _shift pressed. */ - private final boolean _shiftPressed; - - /** - * Instantiates a new skill dat. - * @param skill the skill - * @param ctrlPressed the ctrl pressed - * @param shiftPressed the shift pressed - */ - protected SkillDat(Skill skill, boolean ctrlPressed, boolean shiftPressed) - { - _skill = skill; - _ctrlPressed = ctrlPressed; - _shiftPressed = shiftPressed; - } - - /** - * Checks if is ctrl pressed. - * @return true, if is ctrl pressed - */ - public boolean isCtrlPressed() - { - return _ctrlPressed; - } - - /** - * Checks if is shift pressed. - * @return true, if is shift pressed - */ - public boolean isShiftPressed() - { - return _shiftPressed; - } - - /** - * Gets the skill. - * @return the skill - */ - public Skill getSkill() - { - return _skill; - } - - /** - * Gets the skill id. - * @return the skill id - */ - public int getSkillId() - { - return getSkill() != null ? getSkill().getId() : -1; - } - } - /** * Gets the account name. * @return the account name @@ -9937,7 +9874,7 @@ public class PlayerInstance extends Playable final int skillId = skill.getId(); int currSkillId = -1; - final SkillDat current = getCurrentSkill(); + final SkillUseHolder current = getCurrentSkill(); if (current != null) { currSkillId = current.getSkillId(); @@ -10017,7 +9954,7 @@ public class PlayerInstance extends Playable // failed to cast, or the casting is not yet in progress when this is rechecked if ((currSkillId != -1) && (isCastingNow() || isCastingPotionNow())) { - final SkillDat currentSkill = getCurrentSkill(); + final SkillUseHolder currentSkill = getCurrentSkill(); // Check if new skill different from current skill in progress if ((currentSkill != null) && (skill.getId() == currentSkill.getSkillId())) { @@ -10025,7 +9962,7 @@ public class PlayerInstance extends Playable return; } - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(skill, forceUse, dontMove); sendPacket(ActionFailed.STATIC_PACKET); return; @@ -10059,7 +9996,7 @@ public class PlayerInstance extends Playable // ************************************* Check Casting in Progress ******************************************* - // Create a new SkillDat object and set the player _currentSkill + // Create a new SkillUseHolder object and set the player _currentSkill // This is used mainly to save & queue the button presses, since Creature has // _lastSkillCast which could otherwise replace it setCurrentSkill(skill, forceUse, dontMove); @@ -10134,8 +10071,8 @@ public class PlayerInstance extends Playable } // Like L2OFF you can't heal random purple people without using CTRL - final SkillDat skilldat = getCurrentSkill(); - if ((skilldat != null) && (skill.getSkillType() == SkillType.HEAL) && !skilldat.isCtrlPressed() && (target instanceof PlayerInstance) && (((PlayerInstance) target).getPvpFlag() == 1) && (this != target)) + final SkillUseHolder skillUseHolder = getCurrentSkill(); + if ((skillUseHolder != null) && (skill.getSkillType() == SkillType.HEAL) && !skillUseHolder.isCtrlPressed() && (target instanceof PlayerInstance) && (((PlayerInstance) target).getPvpFlag() == 1) && (this != target)) { if (((getClanId() == 0) || (((PlayerInstance) target).getClanId() == 0)) || (getClanId() != ((PlayerInstance) target).getClanId())) { @@ -10502,7 +10439,7 @@ public class PlayerInstance extends Playable return; } - // If all conditions are checked, create a new SkillDat object and set the player _currentSkill + // If all conditions are checked, create a new SkillUseHolder object and set the player _currentSkill setCurrentSkill(skill, forceUse, dontMove); // Check if the active Skill can be casted (ex : not sleeping...), Check if the target is correct and Notify the AI with AI_INTENTION_CAST and target @@ -10578,11 +10515,9 @@ public class PlayerInstance extends Playable (target instanceof PlayerInstance) && // target is PlayerInstance and (!isInDuel() || (((PlayerInstance) target).getDuelId() != getDuelId())) && // self is not in a duel and attacking opponent !isInsideZone(ZoneId.PVP) && // Pc is not in PvP zone - !((PlayerInstance) target).isInsideZone(ZoneId.PVP) // target is not in PvP zone - ) + !((PlayerInstance) target).isInsideZone(ZoneId.PVP)) // target is not in PvP zone { - final SkillDat skilldat = getCurrentSkill(); - // SkillDat skilldatpet = getCurrentPetSkill(); + final SkillUseHolder skillUseHolder = getCurrentSkill(); if (skill.isPvpSkill()) // pvp skill { if ((getClan() != null) && (((PlayerInstance) target).getClan() != null) && getClan().isAtWarWith(((PlayerInstance) target).getClan().getClanId()) && ((PlayerInstance) target).getClan().isAtWarWith(getClan().getClanId())) @@ -10595,7 +10530,7 @@ public class PlayerInstance extends Playable return false; } } - else if ((skilldat != null) && !skilldat.isCtrlPressed() && skill.isOffensive() && !srcIsSummon) + else if ((skillUseHolder != null) && !skillUseHolder.isCtrlPressed() && skill.isOffensive() && !srcIsSummon) { if ((getClan() != null) && (((PlayerInstance) target).getClan() != null) && getClan().isAtWarWith(((PlayerInstance) target).getClan().getClanId()) && ((PlayerInstance) target).getClan().isAtWarWith(getClan().getClanId())) { @@ -14747,13 +14682,13 @@ public class PlayerInstance extends Playable * Get the current skill in use or return null. * @return the current skill */ - public SkillDat getCurrentSkill() + public SkillUseHolder getCurrentSkill() { return _currentSkill; } /** - * Create a new SkillDat object and set the player _currentSkill. + * Create a new SkillUseHolder object and set the player _currentSkill. * @param currentSkill the current skill * @param ctrlPressed the ctrl pressed * @param shiftPressed the shift pressed @@ -14765,20 +14700,20 @@ public class PlayerInstance extends Playable _currentSkill = null; return; } - _currentSkill = new SkillDat(currentSkill, ctrlPressed, shiftPressed); + _currentSkill = new SkillUseHolder(currentSkill, ctrlPressed, shiftPressed); } /** * Gets the queued skill. * @return the queued skill */ - public SkillDat getQueuedSkill() + public SkillUseHolder getQueuedSkill() { return _queuedSkill; } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill the queued skill * @param ctrlPressed the ctrl pressed * @param shiftPressed the shift pressed @@ -14790,7 +14725,7 @@ public class PlayerInstance extends Playable _queuedSkill = null; return; } - _queuedSkill = new SkillDat(queuedSkill, ctrlPressed, shiftPressed); + _queuedSkill = new SkillUseHolder(queuedSkill, ctrlPressed, shiftPressed); } /** @@ -16662,13 +16597,13 @@ public class PlayerInstance extends Playable * Get the current pet skill in use or return null.
* @return */ - public SkillDat getCurrentPetSkill() + public SkillUseHolder getCurrentPetSkill() { return _currentPetSkill; } /** - * Create a new SkillDat object and set the player _currentPetSkill. + * Create a new SkillUseHolder object and set the player _currentPetSkill. * @param currentSkill * @param ctrlPressed * @param shiftPressed @@ -16680,7 +16615,7 @@ public class PlayerInstance extends Playable _currentPetSkill = null; return; } - _currentPetSkill = new SkillDat(currentSkill, ctrlPressed, shiftPressed); + _currentPetSkill = new SkillUseHolder(currentSkill, ctrlPressed, shiftPressed); } @Override diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/holders/SkillUseHolder.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/holders/SkillUseHolder.java new file mode 100644 index 0000000000..c2639c11d7 --- /dev/null +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/holders/SkillUseHolder.java @@ -0,0 +1,84 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.l2jmobius.gameserver.model.holders; + +import org.l2jmobius.gameserver.model.Skill; + +/** + * Skill casting information (used to queue when several skills are cast in a short time). + * @author Mobius + */ +public class SkillUseHolder +{ + /** The _skill. */ + private final Skill _skill; + + /** The _ctrl pressed. */ + private final boolean _ctrlPressed; + + /** The _shift pressed. */ + private final boolean _shiftPressed; + + /** + * Instantiates a new skill dat. + * @param skill the skill + * @param ctrlPressed the ctrl pressed + * @param shiftPressed the shift pressed + */ + public SkillUseHolder(Skill skill, boolean ctrlPressed, boolean shiftPressed) + { + _skill = skill; + _ctrlPressed = ctrlPressed; + _shiftPressed = shiftPressed; + } + + /** + * Checks if is ctrl pressed. + * @return true, if is ctrl pressed + */ + public boolean isCtrlPressed() + { + return _ctrlPressed; + } + + /** + * Checks if is shift pressed. + * @return true, if is shift pressed + */ + public boolean isShiftPressed() + { + return _shiftPressed; + } + + /** + * Gets the skill. + * @return the skill + */ + public Skill getSkill() + { + return _skill; + } + + /** + * Gets the skill id. + * @return the skill id + */ + public int getSkillId() + { + return getSkill() != null ? getSkill().getId() : -1; + } +} diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java index 310b2971f1..03d37c0791 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/clientpackets/RequestDropItem.java @@ -22,7 +22,7 @@ import org.l2jmobius.Config; import org.l2jmobius.gameserver.datatables.xml.AdminData; import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance.SkillDat; +import org.l2jmobius.gameserver.model.holders.SkillUseHolder; import org.l2jmobius.gameserver.model.items.Item; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.EtcItemType; @@ -167,7 +167,7 @@ public class RequestDropItem extends GameClientPacket if (player.isCastingNow()) { - final SkillDat skill = player.getCurrentSkill(); + final SkillUseHolder skill = player.getCurrentSkill(); if (skill != null) { // Cannot discard item that the skill is consuming. diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index dfaa6fda9a..f4e9a7b924 100644 --- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8580,14 +8580,14 @@ public class PlayerInstance extends Playable return false; } - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(skill, forceUse, dontMove); sendPacket(ActionFailed.STATIC_PACKET); return false; } setCastingNow(true); - // Create a new SkillDat object and set the player _currentSkill + // Create a new SkillUseHolder object and set the player _currentSkill // This is used mainly to save & queue the button presses, since Creature has // _lastSkillCast which could otherwise replace it setCurrentSkill(skill, forceUse, dontMove); @@ -12109,7 +12109,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and set the player _currentSkill. + * Create a new SkillUseHolder object and set the player _currentSkill. * @param currentSkill * @param ctrlPressed * @param shiftPressed @@ -12133,7 +12133,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and set the player _currentPetSkill. + * Create a new SkillUseHolder object and set the player _currentPetSkill. * @param currentSkill * @param ctrlPressed * @param shiftPressed @@ -12154,7 +12154,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param ctrlPressed * @param shiftPressed diff --git a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index b01cc89715..3bc11b587e 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8464,14 +8464,14 @@ public class PlayerInstance extends Playable return false; } - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(skill, forceUse, dontMove); sendPacket(ActionFailed.STATIC_PACKET); return false; } setCastingNow(true); - // Create a new SkillDat object and set the player _currentSkill + // Create a new SkillUseHolder object and set the player _currentSkill // This is used mainly to save & queue the button presses, since Creature has // _lastSkillCast which could otherwise replace it setCurrentSkill(skill, forceUse, dontMove); @@ -12002,7 +12002,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and set the player _currentSkill. + * Create a new SkillUseHolder object and set the player _currentSkill. * @param currentSkill * @param ctrlPressed * @param shiftPressed @@ -12026,7 +12026,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and set the player _currentPetSkill. + * Create a new SkillUseHolder object and set the player _currentPetSkill. * @param currentSkill * @param ctrlPressed * @param shiftPressed @@ -12047,7 +12047,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param ctrlPressed * @param shiftPressed diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 2bd2c41666..43de2c966a 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8396,7 +8396,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11087,7 +11087,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index fda3eb9d63..069c5e7758 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8396,7 +8396,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11087,7 +11087,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 8b6251d483..3a32204f51 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8382,7 +8382,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11073,7 +11073,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index ffed28ea40..73cb3e4766 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8409,7 +8409,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11103,7 +11103,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index e70c55ab63..c16066e5bb 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8409,7 +8409,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11103,7 +11103,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 1ec07edaf8..c95f27e364 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8326,7 +8326,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11006,7 +11006,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index 0a424574a4..5949f3e1ba 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -8398,7 +8398,7 @@ public class PlayerInstance extends Playable // Do not queue skill if called by an item. if (item == null) { - // Create a new SkillDat object and queue it in the player _queuedSkill + // Create a new SkillUseHolder object and queue it in the player _queuedSkill setQueuedSkill(usedSkill, item, forceUse, dontMove); } sendPacket(ActionFailed.STATIC_PACKET); @@ -11108,7 +11108,7 @@ public class PlayerInstance extends Playable } /** - * Create a new SkillDat object and queue it in the player _queuedSkill. + * Create a new SkillUseHolder object and queue it in the player _queuedSkill. * @param queuedSkill * @param item * @param ctrlPressed