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

Public Member Functions

 CorruptTriggers (Unit *caster)
 
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
 

Detailed Description

Constructor & Destructor Documentation

◆ CorruptTriggers()

CorruptTriggers::CorruptTriggers ( Unit caster)
inline
111 : _caster(caster)
112 {
113 }
Unit * _caster
Definition: boss_felmyst.cpp:126

Member Function Documentation

◆ Execute()

bool CorruptTriggers::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

116 {
117 std::list<Creature*> cList;
119 for (std::list<Creature*>::const_iterator itr = cList.begin(); itr != cList.end(); ++itr)
120 if (_caster->GetExactDist2d(*itr) <= 11.0f)
121 (*itr)->CastSpell(*itr, SPELL_FOG_OF_CORRUPTION, true);
122 return true;
123 }
@ NPC_FOG_TRIGGER
Definition: boss_felmyst.cpp:105
@ SPELL_FOG_OF_CORRUPTION
Definition: boss_felmyst.cpp:59
void GetCreaturesWithEntryInRange(std::list< Creature * > &creatureList, float radius, uint32 entry)
Definition: Object.cpp:3084
float GetExactDist2d(const float x, const float y) const
Definition: Position.h:166

References _caster, WorldObject::GetCreaturesWithEntryInRange(), Position::GetExactDist2d(), NPC_FOG_TRIGGER, and SPELL_FOG_OF_CORRUPTION.

Member Data Documentation

◆ _caster

Unit* CorruptTriggers::_caster
private

Referenced by Execute().