Planeshift
psRespawnGameEvent Class Reference

When an NPC or mob is killed in the spawn manager, its respawn event is immediately created and added to the schedule to be triggered at the appropriate time. More...

#include <spawnmanager.h>

Public Member Functions

 psRespawnGameEvent (SpawnManager *mgr, int delayticks, PID playerID, SpawnRule *spawnRule)
 Event to respawn given PID in a position to be found by the spawnRule. More...
 
virtual void Trigger ()
 Abstract event processing function. 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 ()
 

Protected Attributes

PID playerID
 The PID of the entity to respawn. More...
 
SpawnManagerspawnmanager
 
SpawnRulespawnRule
 The rule to use for determine where. More...
 

Additional Inherited Members

- 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...
 
- Static Public Attributes inherited from psGameEvent
static EventManagereventmanager
 
static int nextid
 id counter sequence More...
 

Detailed Description

When an NPC or mob is killed in the spawn manager, its respawn event is immediately created and added to the schedule to be triggered at the appropriate time.

Definition at line 400 of file spawnmanager.h.

Constructor & Destructor Documentation

psRespawnGameEvent::psRespawnGameEvent ( SpawnManager mgr,
int  delayticks,
PID  playerID,
SpawnRule spawnRule 
)

Event to respawn given PID in a position to be found by the spawnRule.

Member Function Documentation

virtual void psRespawnGameEvent::Trigger ( )
virtual

Abstract event processing function.

This functino have to be overridden and will be called if CheckTrigger is ok at the time given in the constructor.

Implements psGameEvent.

Member Data Documentation

PID psRespawnGameEvent::playerID
protected

The PID of the entity to respawn.

Definition at line 404 of file spawnmanager.h.

SpawnManager* psRespawnGameEvent::spawnmanager
protected

Definition at line 403 of file spawnmanager.h.

SpawnRule* psRespawnGameEvent::spawnRule
protected

The rule to use for determine where.

Definition at line 405 of file spawnmanager.h.


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