Dawn of Light - Class documentation 2900
This is the Dawn of Light project
DOL.GS.PlayerTradeWindow Class Reference

TradeWindow is the object for tradewindow from the side of one trader with all his money and items but nothing of other trader. More...

Inheritance diagram for DOL.GS.PlayerTradeWindow:
DOL.GS.ITradeWindow

List of all members.

Public Member Functions

 PlayerTradeWindow (GamePlayer owner, bool isRecipiantWindow, object sync)
bool AddItemToTrade (InventoryItem itemForTrade)
 Adds an item to the tradewindow.
void AddMoneyToTrade (long money)
 Adds money to the tradewindow.
void RemoveItemToTrade (InventoryItem itemToRemove)
 Removes an item from the tradewindow.
void TradeUpdate ()
 Updates the trade window.
bool AcceptTrade ()
 Called each time a player push the accept button to accept the trade.
void CloseTrade ()
 Closes the tradewindow.

Public Attributes

const int MAX_ITEMS = 10
 The max amount of items that can be added to tradewindow.

Protected Attributes

ArrayList m_tradeItems
 Holds a list of tradeitems we offer to the other player.
long m_tradeMoney
 Holds money we offer to the other player.
bool m_tradeAccept
 Holds if we have accepted the trade or not.
GamePlayer m_owner
 Holds the owner of this window and items in it.
PlayerTradeWindow m_partnerWindow
 Holds our trade partner.
bool m_repair
 Holds the flag for repair.
bool m_combine
 Holds the flag for combine (spellcraft)
bool m_recipiant
 Holds the flag to know the it's a recipiant window.
object m_sync
 Holds the trade windows sync object.
int m_changesCount
 Stores the begin changes count.

Properties

ArrayList TradeItems [get, set]
 Returns the array of items we offer for trade.
ArrayList PartnerTradeItems [get]
 Returns the array of items the partner offer for trade.
long TradeMoney [get, set]
 Returns the money we offer for trade.
long PartnerTradeMoney [get]
 Returns the money the partner offer for trade.
GamePlayer Owner [get]
 Gets the owner of this window and items in it.
GamePlayer Partner [get]
 Gets the owner of this window and items in it.
PlayerTradeWindow PartnerWindow [set]
 Gets the partner window of this window and items in it.
object Sync [get]
 Gets the access sync object for this and TradePartner windows.
int ItemsCount [get]
 Gets the item count in trade window.
int PartnerItemsCount [get]
 Gets the item count in partner trade window.
bool Repairing [get, set]
 Gets or sets the repair flag is switched.
bool Combine [get, set]
 Gets or sets the combine flag is switched.

Detailed Description

TradeWindow is the object for tradewindow from the side of one trader with all his money and items but nothing of other trader.


Member Function Documentation

bool DOL.GS.PlayerTradeWindow.AcceptTrade ( )

Called each time a player push the accept button to accept the trade.

Implements DOL.GS.ITradeWindow.

bool DOL.GS.PlayerTradeWindow.AddItemToTrade ( InventoryItem  itemForTrade)

Adds an item to the tradewindow.

Parameters:
itemForTradeInventoryItem to add
Returns:
true if added

Implements DOL.GS.ITradeWindow.

void DOL.GS.PlayerTradeWindow.AddMoneyToTrade ( long  money)

Adds money to the tradewindow.

Parameters:
moneyArray of money values to add

Implements DOL.GS.ITradeWindow.

void DOL.GS.PlayerTradeWindow.CloseTrade ( )

Closes the tradewindow.

Implements DOL.GS.ITradeWindow.

void DOL.GS.PlayerTradeWindow.RemoveItemToTrade ( InventoryItem  itemToRemove)

Removes an item from the tradewindow.

Parameters:
itemToRemove

Implements DOL.GS.ITradeWindow.

void DOL.GS.PlayerTradeWindow.TradeUpdate ( )

Updates the trade window.

Implements DOL.GS.ITradeWindow.


Member Data Documentation

Stores the begin changes count.

Holds the flag for combine (spellcraft)

Holds the owner of this window and items in it.

Holds our trade partner.

Holds the flag to know the it's a recipiant window.

Holds the flag for repair.

object DOL.GS.PlayerTradeWindow.m_sync [protected]

Holds the trade windows sync object.

Holds if we have accepted the trade or not.

Holds a list of tradeitems we offer to the other player.

Holds money we offer to the other player.

The max amount of items that can be added to tradewindow.


Property Documentation

bool DOL.GS.PlayerTradeWindow.Combine [get, set]

Gets or sets the combine flag is switched.

Implements DOL.GS.ITradeWindow.

int DOL.GS.PlayerTradeWindow.ItemsCount [get]

Gets the item count in trade window.

Implements DOL.GS.ITradeWindow.

GamePlayer DOL.GS.PlayerTradeWindow.Owner [get]

Gets the owner of this window and items in it.

Implements DOL.GS.ITradeWindow.

GamePlayer DOL.GS.PlayerTradeWindow.Partner [get]

Gets the owner of this window and items in it.

Implements DOL.GS.ITradeWindow.

int DOL.GS.PlayerTradeWindow.PartnerItemsCount [get]

Gets the item count in partner trade window.

Implements DOL.GS.ITradeWindow.

ArrayList DOL.GS.PlayerTradeWindow.PartnerTradeItems [get]

Returns the array of items the partner offer for trade.

Implements DOL.GS.ITradeWindow.

long DOL.GS.PlayerTradeWindow.PartnerTradeMoney [get]

Returns the money the partner offer for trade.

Implements DOL.GS.ITradeWindow.

PlayerTradeWindow DOL.GS.PlayerTradeWindow.PartnerWindow [set]

Gets the partner window of this window and items in it.

bool DOL.GS.PlayerTradeWindow.Repairing [get, set]

Gets or sets the repair flag is switched.

Implements DOL.GS.ITradeWindow.

object DOL.GS.PlayerTradeWindow.Sync [get]

Gets the access sync object for this and TradePartner windows.

Implements DOL.GS.ITradeWindow.

ArrayList DOL.GS.PlayerTradeWindow.TradeItems [get, set]

Returns the array of items we offer for trade.

Implements DOL.GS.ITradeWindow.

long DOL.GS.PlayerTradeWindow.TradeMoney [get, set]

Returns the money we offer for trade.

Implements DOL.GS.ITradeWindow.


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