AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
DelayedCastEvent Class Reference
Inheritance diagram for DelayedCastEvent:
BasicEvent

Public Member Functions

 DelayedCastEvent (Creature *trigger, uint32 spellId, ObjectGuid originalCaster, uint32 despawnTime)
 
bool Execute (uint64, uint32) override
 
- Public Member Functions inherited from BasicEvent
 BasicEvent ()=default
 
virtual ~BasicEvent ()=default
 
virtual bool Execute (uint64, uint32)
 
virtual bool IsDeletable () const
 
virtual void Abort (uint64)
 
void ScheduleAbort ()
 

Private Attributes

Creature_trigger
 
ObjectGuid _originalCaster
 
uint32 _spellId
 
uint32 _despawnTime
 

Detailed Description

Constructor & Destructor Documentation

◆ DelayedCastEvent()

DelayedCastEvent::DelayedCastEvent ( Creature trigger,
uint32  spellId,
ObjectGuid  originalCaster,
uint32  despawnTime 
)
inline
180 : _trigger(trigger), _originalCaster(originalCaster), _spellId(spellId), _despawnTime(despawnTime)
181 {
182 }
Creature * _trigger
Definition: boss_valithria_dreamwalker.cpp:193
uint32 _spellId
Definition: boss_valithria_dreamwalker.cpp:195
uint32 _despawnTime
Definition: boss_valithria_dreamwalker.cpp:196
ObjectGuid _originalCaster
Definition: boss_valithria_dreamwalker.cpp:194

Member Function Documentation

◆ Execute()

bool DelayedCastEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

185 {
186 _trigger->CastSpell(_trigger, _spellId, false, nullptr, nullptr, _originalCaster);
187 if (_despawnTime)
189 return true;
190 }
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2178
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1167

References _despawnTime, _originalCaster, _spellId, _trigger, Unit::CastSpell(), and Creature::DespawnOrUnsummon().

Member Data Documentation

◆ _despawnTime

uint32 DelayedCastEvent::_despawnTime
private

Referenced by Execute().

◆ _originalCaster

ObjectGuid DelayedCastEvent::_originalCaster
private

Referenced by Execute().

◆ _spellId

uint32 DelayedCastEvent::_spellId
private

Referenced by Execute().

◆ _trigger

Creature* DelayedCastEvent::_trigger
private

Referenced by Execute().