Proper method name for returning item location.
This commit is contained in:
@@ -498,7 +498,7 @@ public class CreatureAI extends AbstractAI
|
||||
return;
|
||||
}
|
||||
|
||||
if ((object instanceof ItemInstance) && (((ItemInstance) object).getLocation() != ItemLocation.VOID))
|
||||
if ((object instanceof ItemInstance) && (((ItemInstance) object).getItemLocation() != ItemLocation.VOID))
|
||||
{
|
||||
// Cancel action client side by sending Server->Client packet ActionFailed to the PlayerInstance actor
|
||||
clientActionFailed();
|
||||
|
@@ -292,7 +292,7 @@ public class AdminCreateItem implements IAdminCommandHandler
|
||||
{
|
||||
for (ItemInstance item : activeChar.getInventory().getItems())
|
||||
{
|
||||
if (item.getLocation() == ItemInstance.ItemLocation.INVENTORY)
|
||||
if (item.getItemLocation() == ItemInstance.ItemLocation.INVENTORY)
|
||||
{
|
||||
activeChar.getInventory().destroyItem("Destroy", item.getObjectId(), item.getCount(), activeChar, null);
|
||||
}
|
||||
|
@@ -245,7 +245,7 @@ public class SummonItems implements IItemHandler
|
||||
_player.sendPacket(new MagicSkillLaunched(_player, 2046, 1));
|
||||
|
||||
// check for summon item validity
|
||||
if ((_item == null) || (_item.getOwnerId() != _player.getObjectId()) || (_item.getLocation() != ItemInstance.ItemLocation.INVENTORY))
|
||||
if ((_item == null) || (_item.getOwnerId() != _player.getObjectId()) || (_item.getItemLocation() != ItemInstance.ItemLocation.INVENTORY))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -123,7 +123,7 @@ public class PlayerFreight extends ItemContainer
|
||||
super.addItem(item);
|
||||
if (_activeLocationId > 0)
|
||||
{
|
||||
item.setLocation(item.getLocation(), _activeLocationId);
|
||||
item.setLocation(item.getItemLocation(), _activeLocationId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -214,10 +214,10 @@ public final class ItemInstance extends WorldObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the location.
|
||||
* @return the location
|
||||
* Gets the item location.
|
||||
* @return the item location
|
||||
*/
|
||||
public ItemLocation getLocation()
|
||||
public ItemLocation getItemLocation()
|
||||
{
|
||||
return _loc;
|
||||
}
|
||||
@@ -1080,7 +1080,7 @@ public final class ItemInstance extends WorldObject
|
||||
inst._mana = manaLeft;
|
||||
|
||||
// consume 1 mana
|
||||
if ((inst._mana > 0) && (inst.getLocation() == ItemLocation.PAPERDOLL))
|
||||
if ((inst._mana > 0) && (inst.getItemLocation() == ItemLocation.PAPERDOLL))
|
||||
{
|
||||
inst.decreaseMana(false);
|
||||
}
|
||||
@@ -1096,7 +1096,7 @@ public final class ItemInstance extends WorldObject
|
||||
|
||||
return null;
|
||||
}
|
||||
else if ((inst._mana > 0) && (inst.getLocation() == ItemLocation.PAPERDOLL))
|
||||
else if ((inst._mana > 0) && (inst.getItemLocation() == ItemLocation.PAPERDOLL))
|
||||
{
|
||||
inst.scheduleConsumeManaTask();
|
||||
}
|
||||
|
@@ -339,7 +339,7 @@ public class PetInstance extends Summon
|
||||
{
|
||||
for (ItemInstance item : _inventory.getItems())
|
||||
{
|
||||
if ((item.getLocation() == ItemInstance.ItemLocation.PET_EQUIP) && (item.getItem().getBodyPart() == Item.SLOT_R_HAND))
|
||||
if ((item.getItemLocation() == ItemInstance.ItemLocation.PET_EQUIP) && (item.getItem().getBodyPart() == Item.SLOT_R_HAND))
|
||||
{
|
||||
return item;
|
||||
}
|
||||
|
@@ -630,7 +630,7 @@ public final class RequestEnchantItem extends GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if ((item.getLocation() != ItemInstance.ItemLocation.INVENTORY) && (item.getLocation() != ItemInstance.ItemLocation.PAPERDOLL))
|
||||
if ((item.getItemLocation() != ItemInstance.ItemLocation.INVENTORY) && (item.getItemLocation() != ItemInstance.ItemLocation.PAPERDOLL))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION);
|
||||
return;
|
||||
|
@@ -72,7 +72,7 @@ public class ItemsAutoDestroy
|
||||
|
||||
for (ItemInstance item : _items)
|
||||
{
|
||||
if ((item == null) || (item.getDropTime() == 0) || (item.getLocation() != ItemInstance.ItemLocation.VOID))
|
||||
if ((item == null) || (item.getDropTime() == 0) || (item.getItemLocation() != ItemInstance.ItemLocation.VOID))
|
||||
{
|
||||
_items.remove(item);
|
||||
}
|
||||
|
@@ -1046,7 +1046,7 @@ public class GameStatusThread extends Thread
|
||||
}
|
||||
if (obj instanceof ItemInstance)
|
||||
{
|
||||
if (((ItemInstance) obj).getLocation() == ItemInstance.ItemLocation.VOID)
|
||||
if (((ItemInstance) obj).getItemLocation() == ItemInstance.ItemLocation.VOID)
|
||||
{
|
||||
itemVoidCount++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user