Planeshift
|
The Hire Manager will manage all aspects related to hiring of NPCs. More...
#include <hiremanager.h>
Public Member Functions | |
bool | AddHiredNPC (gemNPC *hiredNPC) |
Register a hired NPC with the hire manager. More... | |
bool | AddOwner (gemActor *owner) |
Register an owner with the hire manager. More... | |
bool | CheckWorkLocationResult (gemNPC *hiredNPC, bool valid, const char *errorMessage) |
Result from work location check. More... | |
gemActor * | ConfirmHire (gemActor *owner) |
Confirm the hire. More... | |
bool | HandleScriptMessageRequest (uint32_t clientnum, gemActor *owner, gemNPC *hiredNPC) |
Start Scripting the hire. More... | |
HireManager () | |
Constructor. More... | |
bool | Initialize () |
Initialize the Hire Manager. More... | |
bool | ReleaseHire (gemActor *owner, gemNPC *hiredNPC) |
Release the hire. More... | |
bool | SetHireMasterPID (gemActor *owner, PID masterPID) |
Set the PID of the master NPC to use when hiring for a pending hire. More... | |
bool | SetHireType (gemActor *owner, const csString &name, const csString &npcType) |
Set the type of NPC to hire for a pending hire. More... | |
bool | StartHire (gemActor *owner) |
Start a new Hire Session. More... | |
virtual | ~HireManager () |
Destructor. More... | |
![]() | |
void | HandleMessage (MsgEntry *msg, Client *client) |
Transfers the message to the manager specific function. More... | |
void | Subscribe (FunctionPointer fpt, msgtype type, uint32_t flags=0x01) |
Subscribes this manager to a specific message type with a custom callback. More... | |
bool | Unsubscribe (msgtype type) |
Unsubscribes this manager from a specific message type. More... | |
bool | Unsubscribe (FunctionPointer handler, msgtype type) |
Unsubscribes a specific handler from a specific message type. More... | |
bool | UnsubscribeAll () |
Unsubscribes this manager from all message types. More... | |
virtual | ~MessageManager () |
Unsubscribes all messages then destroys this object. More... | |
![]() | |
csArray< csString > | DecodeCommandArea (Client *client, csString target) |
Decodes an area: expression. More... | |
gemObject * | FindObjectByString (const csString &str, gemActor *me) const |
Find the object we are referring to in str. More... | |
Client * | FindPlayerClient (const char *name) |
Finds Client* of character with given name. More... | |
virtual bool | Verify (MsgEntry *pMsg, unsigned int flags, Client *&client) |
Additional Inherited Members | |
![]() | |
typedef void(HireManager::* | FunctionPointer) (MsgEntry *, Client *) |
The Hire Manager will manage all aspects related to hiring of NPCs.
Players is allowed to Hire NPCs to do tasks for them. This can include selling of items, standing guard for the guild, etc. This manager handle the business logic related to this. For each hire a HireSession object is created to manage the details of each hire.
Definition at line 49 of file hiremanager.h.
HireManager::HireManager | ( | ) |
Constructor.
|
virtual |
Destructor.
bool HireManager::AddOwner | ( | gemActor * | owner | ) |
Register an owner with the hire manager.
bool HireManager::CheckWorkLocationResult | ( | gemNPC * | hiredNPC, |
bool | valid, | ||
const char * | errorMessage | ||
) |
Result from work location check.
Confirm the hire.
The Hired NPC will be created and given to player.
bool HireManager::Initialize | ( | ) |
Initialize the Hire Manager.
Handle all initialization that can go wrong.
bool HireManager::SetHireMasterPID | ( | gemActor * | owner, |
PID | masterPID | ||
) |
bool HireManager::SetHireType | ( | gemActor * | owner, |
const csString & | name, | ||
const csString & | npcType | ||
) |
bool HireManager::StartHire | ( | gemActor * | owner | ) |
Start a new Hire Session.
Establish the hire session for modification in the hiring process.
owner | The actor that start the process of hiring a NPC. |