Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.GameConsignmentMerchant Class Reference
Inheritance diagram for DOL.GS.GameConsignmentMerchant:
DOL.GS.GameNPC DOL.GS.GameLiving DOL.GS.GameObject DOL.GS.Point3D DOL.GS.Point2D DOL.GS.IPoint3D DOL.GS.IPoint2D DOL.GS.IPoint2D

List of all members.

Public Member Functions

override bool ReceiveItem (GameLiving source, InventoryItem item)
 Called when the living is about to get an item from someone else.
bool CanMove (GamePlayer player)
 Checks if the Player is allowed to move an Item.
void MoveItem (GamePlayer player, IGameInventory playerInventory, eInventorySlot fromSlot, eInventorySlot toSlot)
 Move an item from, to or inside a consignment merchants inventory.
void OnPlayerBuy (GamePlayer player, IGameInventory playerInventory, eInventorySlot fromSlot, eInventorySlot toSlot, bool byMarketExplorer)
 The Player is buying an Item from the merchant.
override bool Interact (GamePlayer player)
 Player interacting with this Merchant.
override bool AddToWorld ()
 Adds the npc to the world.
void SetEmblem ()
 Not Livelike but looks better - adds the owners guild emblem to the consignment merchants cloak.

Public Attributes

const int ConsignmentSize = 100

Protected Member Functions

IDictionary< int, InventoryItem > MoveItemFromMerchant (GamePlayer player, IGameInventory playerInventory, eInventorySlot fromSlot, eInventorySlot toSlot)
 Move an Item from the merchant.
IDictionary< int, InventoryItem > MoveItemInsideMerchant (eInventorySlot fromSlot, eInventorySlot toSlot)
 Move an item around inside the Merchant.
IDictionary< int, InventoryItem > MoveItemToMerchant (GamePlayer player, IGameInventory playerInventory, eInventorySlot fromSlot, eInventorySlot toSlot)
 Move an item to the merchant.
void NotifyObservers (IDictionary< int, InventoryItem > updateItems)
 Send inventory updates to all players actively viewing this merchant; players that are too far away will be considered inactive.

Static Protected Member Functions

static int RecalculateSlot (int slot)
 Recalculation is required for different merchant window/db entry indexing.

Properties

int FirstSlot [get]
 First slot in the DB.
int LastSlot [get]
 Last slot in the DB.
Dictionary< int, InventoryItem > ConInventory [get]
 Inventory of the Consignment Merchant.
InventoryItem[] Items [get]
 List of items in the Consignment Merchants Inventory.
long TotalMoney [get, set]
 Gets or sets the total amount of money held by this consignment merchant.

Member Function Documentation

override bool DOL.GS.GameConsignmentMerchant.AddToWorld ( ) [virtual]

Adds the npc to the world.

Returns:
true if the npc has been successfully added

Reimplemented from DOL.GS.GameNPC.

bool DOL.GS.GameConsignmentMerchant.CanMove ( GamePlayer  player)

Checks if the Player is allowed to move an Item.

Parameters:
player
Returns:
override bool DOL.GS.GameConsignmentMerchant.Interact ( GamePlayer  player) [virtual]

Player interacting with this Merchant.

Parameters:
player
Returns:

Reimplemented from DOL.GS.GameNPC.

void DOL.GS.GameConsignmentMerchant.MoveItem ( GamePlayer  player,
IGameInventory  playerInventory,
eInventorySlot  fromSlot,
eInventorySlot  toSlot 
)

Move an item from, to or inside a consignment merchants inventory.

Parameters:
playerInventory
fromSlot
toSlot
Returns:
IDictionary<int, InventoryItem> DOL.GS.GameConsignmentMerchant.MoveItemFromMerchant ( GamePlayer  player,
IGameInventory  playerInventory,
eInventorySlot  fromSlot,
eInventorySlot  toSlot 
) [protected]

Move an Item from the merchant.

Parameters:
playerInventory
fromSlot
toSlot
Returns:
IDictionary<int, InventoryItem> DOL.GS.GameConsignmentMerchant.MoveItemInsideMerchant ( eInventorySlot  fromSlot,
eInventorySlot  toSlot 
) [protected]

Move an item around inside the Merchant.

Parameters:
fromSlot
toSlot
Returns:
IDictionary<int, InventoryItem> DOL.GS.GameConsignmentMerchant.MoveItemToMerchant ( GamePlayer  player,
IGameInventory  playerInventory,
eInventorySlot  fromSlot,
eInventorySlot  toSlot 
) [protected]

Move an item to the merchant.

Parameters:
playerInventory
fromSlot
toSlot
Returns:
void DOL.GS.GameConsignmentMerchant.NotifyObservers ( IDictionary< int, InventoryItem >  updateItems) [protected]

Send inventory updates to all players actively viewing this merchant; players that are too far away will be considered inactive.

Parameters:
updateItems
void DOL.GS.GameConsignmentMerchant.OnPlayerBuy ( GamePlayer  player,
IGameInventory  playerInventory,
eInventorySlot  fromSlot,
eInventorySlot  toSlot,
bool  byMarketExplorer 
)

The Player is buying an Item from the merchant.

Parameters:
player
playerInventory
fromSlot
toSlot
static int DOL.GS.GameConsignmentMerchant.RecalculateSlot ( int  slot) [static, protected]

Recalculation is required for different merchant window/db entry indexing.

Parameters:
slot
Returns:
override bool DOL.GS.GameConsignmentMerchant.ReceiveItem ( GameLiving  source,
InventoryItem  item 
) [virtual]

Called when the living is about to get an item from someone else.

Parameters:
sourceSource from where to get the item
itemItem to get
Returns:
true if the item was successfully received

Reimplemented from DOL.GS.GameLiving.

void DOL.GS.GameConsignmentMerchant.SetEmblem ( )

Not Livelike but looks better - adds the owners guild emblem to the consignment merchants cloak.


Property Documentation

Dictionary<int, InventoryItem> DOL.GS.GameConsignmentMerchant.ConInventory [get]

Inventory of the Consignment Merchant.

int DOL.GS.GameConsignmentMerchant.FirstSlot [get]

First slot in the DB.

InventoryItem [] DOL.GS.GameConsignmentMerchant.Items [get]

List of items in the Consignment Merchants Inventory.

int DOL.GS.GameConsignmentMerchant.LastSlot [get]

Last slot in the DB.

long DOL.GS.GameConsignmentMerchant.TotalMoney [get, set]

Gets or sets the total amount of money held by this consignment merchant.


The documentation for this class was generated from the following file:
All Classes Namespaces Functions Variables Enumerations Properties Events