Class OutfitShopsList
java.lang.Object
games.stendhal.server.entity.npc.shop.OutfitShopsList
Handles registering shops & configuring NPCs to sell outfits.
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(String id, OutfitShopInventory inventory) Registers a new shop.voidconfigureNPC(SpeakerNPC npc, String id, Float priceFactor, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.voidconfigureNPC(SpeakerNPC npc, String id, String action, boolean offer, boolean canReturn) Deprecated.voidconfigureNPC(SpeakerNPC npc, String id, String action, boolean offer, boolean canReturn, int expiration) Deprecated.voidconfigureNPC(SpeakerNPC npc, String id, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.voidconfigureNPC(String npc, String id, Float priceFactor, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.voidconfigureNPC(String name, String id, String action, boolean offer, boolean canReturn) Deprecated.voidconfigureNPC(String name, String id, String action, boolean offer, boolean canReturn, int expiration) Deprecated.voidconfigureNPC(String npc, String id, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.static OutfitShopsListget()Retrieves singlton instance.Retrieves a registered shop.
-
Method Details
-
get
Retrieves singlton instance. -
add
Registers a new shop.- Parameters:
id- String identifier.inventory- Outfits inventory with prices.
-
getContents
-
get
Retrieves a registered shop.- Parameters:
id- String identifier.- Returns:
- Outfits inventory or null if id isn't registered.
-
configureNPC
public void configureNPC(SpeakerNPC npc, String id, Float priceFactor, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.- Parameters:
npc- NPC to configure.id- Shop identifier.priceFactor- Skews prices of all items for this merchant.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.expiration- Amount of time player can wear outfit.wearOffMessage- Message to player when outfit expires.flags- Optional flags. Currently supported are 'resetOrig', 'noOffer', & 'returnable'.
-
configureNPC
public void configureNPC(SpeakerNPC npc, String id, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.- Parameters:
npc- NPC to configure.id- Shop identifier.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.expiration- Amount of time player can wear outfit.wearOffMessage- Message to player when outfit expires.flags- Optional flags. Currently supported are 'resetOrig', 'noOffer', & 'returnable'.
-
configureNPC
public void configureNPC(String npc, String id, Float priceFactor, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.- Parameters:
npc- Name of NPC to configure.id- Shop identifier.priceFactor- Skews prices of all items for this merchant.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.expiration- Amount of time player can wear outfit.wearOffMessage- Message to player when outfit expires.flags- Optional flags. Currently supported are 'resetOrig', 'noOffer', & 'returnable'.
-
configureNPC
public void configureNPC(String npc, String id, String action, int expiration, String wearOffMessage, List<String> flags) Configures an NPC to use a shop.- Parameters:
npc- Name of NPC to configure.id- Shop identifier.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.expiration- Amount of time player can wear outfit.wearOffMessage- Message to player when outfit expires.flags- Optional flags. Currently supported are 'resetOrig', 'noOffer', & 'returnable'.
-
configureNPC
@Deprecated public void configureNPC(SpeakerNPC npc, String id, String action, boolean offer, boolean canReturn, int expiration) Deprecated.Configures an NPC to use a shop.- Parameters:
npc- NPC to configure.id- Shop identifier.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.offer- Defines if the NPC should react to the word "offer".canReturn- If true, player can say "return" to get original outfit back.expiration- Amount of time player can wear outfit.
-
configureNPC
@Deprecated public void configureNPC(SpeakerNPC npc, String id, String action, boolean offer, boolean canReturn) Deprecated.Configures an NPC to use a shop with outfits that do not expire.- Parameters:
npc- NPC to configure.id- Shop identifier.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.offer- Defines if the NPC should react to the word "offer".canReturn- If true, player can say "return" to get original outfit back.
-
configureNPC
@Deprecated public void configureNPC(String name, String id, String action, boolean offer, boolean canReturn, int expiration) Deprecated.Configures an NPC to use a shop.- Parameters:
name- Name of NPC to configure.id- Shop identifier.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.offer- Defines if the NPC should react to the word "offer".canReturn- If true, player can say "return" to get original outfit back.expiration- Amount of time player can wear outfit.
-
configureNPC
@Deprecated public void configureNPC(String name, String id, String action, boolean offer, boolean canReturn) Deprecated.Configures an NPC to use a shop with outfits that do not expire.- Parameters:
name- Name of NPC to configure.id- Shop identifier.action- NPC action trigger, e.g. "lend", "borrow", "buy", etc.offer- Defines if the NPC should react to the word "offer".canReturn- If true, player can say "return" to get original outfit back.
-