Check for correct soulshot grade.

This commit is contained in:
MobiusDevelopment 2022-01-08 00:06:41 +00:00
parent 15340f4024
commit 9f8122b1ea
16 changed files with 112 additions and 0 deletions

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{

View File

@ -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))
{