Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShots.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShots.java
- index 811c592..bc745a2 100644
- --- a/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShots.java
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSoulShots.java
- @@ -46,7 +46,8 @@
- return;
- // If the player doesn't have enough beast soulshot remaining, remove any auto soulshot task.
- - if (!player.destroyItemWithoutTrace(item.getObjectId(), summon.getSoulShotsPerHit()))
- + if (!item.getItem().isInfinity() && !player.destroyItemWithoutTrace(item.getObjectId(), summon.getSoulShotsPerHit()))
- +
- {
- if (!player.disableAutoShot(item.getItemId()))
- player.sendPacket(SystemMessageId.NOT_ENOUGH_SOULSHOTS_FOR_PET);
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShots.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShots.java
- index c6ebfb9..5edec8f 100644
- --- a/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShots.java
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/BeastSpiritShots.java
- @@ -48,7 +48,7 @@
- if (summon.isChargedShot(isBlessed ? ShotType.BLESSED_SPIRITSHOT : ShotType.SPIRITSHOT))
- return;
- - if (!player.destroyItemWithoutTrace(item.getObjectId(), summon.getSpiritShotsPerHit()))
- + if (!item.getItem().isInfinity() && !player.destroyItemWithoutTrace(item.getObjectId(), summon.getSpiritShotsPerHit()))
- {
- if (!player.disableAutoShot(itemId))
- player.sendPacket(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS_FOR_PET);
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShots.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShots.java
- index 82a2017..d5a518b 100644
- --- a/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShots.java
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/BlessedSpiritShots.java
- @@ -45,7 +45,7 @@
- }
- // Consume bss if player has enough of them
- - if (!player.destroyItemWithoutTrace(item.getObjectId(), weaponItem.getSpiritShotCount()))
- + if (!item.getItem().isInfinity() && !player.destroyItemWithoutTrace(item.getObjectId(), weaponItem.getSpiritShotCount()))
- {
- if (!player.disableAutoShot(item.getItemId()))
- player.sendPacket(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS);
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java
- index c850b01..4bcb122 100644
- --- a/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/SoulShots.java
- @@ -50,7 +50,7 @@
- if (weaponItem.getReducedSoulShot() > 0 && Rnd.get(100) < weaponItem.getReducedSoulShotChance())
- ssCount = weaponItem.getReducedSoulShot();
- - if (!player.destroyItemWithoutTrace(item.getObjectId(), ssCount))
- + if (!item.getItem().isInfinity() && !player.destroyItemWithoutTrace(item.getObjectId(), ssCount))
- {
- if (!player.disableAutoShot(item.getItemId()))
- player.sendPacket(SystemMessageId.NOT_ENOUGH_SOULSHOTS);
- diff --git a/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShots.java b/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShots.java
- index 9577cf5..af644ee 100644
- --- a/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShots.java
- +++ b/java/net/sf/l2j/gameserver/handler/itemhandlers/SpiritShots.java
- @@ -44,7 +44,7 @@
- }
- // Consume sps if player has enough of them
- - if (!player.destroyItemWithoutTrace(item.getObjectId(), weaponItem.getSpiritShotCount()))
- + if (!item.getItem().isInfinity() && !player.destroyItemWithoutTrace(item.getObjectId(), weaponItem.getSpiritShotCount()))
- {
- if (!player.disableAutoShot(item.getItemId()))
- player.sendPacket(SystemMessageId.NOT_ENOUGH_SPIRITSHOTS);
- diff --git a/java/net/sf/l2j/gameserver/model/actor/attack/CreatureAttack.java b/java/net/sf/l2j/gameserver/model/actor/attack/CreatureAttack.java
- index ca6a4b7..3ac8afb 100644
- --- a/java/net/sf/l2j/gameserver/model/actor/attack/CreatureAttack.java
- +++ b/java/net/sf/l2j/gameserver/model/actor/attack/CreatureAttack.java
- @@ -333,6 +333,7 @@
- */
- private HitHolder[] doAttackHitByBow(Attack attack, Creature target, int sAtk, Weapon weapon)
- {
- + if (!weapon.isInfinity())
- _actor.reduceArrowCount();
- _actor.getStatus().reduceMp(_actor.getActiveWeaponItem().getMpConsume());
- diff --git a/java/net/sf/l2j/gameserver/model/item/kind/Item.java b/java/net/sf/l2j/gameserver/model/item/kind/Item.java
- index ca4ba59..c2094bd 100644
- --- a/java/net/sf/l2j/gameserver/model/item/kind/Item.java
- +++ b/java/net/sf/l2j/gameserver/model/item/kind/Item.java
- @@ -115,7 +115,7 @@
- private final int _bodyPart;
- private final int _referencePrice;
- private final int _crystalCount;
- -
- + private final boolean _infinity;
- private final boolean _sellable;
- private final boolean _dropable;
- private final boolean _destroyable;
- @@ -155,13 +155,17 @@
- _heroItem = (_itemId >= 6611 && _itemId <= 6621) || _itemId == 6842;
- _isOlyRestricted = set.getBool("is_oly_restricted", false);
- -
- + _infinity = set.getBool("is_infinity", true);
- _defaultAction = set.getEnum("default_action", ActionType.class, ActionType.none);
- if (set.containsKey("item_skill"))
- _skillHolder = set.getIntIntHolderArray("item_skill");
- }
- -
- + public final boolean isInfinity()
- + {
- + return _infinity;
- + }
- +
- /**
- * @return Enum the itemType.
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement