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

Public Member Functions

 SuckBackEvent (Creature &owner, uint32 action)
 
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_owner
 
uint32 _action
 

Detailed Description

Constructor & Destructor Documentation

◆ SuckBackEvent()

SuckBackEvent::SuckBackEvent ( Creature owner,
uint32  action 
)
inline
101: BasicEvent(), _owner(owner), _action(action) { }
BasicEvent()=default
Creature & _owner
Definition: boss_reliquary_of_souls.cpp:116
uint32 _action
Definition: boss_reliquary_of_souls.cpp:117

Member Function Documentation

◆ Execute()

bool SuckBackEvent::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

104 {
105 if (_owner.IsSummon())
106 if (Unit* summoner = _owner.ToTempSummon()->GetSummonerUnit())
107 {
108 summoner->GetAI()->DoAction(_action);
111 }
112 return true;
113 }
@ UNIT_STAND_STATE_SUBMERGED
Definition: UnitDefines.h:41
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2178
Unit * GetSummonerUnit() const
Definition: TemporarySummon.cpp:44
Definition: Unit.h:630
TempSummon * ToTempSummon()
Definition: Unit.h:696
bool IsSummon() const
Definition: Unit.h:751
void SetStandState(uint8 state)
Definition: Unit.cpp:16726

References _action, _owner, Creature::DespawnOrUnsummon(), TempSummon::GetSummonerUnit(), Unit::IsSummon(), Unit::SetStandState(), Unit::ToTempSummon(), and UNIT_STAND_STATE_SUBMERGED.

Member Data Documentation

◆ _action

uint32 SuckBackEvent::_action
private

Referenced by Execute().

◆ _owner

Creature& SuckBackEvent::_owner
private

Referenced by Execute().