RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.game.world.items.Item Class Reference

The container class that represents an item that can be interacted with. More...

Inheritance diagram for com.runehive.game.world.items.Item:
Collaboration diagram for com.runehive.game.world.items.Item:

Public Member Functions

Item clone ()
Item copy ()
 A substitute for Object#clone() that creates another 'copy' of this instance.
Item createAndDecrement (int removeAmount)
 Creates a new item with amount - removeAmount and the same identifier.
Item createAndIncrement (int addAmount)
 Creates a new item with amount + addAmount and the same identifier.
Item createWithAmount (int newAmount)
 Creates a new item with newAmount and the same identifier as this instance.
Item createWithId (int newId)
 Creates a new item with newId and the same amount as this instance.
final void decrementAmount ()
 Decrements the amount by 1.
final void decrementAmountBy (int amount)
 Decrements the amount by amount @endiliteral.

boolean equalIds (Item other)
boolean equals (Object obj)
final int getAmount ()
 Gets the quantity of this item.
OptionalInt getAttackAnimation (FightType type)
int getBaseValue ()
OptionalInt getBlockAnimation ()
int getBonus (int index)
int[] getBonuses ()
ItemDefinition getDefinition ()
 Gets the item definition for the item identifier.
String getDestroyMessage ()
EquipmentType getEquipmentType ()
int getHighAlch ()
final int getId ()
 Gets the identification of this item.
int getLowAlch ()
String getName ()
int getNotedId ()
Optional< RangedWeaponDefinitiongetRangedDefinition ()
int[] getRequirements ()
int getRunAnimation ()
int getSellValue ()
int getStandAnimation ()
int getStreetValue ()
int getUnnotedId ()
int getValue ()
 Gets the value for this item.
int getValue (PriceType type)
 Gets the value for this item.
int getWalkAnimation ()
WeaponInterface getWeaponInterface ()
double getWeight ()
int hashCode ()
final void incrementAmount ()
 Increments the amount by 1.
final void incrementAmountBy (int amount)
 Increments the amount by amount.
boolean isDestroyable ()
boolean isEquipable ()
boolean isNoteable ()
boolean isNoted ()
boolean isStackable ()
boolean isTradeable ()
boolean isTwoHanded ()
 Item (int id)
 Creates a new Item with an quantity of 1.
 Item (int id, int amount)
 Creates a new Item.
 Item (int id, int minAmt, int maxAmt)
 Creates a new Item with a random amount between minAmt and maxAmt.
 Item (int id, long amount)
boolean matchesId (int id)
Item noted ()
 Gets the item note item.
final void setAmount (int amount)
 Sets the quantity of this item.
final void setId (int id)
 Sets the identification of this item.
final String toString ()
Item unnoted ()
 Gets the unnoted item.

Static Public Member Functions

static final Item[] convert (int... id)
 Converts an int array into an Item array.
static final int[] convert (Item... ids)
 Converts an Item array into an Integer array.
static boolean valid (Item item)
 Determines if item is valid.

Private Attributes

int amount
 The quantity of this item.
int id
 The identification of this item.

Detailed Description

The container class that represents an item that can be interacted with.

Author
lare96 http://github.com/lare96

Definition at line 21 of file Item.java.

Constructor & Destructor Documentation

◆ Item() [1/4]

com.runehive.game.world.items.Item.Item ( int id,
int amount )

Creates a new Item.

Definition at line 36 of file Item.java.

36 {
37 if (amount < 0) amount = 0;
38 this.id = id;
39 this.amount = amount;
40 }

References amount, and id.

Referenced by clone(), convert(), convert(), copy(), createAndDecrement(), createAndIncrement(), createWithAmount(), createWithId(), equalIds(), equals(), noted(), unnoted(), and valid().

Here is the caller graph for this function:

◆ Item() [2/4]

com.runehive.game.world.items.Item.Item ( int id,
int minAmt,
int maxAmt )

Creates a new Item with a random amount between minAmt and maxAmt.

Definition at line 45 of file Item.java.

45 {
46 if (minAmt < 0 || maxAmt < 0) amount = 0;
47 this.id = id;
48 this.amount = Utility.random(minAmt, maxAmt, true);
49 }

References amount, id, and com.runehive.util.Utility.random().

Here is the call graph for this function:

◆ Item() [3/4]

com.runehive.game.world.items.Item.Item ( int id,
long amount )

Definition at line 51 of file Item.java.

51 {
52 int amount2;
53 if (amount < 0) {
54 amount2 = 0;
55 } else if (amount > Integer.MAX_VALUE) {
56 amount2 = Integer.MAX_VALUE;
57 } else {
58 amount2 = (int) amount;
59 }
60 this.id = id;
61 this.amount = amount2;
62 }

References amount, and id.

◆ Item() [4/4]

com.runehive.game.world.items.Item.Item ( int id)

Creates a new Item with an quantity of 1.

Parameters
idthe identification of this item.

Definition at line 220 of file Item.java.

220 {
221 this(id, 1);
222 }

References id.

Member Function Documentation

◆ clone()

Item com.runehive.game.world.items.Item.clone ( )

Definition at line 64 of file Item.java.

64 {
65 try {
66 return (Item) super.clone();
67 } catch (CloneNotSupportedException e) {
68 e.printStackTrace();
69 }
70 return this;
71 }

References Item().

Referenced by createAndDecrement(), createAndIncrement(), com.runehive.content.lms.LMSGame.giveItems(), com.runehive.content.lms.lobby.LMSLobby.joinLobby(), com.runehive.content.lms.lobby.LMSLobby.leaveLobby(), and com.runehive.content.lms.LMSGame.reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert() [1/2]

final Item[] com.runehive.game.world.items.Item.convert ( int... id)
static

Converts an int array into an Item array.

Parameters
idthe array to convert into an item array.
Returns
the item array containing the values from the int array.

Definition at line 244 of file Item.java.

