This class represents a full merchant item list and contains functions that can be used to add and remove items.
More...
List of all members.
Public Member Functions |
| MerchantTradeItems (string itemsListId) |
| Constructor.
|
virtual bool | AddTradeItem (int page, eMerchantWindowSlot slot, ItemTemplate item) |
| Adds an item to the merchant item list.
|
virtual bool | RemoveTradeItem (int page, eMerchantWindowSlot slot) |
| Removes an item from trade window.
|
virtual IDictionary | GetItemsInPage (int page) |
| Get the list of all items in the specified page.
|
virtual ItemTemplate | GetItem (int page, eMerchantWindowSlot slot) |
| Get the item in the specified page and slot.
|
virtual IDictionary | GetAllItems () |
| Gets a copy of all intems in trade window.
|
virtual eMerchantWindowSlot | GetValidSlot (int page, eMerchantWindowSlot slot) |
| Check if the slot is valid.
|
Public Attributes |
const byte | MAX_ITEM_IN_TRADEWINDOWS = 30 |
| The maximum number of items on one page.
|
const int | MAX_PAGES_IN_TRADEWINDOWS = 5 |
| The maximum number of pages supported by clients.
|
Protected Attributes |
string | m_itemsListID |
| Item list id.
|
HybridDictionary | m_usedItemsTemplates = new HybridDictionary() |
| Holds item template instances defined with script.
|
Properties |
string | ItemsListID [get] |
| Item list id.
|
Detailed Description
This class represents a full merchant item list and contains functions that can be used to add and remove items.
Constructor & Destructor Documentation
DOL.GS.MerchantTradeItems.MerchantTradeItems |
( |
string |
itemsListId | ) |
|
Member Function Documentation
virtual bool DOL.GS.MerchantTradeItems.AddTradeItem |
( |
int |
page, |
|
|
eMerchantWindowSlot |
slot, |
|
|
ItemTemplate |
item |
|
) |
| [virtual] |
Adds an item to the merchant item list.
- Parameters:
-
page | Zero-based page number |
slot | Zero-based slot number |
item | The item template to add |
virtual IDictionary DOL.GS.MerchantTradeItems.GetAllItems |
( |
| ) |
[virtual] |
Gets a copy of all intems in trade window.
- Returns:
- A list where key is the slot position and value is the ItemTemplate
virtual ItemTemplate DOL.GS.MerchantTradeItems.GetItem |
( |
int |
page, |
|
|
eMerchantWindowSlot |
slot |
|
) |
| [virtual] |
Get the item in the specified page and slot.
- Parameters:
-
page | The item page |
slot | The item slot |
- Returns:
- Item template or null
virtual IDictionary DOL.GS.MerchantTradeItems.GetItemsInPage |
( |
int |
page | ) |
[virtual] |
Get the list of all items in the specified page.
virtual eMerchantWindowSlot DOL.GS.MerchantTradeItems.GetValidSlot |
( |
int |
page, |
|
|
eMerchantWindowSlot |
slot |
|
) |
| [virtual] |
Check if the slot is valid.
- Parameters:
-
page | Zero-based page number |
slot | SlotPosition to check |
- Returns:
- the slot if it's valid or eMerchantWindowSlot.Invalid if not
virtual bool DOL.GS.MerchantTradeItems.RemoveTradeItem |
( |
int |
page, |
|
|
eMerchantWindowSlot |
slot |
|
) |
| [virtual] |
Removes an item from trade window.
- Parameters:
-
page | Zero-based page number |
slot | Zero-based slot number |
- Returns:
- true if removed
Member Data Documentation
Holds item template instances defined with script.
The maximum number of items on one page.
The maximum number of pages supported by clients.
Property Documentation
string DOL.GS.MerchantTradeItems.ItemsListID [get] |
The documentation for this class was generated from the following file:
- C:/Users/Graveen/Documents/Dawn of Light/Svn DoL/GameServer/gameutils/MerchantTradeItems.cs