From 9f8122b1eaae2dc3c61090e5b07c43b087f2b915 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 8 Jan 2022 00:06:41 +0000 Subject: [PATCH] Check for correct soulshot grade. --- .../scripts/handlers/itemhandlers/BlessedSoulShots.java | 7 +++++++ .../scripts/handlers/itemhandlers/BlessedSpiritShot.java | 7 +++++++ .../game/data/scripts/handlers/itemhandlers/SoulShots.java | 7 +++++++ .../data/scripts/handlers/itemhandlers/SpiritShot.java | 7 +++++++ .../scripts/handlers/itemhandlers/BlessedSoulShots.java | 7 +++++++ .../scripts/handlers/itemhandlers/BlessedSpiritShot.java | 7 +++++++ .../game/data/scripts/handlers/itemhandlers/SoulShots.java | 7 +++++++ .../data/scripts/handlers/itemhandlers/SpiritShot.java | 7 +++++++ .../scripts/handlers/itemhandlers/BlessedSoulShots.java | 7 +++++++ .../scripts/handlers/itemhandlers/BlessedSpiritShot.java | 7 +++++++ .../game/data/scripts/handlers/itemhandlers/SoulShots.java | 7 +++++++ .../data/scripts/handlers/itemhandlers/SpiritShot.java | 7 +++++++ .../scripts/handlers/itemhandlers/BlessedSoulShots.java | 7 +++++++ .../scripts/handlers/itemhandlers/BlessedSpiritShot.java | 7 +++++++ .../game/data/scripts/handlers/itemhandlers/SoulShots.java | 7 +++++++ .../data/scripts/handlers/itemhandlers/SpiritShot.java | 7 +++++++ 16 files changed, 112 insertions(+) diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java index 9da3b6cfd7..bf5df0fee6 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -67,6 +68,12 @@ public class BlessedSoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.BLESSED_SOULSHOTS)) { diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java index f8e9fb8786..bf2a8dbab8 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class BlessedSpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume Blessed SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java index 3c8cbb15c4..27292e9117 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -64,6 +65,12 @@ public class SoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.SOULSHOTS)) { diff --git a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java index e1f09a5a72..8d89371f56 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_07.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class SpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java index 9da3b6cfd7..bf5df0fee6 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -67,6 +68,12 @@ public class BlessedSoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.BLESSED_SOULSHOTS)) { diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java index f8e9fb8786..bf2a8dbab8 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class BlessedSpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume Blessed SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java index 3c8cbb15c4..27292e9117 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -64,6 +65,12 @@ public class SoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.SOULSHOTS)) { diff --git a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java index e1f09a5a72..8d89371f56 100644 --- a/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_08.2_Homunculus/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class SpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java index 9da3b6cfd7..bf5df0fee6 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -67,6 +68,12 @@ public class BlessedSoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.BLESSED_SOULSHOTS)) { diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java index f8e9fb8786..bf2a8dbab8 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class BlessedSpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume Blessed SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java index 3c8cbb15c4..27292e9117 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -64,6 +65,12 @@ public class SoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.SOULSHOTS)) { diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java index e1f09a5a72..8d89371f56 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class SpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java index a265b94b27..c4b6530d85 100644 --- a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -67,6 +68,12 @@ public class BlessedSoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.BLESSED_SOULSHOTS)) { diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java index 3020b0cb7f..2635109217 100644 --- a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class BlessedSpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume Blessed SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java index 38bc044cb6..ec26ef96e7 100644 --- a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java @@ -27,6 +27,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -64,6 +65,12 @@ public class SoulShots implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SOULSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Check if Soul shot is already active if (player.isChargedShot(ShotType.SOULSHOTS)) { diff --git a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java index 4f80a8618c..9b0ce21961 100644 --- a/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_10.0_MasterClass/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java @@ -26,6 +26,7 @@ import org.l2jmobius.gameserver.model.actor.Player; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.item.Weapon; import org.l2jmobius.gameserver.model.item.instance.Item; +import org.l2jmobius.gameserver.model.item.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -69,6 +70,12 @@ public class SpiritShot implements IItemHandler return false; } + // Check for correct grade + if (!item.isEtcItem() || (item.getEtcItem().getDefaultAction() != ActionType.SPIRITSHOT) || (weaponInst.getItem().getCrystalTypePlus() != item.getItem().getCrystalTypePlus())) + { + return false; + } + // Consume SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) {