Planeshift
|
The Hire Sessin will manage all aspects related to a specefic hiring of a NPC. More...
#include <hiresession.h>
Public Member Functions | |
int | ApplyScript () |
Apply the script to the server. | |
bool | Delete () |
Delete from db. | |
gemNPC * | GetHiredNPC () const |
Get hired NPC. | |
PID | GetHiredPID () |
Return the PID of the hired NPC. | |
const csString & | GetHireTypeName () const |
Get hire type. | |
const csString & | GetHireTypeNPCType () const |
Get hire type. | |
PID | GetMasterPID () const |
Get Master PID. | |
gemActor * | GetOwner () const |
Get owner. | |
PID | GetOwnerPID () |
Return the PID of the owner. | |
const csString & | GetScript () const |
Return the hired NPC script. | |
Location * | GetTempWorkLocation () |
Get work postion. | |
csString | GetTempWorkLocationString () |
Get work postion string. | |
bool | GetTempWorkLocationValid () |
Get validity of temp work postion. | |
const csString & | GetVerifiedScript () const |
Return the verified hired NPC script. | |
Location * | GetWorkLocation () |
Get work postion. | |
int | GetWorkLocationId () |
Get work postion. | |
csString | GetWorkLocationString () |
Get work locaiton string. | |
HireSession (gemActor *owner) | |
Constructor. | |
HireSession () | |
Constructor. | |
bool | IsVerified () |
Check if the script is verified. | |
bool | Load (iResultRow &row) |
Load from db. | |
bool | Save (bool newSession=false) |
Save to db. | |
void | SetHiredNPC (gemNPC *hiredNPC) |
Set hired NPC. | |
void | SetHireType (const csString &name, const csString &npcType) |
Set pending hire type. | |
void | SetMasterPID (PID masterPID) |
Set pending hire master NPC PID. | |
void | SetOwner (gemActor *owner) |
Set owner. | |
void | SetScript (const csString &newScript) |
Set the hired NPC script. | |
void | SetTempWorkLocation (Location *location) |
Set a new working location. | |
void | SetTempWorkLocationValid (bool valid) |
Set validity of temp work postion. | |
void | SetVerified (bool state) |
Set verified. | |
void | SetVerifiedScript (const csString &newVerifiedScript) |
Save a verified script. | |
void | SetWorkLocation (Location *location) |
Set a new working location. | |
bool | ShouldLoad () |
Indicate if script should be loaded upon hired npc attach after first load. | |
bool | VerifyPendingHireConfigured () |
Verify if all requirments for hire is ok. | |
virtual | ~HireSession () |
Destructor. |
The Hire Sessin will manage all aspects related to a specefic hiring of a NPC.
Players is allowed to Hire NPCs to do tasks for them. This can include selling of items, standing guard for the guild, etc. This session handle the details for the hire session. The main business logic for hiring is managed by the HireManager.
Definition at line 45 of file hiresession.h.
HireSession::HireSession | ( | ) |
Constructor.
HireSession::HireSession | ( | gemActor * | owner | ) |
Constructor.
owner | The player that start to hire a NPCs. |
virtual HireSession::~HireSession | ( | ) | [virtual] |
Destructor.
int HireSession::ApplyScript | ( | ) |
Apply the script to the server.
bool HireSession::Delete | ( | ) |
Delete from db.
const csString& HireSession::GetHireTypeName | ( | ) | const |
const csString& HireSession::GetHireTypeNPCType | ( | ) | const |
PID HireSession::GetMasterPID | ( | ) | const |
Get Master PID.
gemActor* HireSession::GetOwner | ( | ) | const |
Get owner.
PID HireSession::GetOwnerPID | ( | ) |
Return the PID of the owner.
const csString& HireSession::GetScript | ( | ) | const |
Return the hired NPC script.
Location* HireSession::GetTempWorkLocation | ( | ) |
Get work postion.
csString HireSession::GetTempWorkLocationString | ( | ) |
Get work postion string.
bool HireSession::GetTempWorkLocationValid | ( | ) |
Get validity of temp work postion.
const csString& HireSession::GetVerifiedScript | ( | ) | const |
Return the verified hired NPC script.
Location* HireSession::GetWorkLocation | ( | ) |
Get work postion.
int HireSession::GetWorkLocationId | ( | ) |
Get work postion.
csString HireSession::GetWorkLocationString | ( | ) |
Get work locaiton string.
bool HireSession::IsVerified | ( | ) |
Check if the script is verified.
bool HireSession::Load | ( | iResultRow & | row | ) |
Load from db.
bool HireSession::Save | ( | bool | newSession = false | ) |
Save to db.
newSession | Set to true if this is a new session. |
void HireSession::SetHiredNPC | ( | gemNPC * | hiredNPC | ) |
void HireSession::SetHireType | ( | const csString & | name, |
const csString & | npcType | ||
) |
void HireSession::SetMasterPID | ( | PID | masterPID | ) |
void HireSession::SetScript | ( | const csString & | newScript | ) |
Set the hired NPC script.
void HireSession::SetTempWorkLocation | ( | Location * | location | ) |
Set a new working location.
void HireSession::SetTempWorkLocationValid | ( | bool | valid | ) |
Set validity of temp work postion.
void HireSession::SetVerified | ( | bool | state | ) |
Set verified.
void HireSession::SetVerifiedScript | ( | const csString & | newVerifiedScript | ) |
Save a verified script.
void HireSession::SetWorkLocation | ( | Location * | location | ) |
Set a new working location.
bool HireSession::ShouldLoad | ( | ) |
Indicate if script should be loaded upon hired npc attach after first load.
bool HireSession::VerifyPendingHireConfigured | ( | ) |
Verify if all requirments for hire is ok.