AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
BasicEvent Class Reference

#include "EventProcessor.h"

Inheritance diagram for BasicEvent:
AssistDelayEvent AuctionListOwnerItemsDelayEvent AuraMunchingQueue AuraRemoveEvent BGQueueInviteEvent BGQueueRemoveEvent BattleExperienceEvent BoomEvent CaptainSurviveTalk CastArmageddon CastQuill CastRunesEvent ChargeRifts ConflagrateAuraStateDelayEvent CorruptTriggers CosmicSmashDamageEvent DaranavanMoveEvent DealDebrisDamage DeathEvent DelayedCastEvent DelayedCastMincharEvent DelayedMovementEvent DelayedSummonEvent DelayedTalk DelayedWindstoneSummonEvent EoEDrakeEnterVehicleEvent FixOrientation ForcedDespawnDelayEvent ForcedUnsummonDelayEvent FrostBombExplosion FrostwyrmLandEvent HideNpcEvent IceTombSummonEvent KillMagnetEvent LambdaBasicEvent< T > LichKingDeathEvent LichKingMovieEvent MoveDelayed NpcRunToHome OrcDeathEvent OrcMoveEvent PartyTimeEmoteEvent PhasedRespawn RedirectSpellEvent ReflectEvent ResetEncounterEvent RespawnEvent RestoreAttack RestoreFight RestoreFight SACActivateEvent SACDeactivateEvent SendEncounterUnit ShockVortexExplodeEvent SlaveRunEvent SpellEvent StandUpEvent StartMovementEvent SuckBackEvent TemporaryThreatModifierEvent TriggerWickedSpirit UtherBatteredHiltEvent ValithriaDespawner VehicleDespawnEvent VerasEnvenom VileSpiritActivateEvent lapseTeleport startFollow

Public Member Functions

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

Private Types

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

Private Member Functions

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

Private Attributes

AbortState m_abortState {AbortState::STATE_RUNNING}
 
uint64 m_addTime {0}
 
uint64 m_execTime {0}
 

Friends

class EventProcessor
 

Detailed Description

Member Enumeration Documentation

◆ AbortState

enum class BasicEvent::AbortState : uint8
strongprivate
Enumerator
STATE_RUNNING 
STATE_ABORT_SCHEDULED 
STATE_ABORTED 

Constructor & Destructor Documentation

◆ BasicEvent()

BasicEvent::BasicEvent ( )
default

◆ ~BasicEvent()

virtual BasicEvent::~BasicEvent ( )
virtualdefault

Member Function Documentation

◆ Abort()

virtual void BasicEvent::Abort ( uint64  )
inlinevirtual

Reimplemented in SpellEvent, BGQueueInviteEvent, BGQueueRemoveEvent, and AuctionListOwnerItemsDelayEvent.

56{ } // this method executes when the event is aborted

◆ Execute()

◆ IsAborted()

bool BasicEvent::IsAborted ( ) const
inlineprivate
AbortState m_abortState
Definition: EventProcessor.h:67

References m_abortState, and STATE_ABORTED.

Referenced by SetAborted().

◆ IsAbortScheduled()

bool BasicEvent::IsAbortScheduled ( ) const
inlineprivate

◆ IsDeletable()

virtual bool BasicEvent::IsDeletable ( ) const
inlinevirtual

Reimplemented in SpellEvent.

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

◆ IsRunning()

bool BasicEvent::IsRunning ( ) const
inlineprivate

References m_abortState, and STATE_RUNNING.

Referenced by ScheduleAbort().

◆ ScheduleAbort()

void BasicEvent::ScheduleAbort ( )
22{
24 && "Tried to scheduled the abortion of an event twice!");
26}
#define ASSERT
Definition: Errors.h:68
bool IsRunning() const
Definition: EventProcessor.h:63

References ASSERT, IsRunning(), m_abortState, and STATE_ABORT_SCHEDULED.

◆ SetAborted()

void BasicEvent::SetAborted ( )
private
29{
31 && "Tried to abort an already aborted event!");
33}
bool IsAborted() const
Definition: EventProcessor.h:65

References ASSERT, IsAborted(), m_abortState, and STATE_ABORTED.

Friends And Related Function Documentation

◆ EventProcessor

friend class EventProcessor
friend

Member Data Documentation

◆ m_abortState

◆ m_addTime

uint64 BasicEvent::m_addTime {0}
private

◆ m_execTime

uint64 BasicEvent::m_execTime {0}
private