AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ForcedDespawnDelayEvent Class Reference

#include "Creature.h"

Inheritance diagram for ForcedDespawnDelayEvent:
BasicEvent

Public Member Functions

 ForcedDespawnDelayEvent (Creature &owner, Seconds respawnTimer)
 
bool Execute (uint64 e_time, uint32 p_time) 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

Creaturem_owner
 
Seconds const m_respawnTimer
 

Detailed Description

Constructor & Destructor Documentation

◆ ForcedDespawnDelayEvent()

ForcedDespawnDelayEvent::ForcedDespawnDelayEvent ( Creature owner,
Seconds  respawnTimer 
)
inline
540: BasicEvent(), m_owner(owner), m_respawnTimer(respawnTimer) { }
BasicEvent()=default
Seconds const m_respawnTimer
Definition: Creature.h:545
Creature & m_owner
Definition: Creature.h:544

Member Function Documentation

◆ Execute()

bool ForcedDespawnDelayEvent::Execute ( uint64  e_time,
uint32  p_time 
)
overridevirtual

Reimplemented from BasicEvent.

252{
253 m_owner.DespawnOrUnsummon(0s, m_respawnTimer); // since we are here, we are not TempSummon as object type cannot change during runtime
254 return true;
255}
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2178

References Creature::DespawnOrUnsummon(), m_owner, and m_respawnTimer.

Member Data Documentation

◆ m_owner

Creature& ForcedDespawnDelayEvent::m_owner
private

Referenced by Execute().

◆ m_respawnTimer

Seconds const ForcedDespawnDelayEvent::m_respawnTimer
private

Referenced by Execute().