Property | Type | Description | |
---|---|---|---|
_tabs | NpcShopTab>.Dictionary |
Method | Description | |
---|---|---|
Add ( string tabTitle, Func |
Adds empty tab.
|
|
Add ( string tabTitle, bool randomizeColors, Func |
Adds empty tab.
|
|
Add ( ) : void |
Adds empty tabs.
|
|
Add ( string tabTitle, Item item, int price, int stock ) : void |
Adds item to tab.
|
|
Add ( string tabTitle, int itemId, int amount = 1, int price = -1, int stock = -1 ) : void |
Adds item to tab.
|
|
Add ( string tabTitle, int itemId, string metaData, int price = -1, int stock = -1 ) : void |
Adds item to tab.
|
|
Add ( string tabTitle, int itemId, uint color1, uint color2, uint color3, int price = -1, int stock = -1 ) : void |
Adds item to tab.
|
|
AddQuest ( string tabTitle, int questId, int price, int stock = -1 ) : void |
Adds quest scroll item to tab.
|
|
Buy ( |
|
|
ClearTab ( string tabTitle ) : bool |
Removes all items from tab. This, just like adding items at run-time, does not live update the currently open shops. Afaik it's not on officials either, but it would be possible, if we create a list of open shop instances and use the clear and fill shop packets. |
|
Dispose ( ) : void |
Unsubscribes Shop from events.
|
|
Init ( ) : bool |
Initializes shop, calling setup and adding it to the script manager.
|
|
NpcShopScript ( ) : System |
Creates new NpcShopScript
|
|
OpenFor ( |
Sends OpenNpcShop for creature and this shop.
|
|
OpenRemotelyFor ( |
Sends OpenShopRemotelyR and OpenNpcShop for creature and this shop.
|
|
SetPaymentMethod ( string tabTitle, PaymentMethod method ) : void |
Sets the payment method for the given tab.
|
|
Setup ( ) : void |
Called when creating the shop.
|
Method | Description | |
---|---|---|
GetOrCreateTab ( string tabTitle ) : |
Returns the given tab, after creating if necessary.
|
|
GetTabs ( ) : IList |
Returns thread-safe list of all tabs.
|
|
GetTabs ( |
Returns thread-safe list of visible tabs, or all tabs if one of the parameters is null. TODO: This could be cached. |
|
OnErinnMidnightTick ( |
Called at midnight (Erinn time).
|
|
RandomizeItemColors ( ) : void |
Randomizes colors of all items in all tabs.
|
Method | Description | |
---|---|---|
GetItem ( long entityId ) : Item |
Returns item from one of the tabs by id. or null.
|
public Add ( string tabTitle, Func |
||
tabTitle | string | Tab title displayed in-game |
shouldDisplay | Func |
Function that determines whether tab should be displayed, set null if not used. |
return |
public Add ( string tabTitle, bool randomizeColors, Func |
||
tabTitle | string | Tab title displayed in-game |
randomizeColors | bool | Determines whether item colors are randomized on midnight. |
shouldDisplay | Func |
Function that determines whether tab should be displayed, set null if not used. |
return |
public Add ( string tabTitle, Item item, int price, int stock ) : void | ||
tabTitle | string | |
item | Item | |
price | int | Uses db value if lower than 0. |
stock | int | Amount of times item can be bough, unlimited if lower than 0. |
return | void |
public Add ( string tabTitle, int itemId, int amount = 1, int price = -1, int stock = -1 ) : void | ||
tabTitle | string | |
itemId | int | |
amount | int | |
price | int | Uses db value if lower than 0 (default). |
stock | int | Amount of times item can be bough, unlimited if lower than 0 (default). |
return | void |
public Add ( string tabTitle, int itemId, string metaData, int price = -1, int stock = -1 ) : void | ||
tabTitle | string | |
itemId | int | |
metaData | string | |
price | int | Uses db value if lower than 0 (default). |
stock | int | Amount of times item can be bough, unlimited if lower than 0 (default). |
return | void |
public Add ( string tabTitle, int itemId, uint color1, uint color2, uint color3, int price = -1, int stock = -1 ) : void | ||
tabTitle | string | |
itemId | int | |
color1 | uint | |
color2 | uint | |
color3 | uint | |
price | int | Uses db value if lower than 0 (default). |
stock | int | Amount of times item can be bough, unlimited if lower than 0 (default). |
return | void |
public AddQuest ( string tabTitle, int questId, int price, int stock = -1 ) : void | ||
tabTitle | string | |
questId | int | |
price | int | |
stock | int | Amount of times item can be bough, unlimited if lower than 0 (default). |
return | void |
public Buy ( |
||
creature | ||
itemEntityId | long | |
moveToInventory | bool | |
directBankTransaction | bool | |
return | bool |
protected GetOrCreateTab ( string tabTitle ) : |
||
tabTitle | string | |
return |
protected GetTabs ( |
||
creature | Creature opening the shop | |
owner | NPC owning the shop | |
return | IList |
protected OnErinnMidnightTick ( |
||
time | ||
return | void |
public OpenFor ( |
||
creature | Creature opening the shop | |
owner | NPC owning the shop | |
return | void |
public OpenRemotelyFor ( |
||
creature | Creature opening the shop | |
return | void |
public SetPaymentMethod ( string tabTitle, PaymentMethod method ) : void | ||
tabTitle | string | |
method | PaymentMethod | |
return | void |