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

Public Member Functions

 ResetEncounterEvent (Unit *caster, uint32 spellId, ObjectGuid otherTransport)
 
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

Unit_caster
 
uint32 _spellId
 
ObjectGuid _otherTransport
 

Detailed Description

Constructor & Destructor Documentation

◆ ResetEncounterEvent()

ResetEncounterEvent::ResetEncounterEvent ( Unit caster,
uint32  spellId,
ObjectGuid  otherTransport 
)
inline
517: _caster(caster), _spellId(spellId), _otherTransport(otherTransport) { }
ObjectGuid _otherTransport
Definition: boss_icecrown_gunship_battle.cpp:537
Unit * _caster
Definition: boss_icecrown_gunship_battle.cpp:535
uint32 _spellId
Definition: boss_icecrown_gunship_battle.cpp:536

Member Function Documentation

◆ Execute()

bool ResetEncounterEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

520 {
524
526 {
527 transport->ToMotionTransport()->UnloadNonStaticPassengers();
528 transport->AddObjectToRemoveList();
529 }
530
531 return true;
532 }
Transport * GetTransport(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:189
MotionTransport * ToMotionTransport()
Definition: GameObject.h:327
void AddObjectToRemoveList()
Definition: Object.cpp:2160
Transport * GetTransport() const
Definition: Object.h:604
Definition: Transport.h:29
void UnloadNonStaticPassengers()
Definition: Transport.cpp:441
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 _caster, _otherTransport, _spellId, WorldObject::AddObjectToRemoveList(), Unit::CastSpell(), WorldObject::GetTransport(), ObjectAccessor::GetTransport(), GameObject::ToMotionTransport(), and MotionTransport::UnloadNonStaticPassengers().

Member Data Documentation

◆ _caster

Unit* ResetEncounterEvent::_caster
private

Referenced by Execute().

◆ _otherTransport

ObjectGuid ResetEncounterEvent::_otherTransport
private

Referenced by Execute().

◆ _spellId

uint32 ResetEncounterEvent::_spellId
private

Referenced by Execute().