TrinityCore
BasicEvent Class Reference

#include <EventProcessor.h>

Public Member Functions

 BasicEvent ()
 
virtual ~BasicEvent ()
 
virtual bool Execute (uint64, uint32)
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 
void ScheduleAbort ()
 

Private Types

enum  AbortState : uint8 { AbortState::STATE_RUNNING, AbortState::STATE_ABORT_SCHEDULED, AbortState::STATE_ABORTED }
 

Private Member Functions

void SetAborted ()
 
bool IsRunning () const
 
bool IsAbortScheduled () const
 
bool IsAborted () const
 

Private Attributes

AbortState m_abortState
 
uint64 m_addTime
 
uint64 m_execTime
 

Friends

class EventProcessor
 

Member Enumeration Documentation

◆ AbortState

enum BasicEvent::AbortState : uint8
strongprivate
Enumerator
STATE_RUNNING 
STATE_ABORT_SCHEDULED 
STATE_ABORTED 
33  : uint8
34  {
35  STATE_RUNNING,
36  STATE_ABORT_SCHEDULED,
37  STATE_ABORTED
38  };
uint8_t uint8
Definition: Define.h:154

Constructor & Destructor Documentation

◆ BasicEvent()

BasicEvent::BasicEvent ( )
inline
uint64 m_addTime
Definition: EventProcessor.h:67
uint64 m_execTime
Definition: EventProcessor.h:68
AbortState m_abortState
Definition: EventProcessor.h:64

◆ ~BasicEvent()

virtual BasicEvent::~BasicEvent ( )
inlinevirtual
44 { } // override destructor to perform some actions on event removal

Member Function Documentation

◆ Abort()

virtual void BasicEvent::Abort ( uint64  )
inlinevirtual

Reimplemented in SpellEvent, GameObjectDeleteDelayEvent, BGQueueRemoveEvent, BGQueueInviteEvent, and VehicleJoinEvent.

53 { } // this method executes when the event is aborted
+ Here is the caller graph for this function:

◆ Execute()

◆ IsAborted()

bool BasicEvent::IsAborted ( ) const
inlineprivate
AbortState m_abortState
Definition: EventProcessor.h:64
+ Here is the caller graph for this function:

◆ IsAbortScheduled()

bool BasicEvent::IsAbortScheduled ( ) const
inlineprivate
AbortState m_abortState
Definition: EventProcessor.h:64

◆ IsDeletable()

virtual bool BasicEvent::IsDeletable ( ) const
inlinevirtual

Reimplemented in SpellEvent.

51 { return true; } // this event can be safely deleted

◆ IsRunning()

bool BasicEvent::IsRunning ( ) const
inlineprivate
AbortState m_abortState
Definition: EventProcessor.h:64
+ Here is the caller graph for this function:

◆ ScheduleAbort()

void BasicEvent::ScheduleAbort ( )
22 {
24  && "Tried to scheduled the abortion of an event twice!");
26 }
bool IsRunning() const
Definition: EventProcessor.h:60
#define ASSERT
Definition: Errors.h:57
AbortState m_abortState
Definition: EventProcessor.h:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAborted()

void BasicEvent::SetAborted ( )
private
29 {
30  ASSERT(!IsAborted()
31  && "Tried to abort an already aborted event!");
33 }
bool IsAborted() const
Definition: EventProcessor.h:62
#define ASSERT
Definition: Errors.h:57
AbortState m_abortState
Definition: EventProcessor.h:64
+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ EventProcessor

friend class EventProcessor
friend

Member Data Documentation

◆ m_abortState

AbortState BasicEvent::m_abortState
private

◆ m_addTime

uint64 BasicEvent::m_addTime
private

◆ m_execTime

uint64 BasicEvent::m_execTime
private

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