Planeshift
|
#include <exchangemanager.h>
Public Member Functions | |
virtual bool | AddItem (Client *fromClient, INVENTORY_SLOT_NUMBER fromSlot, int stackCount, int toSlot) |
Add an offering item from a client. | |
bool | AdjustMoney (Client *client, int moneyType, int newMoney) |
bool | AdjustMoney (Client *client, const psMoney &money) |
bool | CheckExchange (uint32_t clientNum, bool checkRange=false) |
virtual void | DeleteObjectCallback (iDeleteNotificationObject *object) |
psMoney | GetOfferedMoney (Client *client) |
virtual psItem * | GetTargetOffer (int slot) |
bool | HandleAccept (Client *client) |
One of the client has accepted the exchange. | |
void | HandleEnd (Client *client) |
One of the clients has ended this exchange. | |
PlayerToPlayerExchange (Client *client, Client *target, ExchangeManager *manager) | |
virtual bool | RemoveItem (Client *fromClient, int slot, int stackCount) |
Removes an item from the exchange. | |
void | SendExchangeStatusToBoth () |
virtual | ~PlayerToPlayerExchange () |
Protected Member Functions | |
virtual void | SendAddItemMessage (Client *fromClient, int slot, psCharacterInventory::psCharacterInventoryItem *item) |
virtual void | SendRemoveItemMessage (Client *fromClient, int slot) |
Definition at line 318 of file exchangemanager.h.
PlayerToPlayerExchange::PlayerToPlayerExchange | ( | Client * | client, |
Client * | target, | ||
ExchangeManager * | manager | ||
) |
virtual PlayerToPlayerExchange::~PlayerToPlayerExchange | ( | ) | [virtual] |
virtual bool PlayerToPlayerExchange::AddItem | ( | Client * | fromClient, |
INVENTORY_SLOT_NUMBER | fromSlot, | ||
int | stackCount, | ||
int | toSlot | ||
) | [virtual] |
Add an offering item from a client.
fromClient | The client that is offering the item. |
fromSlot | The originating slot in the exchange window for the item moved. |
stackCount | The number of items being moved. |
toSlot | The slot that the item should go in. |
Reimplemented from Exchange.
Reimplemented from Exchange.
Reimplemented from Exchange.
bool PlayerToPlayerExchange::CheckExchange | ( | uint32_t | clientNum, |
bool | checkRange = false |
||
) |
virtual void PlayerToPlayerExchange::DeleteObjectCallback | ( | iDeleteNotificationObject * | object | ) | [virtual] |
Implements iDeleteObjectCallback.
Reimplemented from Exchange.
Reimplemented from Exchange.
bool PlayerToPlayerExchange::HandleAccept | ( | Client * | client | ) | [virtual] |
One of the client has accepted the exchange.
If both clients have accepted the exchange will end and the items will be exchanged.
client | The client that has accepted the exchange. |
Implements Exchange.
void PlayerToPlayerExchange::HandleEnd | ( | Client * | client | ) | [virtual] |
One of the clients has ended this exchange.
This will close the exchange on both the clients without transfer of items.
client | The client that has ended the exchange. |
Implements Exchange.
virtual bool PlayerToPlayerExchange::RemoveItem | ( | Client * | fromClient, |
int | slot, | ||
int | stackCount | ||
) | [virtual] |
Removes an item from the exchange.
Sends out the network messages to update the clients' views.
fromClient | The client that has removed an item. |
slot | The slot that the items were removed from. |
stackCount | The amount to remove from that slot. |
Reimplemented from Exchange.
virtual void PlayerToPlayerExchange::SendAddItemMessage | ( | Client * | fromClient, |
int | slot, | ||
psCharacterInventory::psCharacterInventoryItem * | item | ||
) | [protected, virtual] |
Reimplemented from Exchange.
void PlayerToPlayerExchange::SendExchangeStatusToBoth | ( | ) |
virtual void PlayerToPlayerExchange::SendRemoveItemMessage | ( | Client * | fromClient, |
int | slot | ||
) | [protected, virtual] |
Reimplemented from Exchange.