|
RuneHive-Game
|
A simple wrapper class which holds extra attributes for the item object. More...
Public Member Functions | |
| boolean | canReduce () |
| StoreItem | copy () |
A substitute for Object#clone() that creates another 'copy' of this instance. | |
| CurrencyType | getShopCurrency (Store store) |
| int | getShopValue () |
| void | setCurrency (CurrencyType type) |
| void | setShopValue (int value) |
| StoreItem (int id, int amount) | |
| StoreItem (int id, int amount, int value) | |
| StoreItem (int id, int amount, OptionalInt value, Optional< CurrencyType > currency) | |
Creates a new Item. | |
| Public Member Functions inherited from com.runehive.game.world.items.Item | |
| Item | clone () |
| 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< RangedWeaponDefinition > | getRangedDefinition () |
| 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. | |
Public Attributes | |
| Optional< CurrencyType > | currency = Optional.empty() |
| Gets the optional currency for this shop item. | |
| OptionalInt | value = OptionalInt.empty() |
| Gets the optional value for this shop item. | |
Static Public Attributes | |
| static final int | RESTOCK_RATE = 5 |
| The time in minutes an item in the store has to wait before it can be reduced. | |
Private Attributes | |
| int | restockTimer = RESTOCK_RATE |
| The time in minutes it takes to restock this store item. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from com.runehive.game.world.items.Item | |
| 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. | |
A simple wrapper class which holds extra attributes for the item object.
Definition at line 15 of file StoreItem.java.
| com.runehive.content.store.StoreItem.StoreItem | ( | int | id, |
| int | amount, | ||
| OptionalInt | value, | ||
| Optional< CurrencyType > | currency ) |
Creates a new Item.
Definition at line 34 of file StoreItem.java.
References com.runehive.game.world.items.Item.amount, currency, and value.
Referenced by copy().
| com.runehive.content.store.StoreItem.StoreItem | ( | int | id, |
| int | amount, | ||
| int | value ) |
Definition at line 40 of file StoreItem.java.
References com.runehive.game.world.items.Item.amount, com.runehive.content.store.currency.CurrencyType.COINS, com.runehive.game.world.items.Item.id, and value.
| com.runehive.content.store.StoreItem.StoreItem | ( | int | id, |
| int | amount ) |
Definition at line 44 of file StoreItem.java.
References com.runehive.game.world.items.Item.amount, and com.runehive.game.world.items.Item.id.
| boolean com.runehive.content.store.StoreItem.canReduce | ( | ) |
Definition at line 64 of file StoreItem.java.
References RESTOCK_RATE, and restockTimer.
Referenced by com.runehive.content.store.impl.DefaultStore.StoreRestockTask.restock().
| StoreItem com.runehive.content.store.StoreItem.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.
Reimplemented from com.runehive.game.world.items.Item.
Definition at line 73 of file StoreItem.java.
References currency, com.runehive.game.world.items.Item.getAmount(), com.runehive.game.world.items.Item.getId(), StoreItem(), and value.
| CurrencyType com.runehive.content.store.StoreItem.getShopCurrency | ( | Store | store | ) |
Definition at line 56 of file StoreItem.java.
References currency.
Referenced by com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.content.store.impl.DefaultStore.refresh(), and com.runehive.content.store.Store.sendPurchaseValue().
| int com.runehive.content.store.StoreItem.getShopValue | ( | ) |
Definition at line 48 of file StoreItem.java.
References com.runehive.game.world.items.Item.getValue(), and value.
Referenced by com.runehive.content.store.Store.purchase(), com.runehive.content.store.impl.DefaultStore.refresh(), com.runehive.content.store.Store.sendPurchaseValue(), com.runehive.content.store.impl.PersonalStore.setValue(), and com.runehive.content.skill.impl.slayer.Slayer.store().
| void com.runehive.content.store.StoreItem.setCurrency | ( | CurrencyType | type | ) |
Definition at line 60 of file StoreItem.java.
References currency.
| void com.runehive.content.store.StoreItem.setShopValue | ( | int | value | ) |
Definition at line 52 of file StoreItem.java.
References value.
Referenced by com.runehive.content.store.impl.PersonalStore.modify(), and com.runehive.content.store.impl.PersonalStore.setValue().
| Optional<CurrencyType> com.runehive.content.store.StoreItem.currency = Optional.empty() |
Gets the optional currency for this shop item.
Definition at line 26 of file StoreItem.java.
Referenced by copy(), getShopCurrency(), setCurrency(), and StoreItem().
|
static |
The time in minutes an item in the store has to wait before it can be reduced.
Definition at line 20 of file StoreItem.java.
Referenced by canReduce().
|
private |
The time in minutes it takes to restock this store item.
Definition at line 31 of file StoreItem.java.
Referenced by canReduce().
| OptionalInt com.runehive.content.store.StoreItem.value = OptionalInt.empty() |
Gets the optional value for this shop item.
Definition at line 23 of file StoreItem.java.
Referenced by copy(), getShopValue(), setShopValue(), StoreItem(), and StoreItem().