Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

PlayerToNPCExchange Class Reference

#include <exchangemanager.h>

List of all members.

Public Member Functions

bool CheckExchange (uint32_t clientNum, bool checkRange=false)
virtual void DeleteObjectCallback (iDeleteNotificationObject *object)
gemObjectGetTargetGEM ()
virtual bool HandleAccept (Client *client)
 One of the client has accepted the exchange.
virtual void HandleEnd (Client *client)
 One of the clients has ended this exchange.
 PlayerToNPCExchange (Client *starter, gemObject *target, bool automaticExchange, int questID, ExchangeManager *manager)
virtual ~PlayerToNPCExchange ()

Protected Member Functions

bool CheckXMLResponse (Client *client, psNPCDialog *dlg, csString trigger)
 A check to se if a exchange trigger trigg any response from the npc.

Protected Attributes

int questID
gemObjecttarget

Detailed Description

Definition at line 384 of file exchangemanager.h.


Constructor & Destructor Documentation

PlayerToNPCExchange::PlayerToNPCExchange ( Client starter,
gemObject target,
bool  automaticExchange,
int  questID,
ExchangeManager manager 
)
virtual PlayerToNPCExchange::~PlayerToNPCExchange ( ) [virtual]

Member Function Documentation

bool PlayerToNPCExchange::CheckExchange ( uint32_t  clientNum,
bool  checkRange = false 
)
bool PlayerToNPCExchange::CheckXMLResponse ( Client client,
psNPCDialog dlg,
csString  trigger 
) [protected]

A check to se if a exchange trigger trigg any response from the npc.

Parameters:
clientThe client
dlgThe dialog of the selected NPC
triggerA XML string of the items exchanged.
Returns:
Return true if a trigger was run with sucess.
virtual void PlayerToNPCExchange::DeleteObjectCallback ( iDeleteNotificationObject object) [virtual]

Implements iDeleteObjectCallback.

gemObject* PlayerToNPCExchange::GetTargetGEM ( )
virtual bool PlayerToNPCExchange::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.

Parameters:
clientThe client that has accepted the exchange.
Returns:
true If the exchange has ended.

Implements Exchange.

virtual void PlayerToNPCExchange::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.

Parameters:
clientThe client that has ended the exchange.

Implements Exchange.


Member Data Documentation

Definition at line 409 of file exchangemanager.h.

Definition at line 408 of file exchangemanager.h.


The documentation for this class was generated from the following file: