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. | |
bool | AddOwner (gemActor *owner) |
Register an owner with the hire manager. | |
bool | CheckWorkLocationResult (gemNPC *hiredNPC, bool valid, const char *errorMessage) |
Result from work location check. | |
gemActor * | ConfirmHire (gemActor *owner) |
Confirm the hire. | |
bool | HandleScriptMessageRequest (uint32_t clientnum, gemActor *owner, gemNPC *hiredNPC) |
Start Scripting the hire. | |
HireManager () | |
Constructor. | |
bool | Initialize () |
Initialize the Hire Manager. | |
bool | ReleaseHire (gemActor *owner, gemNPC *hiredNPC) |
Release the hire. | |
bool | SetHireMasterPID (gemActor *owner, PID masterPID) |
Set the PID of the master NPC to use when hiring for a pending hire. | |
bool | SetHireType (gemActor *owner, const csString &name, const csString &npcType) |
Set the type of NPC to hire for a pending hire. | |
bool | StartHire (gemActor *owner) |
Start a new Hire Session. | |
virtual | ~HireManager () |
Destructor. |
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 HireManager::~HireManager | ( | ) | [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. |