244 {
245 List<Item> items = new ArrayList<>();
246 for (int identifier : id) {
247 items.add(new Item(identifier));
248 }
249 return Iterables.toArray(items, Item.class);
250 }

References Item().

Here is the call graph for this function:

◆ convert() [2/2]

final int[] com.runehive.game.world.items.Item.convert ( Item... ids)
static

Converts an Item array into an Integer array.

Parameters
idsthe array to convert into an Integer array.
Returns
the Integer array containing the values from the item array.

Definition at line 230 of file Item.java.

230 {
231 List<Integer> values = new ArrayList<>();
232 for (Item identifier : ids) {
233 values.add(identifier.getId());
234 }
235 return values.stream().mapToInt(Integer::intValue).toArray();
236 }

References Item().

Here is the call graph for this function:

◆ copy()

Item com.runehive.game.world.items.Item.copy ( )

A substitute for Object#clone() that creates another 'copy' of this instance.

The created copy safe meaning it does not hold any references to the original instance.

Returns
the copy of this instance that does not hold any references.

Reimplemented in com.runehive.content.store.StoreItem.

Definition at line 270 of file Item.java.

270 {
271 return new Item(id, amount);
272 }

References amount, and Item().

Referenced by com.runehive.game.world.items.containers.ItemContainer.add(), com.runehive.content.itemaction.impl.MagmaHelm.charge(), com.runehive.content.itemaction.impl.SerpentineHelm.charge(), com.runehive.content.itemaction.impl.TanzaniteHelm.charge(), com.runehive.content.itemaction.impl.ToxicBlowpipe.charge(), com.runehive.game.world.items.containers.bank.Bank.depositFromNothing(), and com.runehive.content.preset.PresetManager.inventory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createAndDecrement()

Item com.runehive.game.world.items.Item.createAndDecrement ( int removeAmount)

Creates a new item with amount - removeAmount and the same identifier.

The returned Item does not hold any references to this one. It will also have a minimum amount of 1.

Parameters
removeAmountThe amount to withdraw.
Returns
The newly incremented Item.

Definition at line 198 of file Item.java.

198 {
199 if (removeAmount < 0) { // Same effect as incrementing.
200 return createAndIncrement(-removeAmount);
201 }
202
203 int newAmount = amount - removeAmount;
204
205 // Value too low, or an overflow.
206 if (newAmount < 1 || newAmount > amount) {
207 newAmount = 1;
208 }
209
210 Item clone = clone();
211 clone.setAmount(newAmount);
212 return clone;
213 }

References amount, clone(), createAndIncrement(), and Item().

Referenced by createAndIncrement(), and com.runehive.game.world.items.containers.ItemContainer.remove().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createAndIncrement()

Item com.runehive.game.world.items.Item.createAndIncrement ( int addAmount)

Creates a new item with amount + addAmount and the same identifier.

The returned Item does not hold any references to this one. It will also have a maximum amount of
Integer.MAX_VALUE
.

Parameters
addAmountThe amount to deposit.
Returns
The newly incremented Item.

Definition at line 174 of file Item.java.

174 {
175 if (addAmount < 0) { // Same effect as decrementing.
176 return createAndDecrement(Math.abs(addAmount));
177 }
178
179 int newAmount = amount + addAmount;
180
181 if (newAmount < amount) { // An overflow.
182 newAmount = Integer.MAX_VALUE;
183 }
184
185 Item item = clone();
186 item.setAmount(newAmount);
187 return item;
188 }

References amount, clone(), createAndDecrement(), Item(), and setAmount().

Referenced by com.runehive.game.world.items.containers.ItemContainer.add(), createAndDecrement(), and com.runehive.game.world.items.containers.equipment.Equipment.equip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createWithAmount()

Item com.runehive.game.world.items.Item.createWithAmount ( int newAmount)

Creates a new item with newAmount and the same identifier as this instance.

The returned Item does not hold any references to this one unless amount == newAmount. It will throw an exception on overflows and negative values.

Parameters
newAmountThe new amount to set.
Returns
The newly amount set Item.

Definition at line 158 of file Item.java.

158 {
159 if (amount == newAmount) {
160 return this;
161 }
162 return new Item(id, newAmount);
163 }

References amount, and Item().

Referenced by com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.game.world.items.containers.ItemContainer.remove(), com.runehive.game.world.entity.combat.strategy.player.custom.ToxicBlowpipeStrategy.removeAmmunition(), and com.runehive.game.world.items.containers.impl.LootingBag.withdrawBank().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createWithId()

Item com.runehive.game.world.items.Item.createWithId ( int newId)

Creates a new item with newId and the same amount as this instance.

The returned Item does not hold any references to this one unless id == newId. It will throw an exception on an invalid id.

Parameters
newIdThe new id to set.
Returns
The newly id set Item.

Definition at line 142 of file Item.java.

142 {
143 if (id == newId) {
144 return this;
145 }
146 return new Item(newId, amount);
147 }

References amount, and Item().

Referenced by com.runehive.game.world.items.containers.ItemContainer.replace(), and com.runehive.game.world.items.containers.ItemContainer.replace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decrementAmount()

final void com.runehive.game.world.items.Item.decrementAmount ( )

Decrements the amount by 1.

Definition at line 284 of file Item.java.

284 {
285 decrementAmountBy(1);
286 }

References decrementAmountBy().

Referenced by com.runehive.game.world.entity.combat.strategy.player.custom.ToxicBlowpipeStrategy.removeAmmunition(), and com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.removeAmmunition().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decrementAmountBy()

final void com.runehive.game.world.items.Item.decrementAmountBy ( int amount)

Decrements the amount by amount @endiliteral.

Parameters
amountthe amount to decrement by.

Definition at line 302 of file Item.java.

302 {
303 if ((this.amount - amount) < 1) {
304 this.amount = 0;
305 } else {
306 this.amount -= amount;
307 }
308 }

References amount.

Referenced by decrementAmount(), com.runehive.content.store.impl.PersonalStore.remove(), and com.runehive.content.store.impl.DefaultStore.StoreRestockTask.restock().

