19 #ifndef HIRE_SESSION_HEADER 20 #define HIRE_SESSION_HEADER 64 bool Load(iResultRow &row);
70 bool Save(
bool newSession =
false);
81 void SetHireType(
const csString &name,
const csString &npcType);
151 void SetScript(
const csString &newScript);
223 csString hireTypeName;
224 csString hireTypeNPCType;
229 csString verifiedScript;
231 bool tempWorkLocationValid;
233 csWeakRef<gemActor> owner;
234 csWeakRef<gemNPC> hiredNPC;
The Hire Sessin will manage all aspects related to a specefic hiring of a NPC.
Location * GetWorkLocation()
Get work postion.
const csString & GetHireTypeName() const
Get hire type.
void SetWorkLocation(Location *location)
Set a new working location.
void SetMasterPID(PID masterPID)
Set pending hire master NPC PID.
bool VerifyPendingHireConfigured()
Verify if all requirments for hire is ok.
void SetVerified(bool state)
Set verified.
bool IsVerified()
Check if the script is verified.
bool Save(bool newSession=false)
Save to db.
void SetHiredNPC(gemNPC *hiredNPC)
Set hired NPC.
void SetTempWorkLocationValid(bool valid)
Set validity of temp work postion.
void SetScript(const csString &newScript)
Set the hired NPC script.
HireSession()
Constructor.
const csString & GetScript() const
Return the hired NPC script.
Any semi-autonomous object, either a player or an NPC.
PID GetMasterPID() const
Get Master PID.
bool GetTempWorkLocationValid()
Get validity of temp work postion.
int GetWorkLocationId()
Get work postion.
void SetOwner(gemActor *owner)
Set owner.
int ApplyScript()
Apply the script to the server.
void SetTempWorkLocation(Location *location)
Set a new working location.
void SetVerifiedScript(const csString &newVerifiedScript)
Save a verified script.
void SetHireType(const csString &name, const csString &npcType)
Set pending hire type.
const csString & GetHireTypeNPCType() const
Get hire type.
bool Delete()
Delete from db.
csString GetWorkLocationString()
Get work locaiton string.
Location * GetTempWorkLocation()
Get work postion.
PID GetOwnerPID()
Return the PID of the owner.
bool Load(iResultRow &row)
Load from db.
const csString & GetVerifiedScript() const
Return the verified hired NPC script.
bool ShouldLoad()
Indicate if script should be loaded upon hired npc attach after first load.
gemNPC * GetHiredNPC() const
Get hired NPC.
A Location is a named place on the map, located dynamically by NPCs as scripted.
csString GetTempWorkLocationString()
Get work postion string.
PID GetHiredPID()
Return the PID of the hired NPC.
virtual ~HireSession()
Destructor.
gemActor * GetOwner() const
Get owner.