From c6058f29cb6ec95845d066809591866885e68908 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Tue, 16 Jun 2020 22:56:01 +0000 Subject: [PATCH] Moved siege skill checks above skill queue check. --- .../model/actor/instance/PlayerInstance.java | 16 ++++++++-------- .../model/actor/instance/PlayerInstance.java | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) 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 2aeeed698f..821ff2989e 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 @@ -9844,6 +9844,12 @@ public class PlayerInstance extends Playable return; } + // Check if it is ok to summon Siege Golem (13), Wild Hog Cannon (299) or Swoop Cannon (448). + if (((skillId == 13) || (skillId == 299) || (skillId == 448)) && !SiegeManager.getInstance().checkIfOkToSummon(this, false) && !FortSiegeManager.getInstance().checkIfOkToSummon(this, false)) + { + return; + } + // If a skill is currently being used, queue this one if this is not the same // Note that this check is currently imperfect: getCurrentSkill() isn't always null when a skill has // failed to cast, or the casting is not yet in progress when this is rechecked @@ -9863,7 +9869,7 @@ public class PlayerInstance extends Playable return; } - // Check if skill is in reause time + // Check if skill is in reuse time if (isSkillDisabled(skill)) { if ((skill.getId() != 2166)) @@ -9889,12 +9895,6 @@ public class PlayerInstance extends Playable return; } - // Check if it's ok to summon Siege Golem (13), Wild Hog Cannon (299), Swoop Cannon (448) - if (((skillId == 13) || (skillId == 299) || (skillId == 448)) && !SiegeManager.getInstance().checkIfOkToSummon(this, false) && !FortSiegeManager.getInstance().checkIfOkToSummon(this, false)) - { - return; - } - // ************************************* Check Casting in Progress ******************************************* // Create a new SkillDat object and set the player _currentSkill @@ -9906,7 +9906,7 @@ public class PlayerInstance extends Playable setQueuedSkill(null, false, false); } - // triggered skills cannot be used directly + // Triggered skills cannot be used directly if ((_triggeredSkills.size() > 0) && (_triggeredSkills.get(skill.getId()) != null)) { sendPacket(ActionFailed.STATIC_PACKET); 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 1e9e6c86b9..f84c55dc85 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 @@ -10006,6 +10006,12 @@ public class PlayerInstance extends Playable return; } + // Check if it is ok to summon Siege Golem (13), Wild Hog Cannon (299) or Swoop Cannon (448). + if (((skillId == 13) || (skillId == 299) || (skillId == 448)) && !SiegeManager.getInstance().checkIfOkToSummon(this, false) && !FortSiegeManager.getInstance().checkIfOkToSummon(this, false)) + { + return; + } + // If a skill is currently being used, queue this one if this is not the same // Note that this check is currently imperfect: getCurrentSkill() isn't always null when a skill has // failed to cast, or the casting is not yet in progress when this is rechecked @@ -10025,7 +10031,7 @@ public class PlayerInstance extends Playable return; } - // Check if skill is in reause time + // Check if skill is in reuse time if (isSkillDisabled(skill)) { if ((skill.getId() != 2166)) @@ -10051,12 +10057,6 @@ public class PlayerInstance extends Playable return; } - // Check if it's ok to summon Siege Golem (13), Wild Hog Cannon (299), Swoop Cannon (448) - if (((skillId == 13) || (skillId == 299) || (skillId == 448)) && !SiegeManager.getInstance().checkIfOkToSummon(this, false) && !FortSiegeManager.getInstance().checkIfOkToSummon(this, false)) - { - return; - } - // ************************************* Check Casting in Progress ******************************************* // Create a new SkillDat object and set the player _currentSkill @@ -10068,7 +10068,7 @@ public class PlayerInstance extends Playable setQueuedSkill(null, false, false); } - // triggered skills cannot be used directly + // Triggered skills cannot be used directly if ((_triggeredSkills.size() > 0) && (_triggeredSkills.get(skill.getId()) != null)) { sendPacket(ActionFailed.STATIC_PACKET);