Here is the caller graph for this function:

◆ equalIds()

boolean com.runehive.game.world.items.Item.equalIds ( Item other)

Definition at line 461 of file Item.java.

461 {
462 return other != null && id == other.id;
463 }

References id, and Item().

Referenced by com.runehive.content.skill.impl.crafting.Crafting.useItem(), and com.runehive.content.skill.impl.fletching.Fletching.useItem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ equals()

boolean com.runehive.game.world.items.Item.equals ( Object obj)

Definition at line 475 of file Item.java.

475 {
476 if (obj instanceof Item) {
477 Item other = (Item) obj;
478 return other.id == id && other.amount == amount;
479 }
480 return false;
481 }

References amount, and Item().

Referenced by com.runehive.game.world.items.ground.GroundItem.equals(), com.runehive.content.itemaction.impl.MagmaHelm.itemOnItem(), com.runehive.content.itemaction.impl.SerpentineHelm.itemOnItem(), and com.runehive.content.itemaction.impl.TanzaniteHelm.itemOnItem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAmount()

final int com.runehive.game.world.items.Item.getAmount ( )

Gets the quantity of this item.

Returns
the quantity.

Definition at line 342 of file Item.java.

342 {
343 return amount;
344 }

References amount.

Referenced by com.runehive.content.store.impl.PersonalStore.add(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.add(), com.runehive.game.world.items.containers.ItemContainer.add(), com.runehive.game.world.items.ground.GroundItem.addToRegion(), com.runehive.content.RoyaltyProgram.append(), com.runehive.game.world.entity.combat.strategy.player.custom.ToxicBlowpipeStrategy.canAttack(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.canAttack(), com.runehive.content.itemaction.impl.MagmaHelm.charge(), com.runehive.content.itemaction.impl.SerpentineHelm.charge(), com.runehive.content.itemaction.impl.TanzaniteHelm.charge(), com.runehive.content.itemaction.impl.ToxicBlowpipe.charge(), com.runehive.content.itemaction.impl.ToxicBlowpipe.check(), com.runehive.game.world.items.ItemComparator.compare(), com.runehive.game.world.items.containers.ItemContainer.computeIndexCount(), com.runehive.content.skill.impl.magic.RunePouch.contains(), com.runehive.game.world.items.containers.ItemContainer.contains(), com.runehive.content.store.StoreItem.copy(), com.runehive.game.world.items.containers.bank.Bank.deposit(), com.runehive.game.world.items.containers.impl.LostUntradeables.deposit(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.depositAll(), com.runehive.game.world.items.containers.bank.Bank.depositeEquipment(), com.runehive.game.world.items.containers.bank.Bank.depositeInventory(), com.runehive.game.world.items.containers.bank.Bank.depositFromNothing(), com.runehive.game.world.items.containers.impl.LootingBag.depositMenu(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.game.world.items.containers.equipment.Equipment.equip(), com.runehive.content.activity.impl.barrows.BarrowsUtility.generateRewards(), com.runehive.content.activity.impl.duelarena.DuelUtils.getItemNames(), com.runehive.net.packet.in.ExaminePacketListener.handleInterfaceExamine(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.content.preset.PresetManager.inventory(), com.runehive.content.lms.lobby.LMSLobby.joinLobby(), com.runehive.content.lms.lobby.LMSLobby.leaveLobby(), com.runehive.content.itemaction.impl.ToxicBlowpipe.load(), com.runehive.content.bot.BotUtility.logLoot(), com.runehive.content.store.impl.PersonalStore.onPurchase(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.onRefresh(), com.runehive.content.ItemsKeptOnDeath.open(), com.runehive.content.RoyaltyProgram.open(), com.runehive.content.store.Store.purchase(), com.runehive.content.store.impl.PersonalStore.remove(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.remove(), com.runehive.game.world.items.containers.ItemContainer.remove(), com.runehive.game.world.entity.combat.strategy.player.custom.ToxicBlowpipeStrategy.removeAmmunition(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.removeAmmunition(), com.runehive.content.store.impl.DefaultStore.StoreRestockTask.restock(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.rollDrop(), com.runehive.game.world.items.containers.ItemContainer.search(), com.runehive.content.store.Store.sell(), com.runehive.game.world.items.containers.bank.Bank.sendValue(), com.runehive.content.store.impl.PersonalStore.setValue(), com.runehive.content.clanchannel.channel.ClanChannel.splitLoot(), com.runehive.content.skill.impl.crafting.Crafting.start(), com.runehive.content.skill.impl.fletching.Fletching.start(), com.runehive.content.skill.impl.slayer.Slayer.store(), com.runehive.content.itemaction.impl.MagmaHelm.uncharge(), com.runehive.content.itemaction.impl.SerpentineHelm.uncharge(), com.runehive.content.itemaction.impl.TanzaniteHelm.uncharge(), com.runehive.content.itemaction.impl.ToxicBlowpipe.uncharge(), com.runehive.content.gambling.GambleManager.withdraw(), com.runehive.game.world.items.containers.bank.Bank.withdraw(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.withdraw(), and com.runehive.game.world.items.containers.impl.LootingBag.withdrawBank().

Here is the caller graph for this function:

◆ getAttackAnimation()

OptionalInt com.runehive.game.world.items.Item.getAttackAnimation ( FightType type)

Definition at line 405 of file Item.java.

405 {
406 return getDefinition().getAttackAnimation(type);
407 }

References getDefinition().

Here is the call graph for this function:

◆ getBaseValue()

int com.runehive.game.world.items.Item.getBaseValue ( )

Definition at line 425 of file Item.java.

425 {
426 return getDefinition().getBaseValue();
427 }

References getDefinition().

Here is the call graph for this function:

◆ getBlockAnimation()

OptionalInt com.runehive.game.world.items.Item.getBlockAnimation ( )

Definition at line 409 of file Item.java.

409 {
410 return getDefinition().getBlockAnimation();
411 }

References getDefinition().

Referenced by com.runehive.game.world.entity.combat.CombatUtil.getBlockAnimation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBonus()

int com.runehive.game.world.items.Item.getBonus ( int index)

Definition at line 457 of file Item.java.

457 {
458 return getDefinition().getBonuses()[index];
459 }
val index

References getDefinition().

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.addBonus(), and com.runehive.game.world.items.containers.equipment.Equipment.removeBonus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBonuses()

int[] com.runehive.game.world.items.Item.getBonuses ( )

Definition at line 453 of file Item.java.

453 {
454 return getDefinition().getBonuses();
455 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.addBonus(), and com.runehive.game.world.items.containers.equipment.Equipment.removeBonus().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDefinition()

ItemDefinition com.runehive.game.world.items.Item.getDefinition ( )

◆ getDestroyMessage()

String com.runehive.game.world.items.Item.getDestroyMessage ( )

Definition at line 360 of file Item.java.

360 {
361 return getDefinition().getDestroyMessage();
362 }

References getDefinition(), and com.runehive.game.world.items.ItemDefinition.getDestroyMessage().

Here is the call graph for this function:

◆ getEquipmentType()

EquipmentType com.runehive.game.world.items.Item.getEquipmentType ( )

Definition at line 441 of file Item.java.

441 {
442 return getDefinition().getEquipmentType();
443 }

References getDefinition().

Referenced by com.runehive.net.packet.out.SendPlayerUpdate.appendAppearanceMask(), com.runehive.game.world.items.containers.equipment.Equipment.equip(), com.runehive.net.packet.in.WieldItemPacketListener.handlePacket(), com.runehive.game.world.items.containers.equipment.Equipment.manualWear(), com.runehive.game.world.items.containers.equipment.Equipment.onEquip(), com.runehive.game.world.items.containers.equipment.Equipment.onRemove(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), and com.runehive.game.world.items.containers.equipment.Equipment.unEquip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getHighAlch()

int com.runehive.game.world.items.Item.getHighAlch ( )

Definition at line 429 of file Item.java.

429 {
430 return getDefinition().getHighAlch();
431 }

References getDefinition().

Referenced by com.runehive.content.skill.impl.magic.spell.impl.HighAlchemy.execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getId()

final int com.runehive.game.world.items.Item.getId ( )

Gets the identification of this item.

Returns
the identification.

Definition at line 324 of file Item.java.

324 {
325 return id;
326 }

References id.

Referenced by com.runehive.content.prestige.Prestige.activatePerk(), com.runehive.content.store.impl.PersonalStore.add(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.add(), com.runehive.game.world.items.containers.ItemContainer.add(), com.runehive.content.skill.impl.crafting.Crafting.addCraftable(), com.runehive.content.skill.impl.fletching.Fletching.addFletchable(), com.runehive.content.RoyaltyProgram.append(), com.runehive.net.packet.out.SendPlayerUpdate.appendAppearanceMask(), com.runehive.game.world.entity.combat.strategy.player.special.CombatSpecial.assign(), com.runehive.content.pet.Pets.buyInsurance(), com.runehive.game.world.items.containers.impl.LostUntradeables.claim(), com.runehive.content.mysterybox.MysteryBoxManager.click(), com.runehive.content.skill.impl.crafting.Crafting.clickButton(), com.runehive.content.skill.impl.herblore.Herblore.clickItem(), com.runehive.content.skill.impl.hunter.Hunter.clickItem(), com.runehive.content.skill.impl.prayer.BoneSacrifice.clickItem(), com.runehive.content.skill.impl.runecrafting.Runecraft.clickItem(), com.runehive.content.skill.impl.firemaking.Firemaking.clickObject(), com.runehive.game.world.items.ItemComparator.compare(), com.runehive.game.world.items.containers.ItemContainer.computeIdForIndex(), com.runehive.content.skill.impl.slayer.SlayerOfferings.confirm(), com.runehive.content.skill.impl.magic.RunePouch.contains(), com.runehive.game.world.items.containers.ItemContainer.contains(), com.runehive.content.store.StoreItem.copy(), com.runehive.content.skill.impl.magic.RunePouch.death(), com.runehive.content.skill.impl.runecrafting.RunecraftPouch.death(), com.runehive.content.overrides.Overrides.deleteOverride(), com.runehive.content.skill.impl.magic.RunePouch.deposit(), com.runehive.game.world.items.containers.bank.Bank.deposit(), com.runehive.game.world.items.containers.bank.DonatorDeposit.deposit(), com.runehive.game.world.items.containers.impl.LootingBag.deposit(), com.runehive.game.world.items.containers.impl.LostUntradeables.deposit(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.deposit(), com.runehive.game.world.items.containers.bank.Bank.depositeInventory(), com.runehive.content.itemaction.impl.CelestialRing.drop(), com.runehive.content.itemaction.impl.CrawsBow.drop(), com.runehive.content.itemaction.impl.ThammaronsSceptre.drop(), com.runehive.content.itemaction.impl.ViggorasChainmace.drop(), com.runehive.content.itemaction.ItemActionRepository.drop(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.game.world.items.containers.equipment.Equipment.equip(), com.runehive.game.world.items.containers.equipment.Equipment.equip(), com.runehive.content.itemaction.impl.CelestialRing.equipment(), com.runehive.content.itemaction.impl.CrawsBow.equipment(), com.runehive.content.itemaction.impl.ThammaronsSceptre.equipment(), com.runehive.content.itemaction.impl.TridentOfTheSeas.equipment(), com.runehive.content.itemaction.impl.TridentOfTheSwamp.equipment(), com.runehive.content.itemaction.impl.ViggorasChainmace.equipment(), com.runehive.content.itemaction.ItemActionRepository.equipment(), com.runehive.content.overrides.Overrides.equipOverride(), com.runehive.content.skill.impl.magic.spell.impl.HighAlchemy.execute(), com.runehive.content.skill.impl.magic.spell.impl.LowAlchemy.execute(), com.runehive.content.skill.impl.magic.spell.impl.SuperHeat.execute(), com.runehive.game.world.entity.combat.ranged.RangedAmmunition.find(), com.runehive.content.skill.impl.smithing.SmithingArmour.forge(), com.runehive.content.ItemCreation.CreationData.forItem(), com.runehive.content.ItemCreation.CreationData.forItems(), com.runehive.game.world.entity.combat.CombatUtil.generateDragonfire(), com.runehive.content.activity.impl.barrows.BarrowsUtility.generateRewards(), com.runehive.content.skill.impl.smithing.SmeltingData.getDefinitionByItem(), com.runehive.content.consume.PotionData.getReplacementItem(), com.runehive.game.world.entity.mob.player.PlayerAssistant.getStrategy(), com.runehive.game.world.entity.mob.player.PlayerKilling.handle(), com.runehive.net.packet.in.ItemOptionPacketListener.handleFirstOption(), com.runehive.net.packet.in.ExaminePacketListener.handleInterfaceExamine(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMessages(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.net.packet.in.WieldItemPacketListener.handlePacket(), com.runehive.net.packet.in.ItemOptionPacketListener.handleSecondOption(), com.runehive.net.packet.in.ItemOptionPacketListener.handleThirdOption(), com.runehive.game.world.entity.combat.magic.MagicRune.hasRunes(), com.runehive.content.wintertodt.Wintertodt.healPyromancer(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.hit(), com.runehive.content.itemaction.impl.CelestialRing.inventory(), com.runehive.content.itemaction.impl.ClanShowcaseBox.inventory(), com.runehive.content.itemaction.impl.CrawsBow.inventory(), com.runehive.content.itemaction.impl.ThammaronsSceptre.inventory(), com.runehive.content.itemaction.impl.TridentOfTheSeas.inventory(), com.runehive.content.itemaction.impl.TridentOfTheSwamp.inventory(), com.runehive.content.itemaction.impl.ViggorasChainmace.inventory(), com.runehive.content.itemaction.ItemActionRepository.inventory(), com.runehive.content.preset.PresetManager.inventory(), com.runehive.content.activity.impl.duelarena.DuelRule.inventorySlotsRequired(), com.runehive.game.world.entity.combat.strategy.player.special.range.DarkBow.isDragonArrow(), com.runehive.content.skillcape.SkillCape.isEquipped(), com.runehive.game.world.items.containers.equipment.Equipment.isItem(), com.runehive.game.world.items.containers.equipment.Equipment.isWearingDFS(), com.runehive.content.itemaction.impl.CelestialRing.itemOnItem(), com.runehive.content.itemaction.impl.CrawsBow.itemOnItem(), com.runehive.content.itemaction.impl.MagmaHelm.itemOnItem(), com.runehive.content.itemaction.impl.SerpentineHelm.itemOnItem(), com.runehive.content.itemaction.impl.TanzaniteHelm.itemOnItem(), com.runehive.content.itemaction.impl.ThammaronsSceptre.itemOnItem(), com.runehive.content.itemaction.impl.ToxicBlowpipe.itemOnItem(), com.runehive.content.itemaction.impl.TridentOfTheSeas.itemOnItem(), com.runehive.content.itemaction.impl.TridentOfTheSwamp.itemOnItem(), com.runehive.content.itemaction.impl.ViggorasChainmace.itemOnItem(), com.runehive.content.itemaction.ItemActionRepository.itemOnItem(), com.runehive.content.skill.impl.farming.patches.FarmingPatch.itemOnObject(), com.runehive.content.skill.impl.farming.patches.impl.FlowerPatch.itemOnObject(), com.runehive.content.skill.impl.farming.patches.WaterablePatch.itemOnObject(), com.runehive.content.lms.lobby.LMSLobby.joinLobby(), com.runehive.content.lms.lobby.LMSLobby.leaveLobby(), com.runehive.content.itemaction.impl.ToxicBlowpipe.load(), com.runehive.content.bot.BotUtility.logLoot(), com.runehive.content.skill.impl.mining.MiningAction.mine(), com.runehive.content.skill.impl.slayer.SlayerOfferings.offer(), com.runehive.content.pet.Pets.onDeath(), com.runehive.game.action.impl.BuryBoneAction.onExecute(), com.runehive.content.lms.LMSGame.onKill(), com.runehive.content.skill.impl.smithing.SmithingArmour.openInterface(), com.runehive.content.bot.PlayerBot.pot(), com.runehive.content.store.impl.SkillcapeStore.purchase(), com.runehive.content.store.Store.purchase(), com.runehive.game.world.entity.combat.magic.MagicRune.remove(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.remove(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.removeAmmunition(), com.runehive.game.world.items.containers.ItemContainer.replace(), com.runehive.content.store.impl.DefaultStore.StoreRestockTask.restock(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.rollDrop(), com.runehive.game.world.items.containers.ItemContainer.search(), com.runehive.content.tradingpost.TradingPost.selectItemToList(), com.runehive.content.store.Store.sell(), com.runehive.content.dialogue.ChatBoxItemDialogue.sendInterface(), com.runehive.content.dialogue.DialogueFactory.sendItem(), com.runehive.content.store.Store.sendSellValue(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.sendStuff(), com.runehive.content.store.impl.PersonalStore.setValue(), com.runehive.content.emote.Emote.skillcape(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.start(), com.runehive.game.world.items.containers.equipment.Equipment.unEquip(), com.runehive.content.itemaction.impl.ToxicBlowpipe.unload(), com.runehive.content.emote.EmoteHandler.updateSkillcape(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.useItem(), com.runehive.content.skill.impl.cooking.Cooking.useItem(), com.runehive.content.skill.impl.crafting.Crafting.useItem(), com.runehive.content.skill.impl.crafting.Crafting.useItem(), com.runehive.content.skill.impl.crafting.impl.Stringing.useItem(), com.runehive.content.skill.impl.firemaking.Firemaking.useItem(), com.runehive.content.skill.impl.fletching.Fletching.useItem(), com.runehive.content.skill.impl.herblore.Herblore.useItem(), com.runehive.content.skill.impl.prayer.BoneSacrifice.useItem(), com.runehive.content.gambling.GambleManager.withdraw(), com.runehive.game.world.items.containers.bank.Bank.withdraw(), com.runehive.game.world.items.containers.bank.DonatorDeposit.withdraw(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.withdraw(), and com.runehive.game.world.items.containers.impl.LootingBag.withdrawBank().

Here is the caller graph for this function:

◆ getLowAlch()

int com.runehive.game.world.items.Item.getLowAlch ( )

Definition at line 433 of file Item.java.

433 {
434 return getDefinition().getLowAlch();
435 }

References getDefinition().

Referenced by com.runehive.game.world.items.ItemComparator.compare(), and com.runehive.content.skill.impl.magic.spell.impl.LowAlchemy.execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getName()

String com.runehive.game.world.items.Item.getName ( )

Definition at line 356 of file Item.java.

356 {
357 return getDefinition().getName();
358 }

References getDefinition(), and com.runehive.game.world.items.ItemDefinition.getName().

Referenced by com.runehive.content.store.impl.PersonalStore.add(), com.runehive.content.pet.Pets.buyInsurance(), com.runehive.content.activity.impl.duelarena.DuelArenaListener.canAttack(), com.runehive.content.activity.impl.duelarena.DuelArenaActivity.canEquipItem(), com.runehive.content.skill.impl.HarvestingSkillAction.canRun(), com.runehive.content.itemaction.impl.ToxicBlowpipe.check(), com.runehive.content.skill.impl.crafting.impl.Jewellery.click(), com.runehive.content.skill.impl.herblore.Herblore.clickItem(), com.runehive.content.skill.impl.crafting.impl.Jewellery.craft(), com.runehive.game.world.items.containers.impl.LootingBag.deposit(), com.runehive.game.world.entity.mob.player.PlayerAssistant.destroyItem(), com.runehive.content.itemaction.impl.SerpentineHelm.dismantle(), com.runehive.content.DropDisplay.display(), com.runehive.content.overrides.Overrides.drawText(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.game.world.entity.combat.weapon.WeaponInterface.execute(), com.runehive.content.activity.impl.duelarena.DuelUtils.getItemNames(), com.runehive.game.world.entity.combat.effect.impl.CombatPoisonEffect.getPoisonType(), com.runehive.game.world.entity.mob.player.PlayerAssistant.handleDestroyItem(), com.runehive.net.packet.in.ExaminePacketListener.handleInterfaceExamine(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMessages(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMiscDrops(), com.runehive.content.activity.impl.duelarena.DuelUtils.hasFunWeapon(), com.runehive.content.itemaction.impl.ClanShowcaseBox.inventory(), com.runehive.content.itemaction.impl.DrillDemonBox.inventory(), com.runehive.content.itemaction.impl.MimeBox.inventory(), com.runehive.content.activity.impl.duelarena.DuelRule.inventorySlotsRequired(), com.runehive.content.itemaction.impl.ToxicBlowpipe.load(), com.runehive.content.overrides.Overrides.manageItemDialogue(), com.runehive.content.skill.impl.mining.MiningAction.mine(), com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.game.action.impl.BuryBoneAction.onExecute(), com.runehive.content.RoyaltyProgram.open(), com.runehive.game.world.entity.combat.strategy.player.PlayerRangedStrategy.removeAmmunition(), com.runehive.content.itemaction.impl.MagmaHelm.restore(), com.runehive.content.itemaction.impl.TanzaniteHelm.restore(), com.runehive.content.skill.impl.woodcutting.BirdsNest.search(), com.runehive.content.store.Store.sell(), com.runehive.content.store.Store.sendPurchaseValue(), com.runehive.game.world.entity.combat.magic.Autocast.sendSelectionInterface(), com.runehive.content.store.Store.sendSellValue(), com.runehive.content.skill.impl.crafting.impl.Spinning.spin(), com.runehive.content.skill.impl.crafting.Crafting.start(), com.runehive.content.skill.impl.fletching.Fletching.start(), com.runehive.content.skill.impl.slayer.Slayer.store(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.update(), com.runehive.content.skill.impl.crafting.Crafting.useItem(), com.runehive.content.skill.impl.fletching.Fletching.useItem(), and com.runehive.content.skill.impl.herblore.Herblore.useItem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getNotedId()

int com.runehive.game.world.items.Item.getNotedId ( )

Definition at line 413 of file Item.java.

413 {
414 return getDefinition().getNotedId();
415 }

References getDefinition().

Referenced by noted(), and com.runehive.game.world.items.containers.bank.Bank.withdraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRangedDefinition()

Optional< RangedWeaponDefinition > com.runehive.game.world.items.Item.getRangedDefinition ( )

Definition at line 445 of file Item.java.

445 {
446 return getDefinition().getRangedDefinition();
447 }

References getDefinition().

Referenced by com.runehive.game.world.entity.mob.player.PlayerAssistant.getStrategy(), com.runehive.game.world.items.containers.equipment.Equipment.onEquip(), com.runehive.game.world.items.containers.equipment.Equipment.onRemove(), and com.runehive.game.world.items.containers.equipment.Equipment.updateRangedEquipment().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRequirements()

int[] com.runehive.game.world.items.Item.getRequirements ( )

Definition at line 449 of file Item.java.

449 {
450 return getDefinition().getRequirements();
451 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.equip().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRunAnimation()

int com.runehive.game.world.items.Item.getRunAnimation ( )

Definition at line 400 of file Item.java.

400 {
401 return getDefinition().getRunAnimation();
402 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.updateAnimation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSellValue()

int com.runehive.game.world.items.Item.getSellValue ( )

Definition at line 116 of file Item.java.

116 {
117 return (int) Math.floor(getValue() / 2);
118 }

References getValue().

Referenced by com.runehive.content.store.Store.sell(), and com.runehive.content.store.Store.sendSellValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStandAnimation()

int com.runehive.game.world.items.Item.getStandAnimation ( )

Definition at line 392 of file Item.java.

392 {
393 return getDefinition().getStandAnimation();
394 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.updateAnimation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getStreetValue()

int com.runehive.game.world.items.Item.getStreetValue ( )

Definition at line 421 of file Item.java.

421 {
422 return getDefinition().getStreetValue();
423 }

References getDefinition().

Here is the call graph for this function:

◆ getUnnotedId()

int com.runehive.game.world.items.Item.getUnnotedId ( )

Definition at line 417 of file Item.java.

417 {
418 return getDefinition().getUnnotedId();
419 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.bank.Bank.deposit(), com.runehive.game.world.items.containers.bank.Bank.depositFromNothing(), and unnoted().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getValue() [1/2]

int com.runehive.game.world.items.Item.getValue ( )

Gets the value for this item.

Returns
the value of this item.

Definition at line 125 of file Item.java.

125 {
126 ItemDefinition def = getDefinition();
127 if (def == null) {
128 return 0;
129 }
130 return def.getValue();
131 }

References getDefinition().

Referenced by getSellValue(), and com.runehive.content.store.StoreItem.getShopValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getValue() [2/2]

int com.runehive.game.world.items.Item.getValue ( PriceType type)

Gets the value for this item.

Parameters
typethe type to derive the value from.
Returns
the value of this item.

Definition at line 98 of file Item.java.

98 {
99 ItemDefinition def = getDefinition();
100 if (def == null) {
101 return 0;
102 }
103
104 switch (type) {
105 case VALUE:
106 return def.getValue();
107 case HIGH_ALCH_VALUE:
108 return def.getHighAlch();
109 case LOW_ALCH_VALUE:
110 return def.getLowAlch();
111 }
112
113 return 0;
114 }

References getDefinition().

Referenced by com.runehive.game.world.items.ItemComparator.compare(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.net.packet.in.ExaminePacketListener.handleInterfaceExamine(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMessages(), com.runehive.net.packet.in.DropItemPacketListener.handlePacket(), com.runehive.content.store.impl.PersonalStore.onPurchase(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.onRefresh(), com.runehive.content.ItemsKeptOnDeath.open(), com.runehive.game.world.items.containers.bank.Bank.sendValue(), and com.runehive.content.clanchannel.channel.ClanChannel.splitLoot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWalkAnimation()

int com.runehive.game.world.items.Item.getWalkAnimation ( )

Definition at line 396 of file Item.java.

396 {
397 return getDefinition().getWalkAnimation();
398 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.updateAnimation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWeaponInterface()

WeaponInterface com.runehive.game.world.items.Item.getWeaponInterface ( )

Definition at line 488 of file Item.java.

488 {
489 return getDefinition().getWeaponInterface();
490 }

References getDefinition().

Referenced by com.runehive.game.world.entity.combat.weapon.WeaponInterface.execute(), and com.runehive.content.overrides.Overrides.getFightType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWeight()

double com.runehive.game.world.items.Item.getWeight ( )

Definition at line 437 of file Item.java.

437 {
438 return getDefinition().getWeight();
439 }

References getDefinition().

Referenced by com.runehive.game.world.items.ItemComparator.compare().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashCode()

int com.runehive.game.world.items.Item.hashCode ( )

Definition at line 484 of file Item.java.

484 {
485 return amount << 16 | id & 0xFFFF;
486 }

References amount.

◆ incrementAmount()

final void com.runehive.game.world.items.Item.incrementAmount ( )

Increments the amount by 1.

Definition at line 277 of file Item.java.

277 {
278 incrementAmountBy(1);
279 }

References incrementAmountBy().

Referenced by com.runehive.content.store.impl.DefaultStore.StoreRestockTask.restock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ incrementAmountBy()

final void com.runehive.game.world.items.Item.incrementAmountBy ( int amount)

Increments the amount by amount.

Parameters
amountthe amount to increment by.

Definition at line 293 of file Item.java.

293 {
294 this.amount += amount;
295 }

References amount.

Referenced by com.runehive.game.world.items.containers.bank.Bank.deposit(), com.runehive.game.world.items.containers.bank.Bank.depositFromNothing(), incrementAmount(), and com.runehive.content.itemaction.impl.ToxicBlowpipe.load().

Here is the caller graph for this function:

◆ isDestroyable()

boolean com.runehive.game.world.items.Item.isDestroyable ( )

Definition at line 388 of file Item.java.

388 {
389 return getDefinition().isDestroyable();
390 }

References getDefinition().

Here is the call graph for this function:

◆ isEquipable()

boolean com.runehive.game.world.items.Item.isEquipable ( )

Definition at line 376 of file Item.java.

376 {
377 return getDefinition().getEquipmentType() != EquipmentType.NOT_WIELDABLE || getDefinition().isEquipable();
378 }

References getDefinition(), and com.runehive.game.world.items.containers.equipment.EquipmentType.NOT_WIELDABLE.

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.equip(), com.runehive.net.packet.in.WieldItemPacketListener.handlePacket(), and com.runehive.game.world.items.containers.equipment.Equipment.manualWear().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNoteable()

boolean com.runehive.game.world.items.Item.isNoteable ( )

Definition at line 368 of file Item.java.

368 {
369 return getDefinition().isNoteable();
370 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.bank.Bank.withdraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isNoted()

boolean com.runehive.game.world.items.Item.isNoted ( )

Definition at line 372 of file Item.java.

372 {
373 return getDefinition().isNoted();
374 }

References getDefinition(), and com.runehive.game.world.items.ItemDefinition.isNoted().

Referenced by com.runehive.game.world.items.containers.bank.Bank.deposit(), and com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.rollDrop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStackable()

◆ isTradeable()

boolean com.runehive.game.world.items.Item.isTradeable ( )

◆ isTwoHanded()

boolean com.runehive.game.world.items.Item.isTwoHanded ( )

Definition at line 380 of file Item.java.

380 {
381 return getDefinition().isTwoHanded();
382 }

References getDefinition().

Referenced by com.runehive.game.world.items.containers.equipment.Equipment.equip(), and com.runehive.content.activity.impl.duelarena.DuelArenaActivity.unequipItems().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matchesId()

boolean com.runehive.game.world.items.Item.matchesId ( int id)

Definition at line 465 of file Item.java.

465 {
466 return this.id == id;
467 }

References id.

Referenced by com.runehive.content.itemaction.impl.MagmaHelm.charge(), com.runehive.content.itemaction.impl.SerpentineHelm.charge(), com.runehive.content.itemaction.impl.TanzaniteHelm.charge(), com.runehive.content.itemaction.impl.MagmaHelm.drop(), com.runehive.content.itemaction.impl.SerpentineHelm.drop(), com.runehive.content.itemaction.impl.TanzaniteHelm.drop(), com.runehive.game.world.entity.mob.player.PlayerAssistant.handleDestroyItem(), com.runehive.game.world.items.containers.equipment.Equipment.hasAccumulator(), com.runehive.game.world.items.containers.equipment.Equipment.hasAssembler(), com.runehive.game.world.items.containers.equipment.Equipment.hasAttractor(), com.runehive.game.world.entity.combat.attack.listener.item.ZulrahHelm.hit(), com.runehive.content.itemaction.impl.SerpentineHelm.inventory(), com.runehive.content.itemaction.impl.SerpentineHelm.itemOnItem(), com.runehive.content.skill.impl.farming.patches.DiseasablePatch.itemOnObject(), com.runehive.content.skill.impl.farming.patches.FarmingPatch.itemOnObject(), com.runehive.game.world.items.containers.equipment.Equipment.onEquip(), com.runehive.game.world.items.containers.equipment.Equipment.onRemove(), com.runehive.content.store.Store.purchase(), com.runehive.game.world.items.containers.ItemContainer.replace(), com.runehive.game.world.items.containers.ItemContainer.replace(), and com.runehive.game.world.items.containers.ItemContainer.replace().

Here is the caller graph for this function:

◆ noted()

Item com.runehive.game.world.items.Item.noted ( )

Gets the item note item.

Returns
The item note id, or the original item item if it cannot be noted.

Definition at line 88 of file Item.java.

88 {
89 return new Item(getDefinition().getNotedId(), amount);
90 }

References amount, getDefinition(), getNotedId(), and Item().

Here is the call graph for this function:

◆ setAmount()

final void com.runehive.game.world.items.Item.setAmount ( int amount)

Sets the quantity of this item.

Parameters
amountthe new quantity of this item.

Definition at line 351 of file Item.java.

351 {
352 if (amount < 0) amount = 0;
353 this.amount = amount;
354 }

References amount.

Referenced by com.runehive.content.store.impl.PersonalStore.add(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.add(), com.runehive.game.world.items.containers.ItemContainer.add(), com.runehive.content.itemaction.impl.MagmaHelm.charge(), com.runehive.content.itemaction.impl.SerpentineHelm.charge(), com.runehive.content.itemaction.impl.TanzaniteHelm.charge(), com.runehive.content.itemaction.impl.ToxicBlowpipe.charge(), createAndIncrement(), com.runehive.game.world.items.containers.bank.Bank.depositeEquipment(), com.runehive.game.world.items.containers.bank.Bank.depositeInventory(), com.runehive.game.world.items.containers.bank.Bank.depositFromNothing(), com.runehive.content.teleport.TeleportHandler.display(), com.runehive.content.activity.impl.barrows.BarrowsUtility.generateRewards(), com.runehive.content.clanchannel.channel.ClanChannel.getShowcaseItems(), com.runehive.content.preset.PresetManager.inventory(), com.runehive.content.ItemsKeptOnDeath.open(), com.runehive.content.store.Store.purchase(), com.runehive.content.skill.impl.slayer.SlayerTab.refresh(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.remove(), com.runehive.content.store.Store.sell(), com.runehive.content.store.impl.PersonalStore.setValue(), and com.runehive.content.skill.impl.slayer.Slayer.store().

Here is the caller graph for this function:

◆ setId()

final void com.runehive.game.world.items.Item.setId ( int id)

Sets the identification of this item.

Parameters
idthe new identification of this item.

Definition at line 333 of file Item.java.

333 {
334 this.id = id;
335 }

References id.

◆ toString()

final String com.runehive.game.world.items.Item.toString ( )

Definition at line 470 of file Item.java.

470 {
471 return String.format("item[id=%d amount=%d]", id, amount);
472 }

References amount.

◆ unnoted()

Item com.runehive.game.world.items.Item.unnoted ( )

Gets the unnoted item.

Returns
the unnoted item.

Definition at line 78 of file Item.java.

78 {
79 return new Item(getDefinition().getUnnotedId(), amount);
80 }

References amount, getDefinition(), getUnnotedId(), and Item().

Referenced by com.runehive.content.preset.PresetManager.inventory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid()

boolean com.runehive.game.world.items.Item.valid ( Item item)
static

Determines if item is valid.

In other words, determines if item is not null and the Item#id.

Parameters
itemthe item to determine if valid.
Returns
true if the item is valid, false otherwise.

Definition at line 259 of file Item.java.

259 {
260 return item != null && item.id > 0 && item.id < ItemDefinition.DEFINITIONS.length && item.getDefinition() != null;
261 }

References getDefinition(), and Item().

Referenced by com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.add(), com.runehive.game.world.items.containers.equipment.Equipment.equip(), com.runehive.content.store.Store.purchase(), com.runehive.game.world.entity.mob.player.exchange.ExchangeSession.remove(), and com.runehive.content.store.Store.sell().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ amount

◆ id

int com.runehive.game.world.items.Item.id
private

The documentation for this class was generated from the following file:
  • java/com/runehive/game/world/items/Item.java