Check for correct soulshot grade.
This commit is contained in:
parent
15340f4024
commit
9f8122b1ea
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user