20 #ifndef __GAMEEVENT_H__ 21 #define __GAMEEVENT_H__ 23 #include <csutil/csstring.h> 52 psGameEvent(csTicks ticks,
int offsetticks,
const char* newType);
124 return "Not implemented";
int id
id value combined with ticks ensures uniqueness for tree
virtual void Trigger()=0
Abstract event processing function.
static EventManager * eventmanager
bool operator<(const psGameEvent &other) const
virtual bool IsValid()
Return the valid flag.
static int nextid
id counter sequence
virtual void SetValid(bool valid)
Set the valid flag.
const char * GetType()
Return the type that this event where created with.
void QueueEvent()
Publish the game event to the local program.
virtual bool CheckTrigger()
Called right before a Trigger is called.
csTicks delayticks
delay before the event starts
virtual csString ToString() const
Return a string with information about the event.
bool valid
Set this to false if the trigger should not be fired.
csTicks triggerticks
ticks value when event should be triggered.
psGameEvent(csTicks ticks, int offsetticks, const char *newType)
Construct a new game event.
All scheduled events must inherit from this class.
bool operator==(const psGameEvent &other) const
bool operator>(const psGameEvent &other) const
This class handles all queueing and invoking of timed events, such as combat, spells, NPC dialog responses, range weapons, or NPC respawning.