Planeshift
psSaveCharEvent Class Reference

This is an event that schedules regular saving of character data. More...

#include <pscharacterloader.h>

Public Types

enum  Type { SAVE_PERIOD = 600000 }
 

Public Member Functions

virtual void DeleteObjectCallback (iDeleteNotificationObject *object)
 This is called when the client we were tracking has logged out and this mesage is no longer required. More...
 
 psSaveCharEvent (gemActor *actor)
 The GEM object want to save data with. More...
 
virtual void Trigger ()
 Trigger this message and re-insert it back into queue. More...
 
 ~psSaveCharEvent ()
 Destory Message. More...
 
- Public Member Functions inherited from psGameEvent
virtual bool CheckTrigger ()
 Called right before a Trigger is called. More...
 
const char * GetType ()
 Return the type that this event where created with. More...
 
virtual bool IsValid ()
 Return the valid flag. More...
 
bool operator< (const psGameEvent &other) const
 
bool operator== (const psGameEvent &other) const
 
bool operator> (const psGameEvent &other) const
 
 psGameEvent (csTicks ticks, int offsetticks, const char *newType)
 Construct a new game event. More...
 
void QueueEvent ()
 Publish the game event to the local program. More...
 
virtual void SetValid (bool valid)
 Set the valid flag. More...
 
virtual csString ToString () const
 Return a string with information about the event. More...
 
virtual ~psGameEvent ()
 
- Public Member Functions inherited from iDeleteObjectCallback
virtual ~iDeleteObjectCallback ()
 

Public Attributes

gemActoractor
 
- Public Attributes inherited from psGameEvent
csTicks delayticks
 delay before the event starts More...
 
int id
 id value combined with ticks ensures uniqueness for tree More...
 
csTicks triggerticks
 ticks value when event should be triggered. More...
 
bool valid
 Set this to false if the trigger should not be fired. More...
 

Additional Inherited Members

- Static Public Attributes inherited from psGameEvent
static EventManagereventmanager
 
static int nextid
 id counter sequence More...
 

Detailed Description

This is an event that schedules regular saving of character data.

This is done to allow some preservation of character data on a server crash. When a player logs in this event is pushed into the queue with a default delay. When this message triggers it will re-add itself to the queue until the player logs out.

Definition at line 239 of file pscharacterloader.h.

Member Enumeration Documentation

Enumerator
SAVE_PERIOD 

Definition at line 242 of file pscharacterloader.h.

Constructor & Destructor Documentation

psSaveCharEvent::psSaveCharEvent ( gemActor actor)

The GEM object want to save data with.

Construct the message.

Parameters
actorThe actor that has the character that we want to save.
psSaveCharEvent::~psSaveCharEvent ( )

Destory Message.

Member Function Documentation

virtual void psSaveCharEvent::DeleteObjectCallback ( iDeleteNotificationObject object)
virtual

This is called when the client we were tracking has logged out and this mesage is no longer required.

Parameters
objectThe gem object that we had registered to.

Implements iDeleteObjectCallback.

virtual void psSaveCharEvent::Trigger ( )
virtual

Trigger this message and re-insert it back into queue.

Implements psGameEvent.

Member Data Documentation

gemActor* psSaveCharEvent::actor

Definition at line 247 of file pscharacterloader.h.


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