|
RuneHive-Game
|
The class which holds support for further abstraction for shops. More...
Public Member Functions | |
| abstract void | close (Player player) |
| boolean | decrementStock () |
| final boolean | equals (Object obj) |
| final int | hashCode () |
| abstract void | itemContainerAction (Player player, int id, int slot, int action, boolean purchase) |
| void | onPurchase (Player player, Item item) |
| abstract void | open (Player player) |
| boolean | purchase (Player player, Item item, int slot) |
| abstract void | refresh (Player player) |
| abstract SellType | sellType () |
| Store (String name, ItemContainer.StackPolicy policy, CurrencyType currencyType, int capacity) | |
| abstract StoreType | type () |
Static Public Member Functions | |
| static void | closeShop (Player player) |
| static void | exchange (Player player, int id, int slot, int action, boolean purchase) |
Public Attributes | |
| ItemContainer | container |
| The current item container which contains the current items from this shop. | |
| Map< Integer, Integer > | itemCache |
| The map of cached shop item identifications and their amounts. | |
| final String | name |
| The name of this shop. | |
| final Set< Player > | players = new HashSet<>() |
| The set of players that are currently viewing this shop. | |
Static Public Attributes | |
| static Map< String, Store > | STORES = new HashMap<>() |
| A mapping of each shop by it's name. | |
Protected Member Functions | |
| final void | sell (Player player, Item item, int slot, boolean addX) |
| void | sendPurchaseValue (Player player, int slot) |
| final void | sendSellValue (Player player, int slot) |
Static Protected Member Functions | |
| static List< PersonalStore > | getFeaturedShops () |
| static List< PersonalStore > | getPersonalShops () |
Protected Attributes | |
| final CurrencyType | currencyType |
| The currency for this shop. | |
The class which holds support for further abstraction for shops.
Definition at line 20 of file Store.java.
| com.runehive.content.store.Store.Store | ( | String | name, |
| ItemContainer.StackPolicy | policy, | ||
| CurrencyType | currencyType, | ||
| int | capacity ) |
Definition at line 40 of file Store.java.
References container, currencyType, and name.
Referenced by com.runehive.content.store.impl.PersonalStore.changeName(), closeShop(), equals(), exchange(), and com.runehive.content.store.impl.PersonalStore.myShop().
|
abstract |
|
static |
Definition at line 47 of file Store.java.
References com.runehive.game.world.entity.mob.Mob.attributes, com.runehive.util.generic.GenericAttributes.get(), com.runehive.util.generic.GenericAttributes.has(), com.runehive.content.store.StoreConstant.INTERFACE_ID, com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.game.world.entity.mob.player.InterfaceManager.isInterfaceOpen(), Store(), and STORES.
Referenced by com.runehive.game.world.entity.mob.player.InterfaceManager.close().
| boolean com.runehive.content.store.Store.decrementStock | ( | ) |
Reimplemented in com.runehive.content.store.impl.RecipeForDisasterStore, and com.runehive.content.store.impl.SkillcapeStore.
Definition at line 303 of file Store.java.
Referenced by purchase().
| final boolean com.runehive.content.store.Store.equals | ( | Object | obj | ) |
Definition at line 316 of file Store.java.
Referenced by purchase().
|
static |
Definition at line 61 of file Store.java.
References com.runehive.game.world.entity.mob.Mob.attributes, com.runehive.util.generic.GenericAttributes.get(), com.runehive.util.generic.GenericAttributes.has(), com.runehive.content.store.StoreConstant.INTERFACE_ID, com.runehive.game.world.entity.mob.player.Player.interfaceManager, com.runehive.game.world.entity.mob.player.InterfaceManager.isInterfaceOpen(), purchase(), Store(), and STORES.
|
staticprotected |
Definition at line 81 of file Store.java.
References com.runehive.content.store.impl.PersonalStore.add(), com.runehive.content.store.StoreType.PERSONAL, and STORES.
Referenced by com.runehive.content.store.impl.PersonalStore.openPanel().
|
staticprotected |
Definition at line 75 of file Store.java.
References com.runehive.content.store.StoreType.PERSONAL, and STORES.
Referenced by com.runehive.content.store.impl.PersonalStore.openMenu(), and com.runehive.content.store.impl.PersonalStore.openPanel().
| final int com.runehive.content.store.Store.hashCode | ( | ) |
Definition at line 308 of file Store.java.
References name.
|
abstract |
Reimplemented in com.runehive.content.store.impl.DefaultStore, com.runehive.content.store.impl.PersonalStore, com.runehive.content.store.impl.RecipeForDisasterStore, and com.runehive.content.store.impl.SkillcapeStore.
References purchase().
Reimplemented in com.runehive.content.store.impl.PersonalStore.
Definition at line 172 of file Store.java.
Referenced by purchase().
|
abstract |
Reimplemented in com.runehive.content.store.impl.SkillcapeStore.
Definition at line 89 of file Store.java.
References com.runehive.game.world.items.containers.ItemContainer.add(), container, com.runehive.game.world.items.containers.ItemContainer.contains(), currencyType, decrementStock(), equals(), com.runehive.game.world.items.Item.getAmount(), com.runehive.game.world.items.Item.getId(), com.runehive.content.store.StoreItem.getShopValue(), com.runehive.game.world.items.containers.ItemContainer.hasCapacityFor(), com.runehive.game.world.entity.mob.player.Player.inventory, com.runehive.game.world.entity.mob.player.PlayerRight.isIronman(), com.runehive.game.world.items.Item.isStackable(), itemCache, com.runehive.game.world.items.Item.matchesId(), onPurchase(), com.runehive.content.store.StoreType.PERSONAL, refresh(), com.runehive.game.world.items.containers.ItemContainer.remaining(), com.runehive.game.world.entity.mob.player.Player.send(), com.runehive.game.world.items.Item.setAmount(), type(), and com.runehive.game.world.items.Item.valid().
Referenced by exchange(), com.runehive.content.store.impl.DefaultStore.itemContainerAction(), com.runehive.content.store.impl.PersonalStore.itemContainerAction(), com.runehive.content.store.impl.RecipeForDisasterStore.itemContainerAction(), and itemContainerAction().
|
abstract |
Reimplemented in com.runehive.content.store.impl.DefaultStore, com.runehive.content.store.impl.PersonalStore, com.runehive.content.store.impl.RecipeForDisasterStore, and com.runehive.content.store.impl.SkillcapeStore.
Referenced by purchase(), and sell().
|
protected |
Definition at line 176 of file Store.java.
References com.runehive.game.world.items.containers.ItemContainer.computeAmountForId(), container, com.runehive.content.store.SellType.CONTAINS, currencyType, com.runehive.game.world.items.containers.ItemContainer.get(), com.runehive.game.world.items.Item.getAmount(), com.runehive.game.world.items.Item.getId(), com.runehive.game.world.items.Item.getName(), com.runehive.game.world.items.Item.getSellValue(), com.runehive.game.world.entity.mob.player.Player.inventory, com.runehive.content.store.currency.CurrencyType.isCurrency(), com.runehive.game.world.items.Item.isStackable(), com.runehive.game.world.items.Item.isTradeable(), com.runehive.content.store.StoreConstant.MAXIMUM_SELL_VALUE, com.runehive.content.store.SellType.NONE, refresh(), com.runehive.game.world.items.containers.ItemContainer.remaining(), com.runehive.game.world.items.containers.ItemContainer.remove(), sellType(), com.runehive.game.world.entity.mob.player.Player.send(), com.runehive.game.world.items.Item.setAmount(), and com.runehive.game.world.items.Item.valid().
Referenced by com.runehive.content.store.impl.DefaultStore.itemContainerAction().
|
abstract |
Reimplemented in com.runehive.content.store.impl.DefaultStore, com.runehive.content.store.impl.PersonalStore, com.runehive.content.store.impl.RecipeForDisasterStore, and com.runehive.content.store.impl.SkillcapeStore.
Referenced by sell(), and sendSellValue().
|
protected |
Definition at line 277 of file Store.java.
References container, com.runehive.util.Utility.formatDigits(), com.runehive.game.world.items.Item.getName(), com.runehive.content.store.StoreItem.getShopCurrency(), com.runehive.content.store.StoreItem.getShopValue(), com.runehive.game.world.entity.mob.player.Player.message(), and com.runehive.content.store.currency.CurrencyType.toString().
Referenced by com.runehive.content.store.impl.DefaultStore.itemContainerAction(), com.runehive.content.store.impl.PersonalStore.itemContainerAction(), com.runehive.content.store.impl.RecipeForDisasterStore.itemContainerAction(), and com.runehive.content.store.impl.SkillcapeStore.itemContainerAction().
|
protected |
Definition at line 249 of file Store.java.
References currencyType, com.runehive.util.Utility.formatDigits(), com.runehive.game.world.items.containers.ItemContainer.get(), com.runehive.game.world.items.Item.getId(), com.runehive.game.world.items.Item.getName(), com.runehive.game.world.items.Item.getSellValue(), com.runehive.game.world.entity.mob.player.Player.inventory, com.runehive.content.store.currency.CurrencyType.isCurrency(), com.runehive.game.world.items.Item.isTradeable(), name, com.runehive.content.store.SellType.NONE, sellType(), and com.runehive.game.world.entity.mob.player.Player.send().
Referenced by com.runehive.content.store.impl.DefaultStore.itemContainerAction().
|
abstract |
Reimplemented in com.runehive.content.store.impl.DefaultStore, com.runehive.content.store.impl.PersonalStore, com.runehive.content.store.impl.RecipeForDisasterStore, and com.runehive.content.store.impl.SkillcapeStore.
Referenced by purchase().
| ItemContainer com.runehive.content.store.Store.container |
The current item container which contains the current items from this shop.
Definition at line 29 of file Store.java.
Referenced by com.runehive.content.store.impl.DefaultStore.DefaultStore(), com.runehive.content.store.impl.PersonalStore.itemContainerAction(), com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.content.store.impl.DefaultStore.needsRestock(), com.runehive.content.store.impl.PersonalStore.open(), com.runehive.content.store.impl.PersonalStore.PersonalStore(), purchase(), com.runehive.content.store.impl.RecipeForDisasterStore.RecipeForDisasterStore(), com.runehive.content.store.impl.DefaultStore.refresh(), com.runehive.content.store.impl.RecipeForDisasterStore.refresh(), com.runehive.content.store.impl.PersonalStore.remove(), com.runehive.content.store.impl.DefaultStore.restockCompleted(), sell(), sendPurchaseValue(), com.runehive.content.store.impl.PersonalStore.setValue(), com.runehive.content.store.impl.SkillcapeStore.SkillcapeStore(), and Store().
|
protected |
The currency for this shop.
Definition at line 32 of file Store.java.
Referenced by com.runehive.content.store.impl.RecipeForDisasterStore.open(), com.runehive.content.store.impl.SkillcapeStore.open(), purchase(), com.runehive.content.store.impl.DefaultStore.refresh(), com.runehive.content.store.impl.RecipeForDisasterStore.refresh(), com.runehive.content.store.impl.SkillcapeStore.refresh(), sell(), sendSellValue(), and Store().
| Map<Integer, Integer> com.runehive.content.store.Store.itemCache |
The map of cached shop item identifications and their amounts.
Definition at line 35 of file Store.java.
Referenced by com.runehive.content.store.impl.DefaultStore.DefaultStore(), com.runehive.content.store.impl.DefaultStore.needsRestock(), purchase(), com.runehive.content.store.impl.RecipeForDisasterStore.RecipeForDisasterStore(), com.runehive.content.store.impl.DefaultStore.restockCompleted(), and com.runehive.content.store.impl.SkillcapeStore.SkillcapeStore().
| final String com.runehive.content.store.Store.name |
The name of this shop.
Definition at line 26 of file Store.java.
Referenced by com.runehive.content.store.impl.DefaultStore.DefaultStore(), equals(), hashCode(), com.runehive.content.store.impl.PersonalStore.isOwner(), com.runehive.content.store.impl.PersonalStore.onPurchase(), com.runehive.content.store.impl.DefaultStore.open(), com.runehive.content.store.impl.PersonalStore.open(), com.runehive.content.store.impl.RecipeForDisasterStore.open(), com.runehive.content.store.impl.SkillcapeStore.open(), com.runehive.content.store.impl.PersonalStore.openPanel(), com.runehive.content.store.impl.PersonalStore.PersonalStore(), sendSellValue(), and Store().
| final Set<Player> com.runehive.content.store.Store.players = new HashSet<>() |
The set of players that are currently viewing this shop.
Definition at line 38 of file Store.java.
Referenced by com.runehive.content.store.impl.DefaultStore.close(), com.runehive.content.store.impl.PersonalStore.close(), com.runehive.content.store.impl.RecipeForDisasterStore.close(), com.runehive.content.store.impl.DefaultStore.open(), com.runehive.content.store.impl.PersonalStore.open(), com.runehive.content.store.impl.DefaultStore.refresh(), com.runehive.content.store.impl.PersonalStore.refresh(), and com.runehive.content.store.impl.RecipeForDisasterStore.refresh().
|
static |
A mapping of each shop by it's name.
Definition at line 23 of file Store.java.
Referenced by com.runehive.content.store.impl.PersonalStore.add(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanManagement(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.clickNpc(), com.runehive.content.skill.impl.crafting.Crafting.clickNpc(), closeShop(), exchange(), getFeaturedShops(), getPersonalShops(), com.runehive.content.store.impl.PersonalStore.myShop(), com.runehive.content.store.impl.DefaultStore.open(), com.runehive.content.store.impl.RecipeForDisasterStore.open(), com.runehive.content.store.impl.SkillcapeStore.open(), com.runehive.util.parser.impl.StoreParser.parse(), com.runehive.content.dialogue.impl.VoteDialogue.sendDialogues(), and com.runehive.content.dialogue.impl.RoyalKingDialogue.store().