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
85: _caster(caster) { }
Unit * _caster
Definition: boss_felmyst.cpp:98

Member Function Documentation

◆ Execute()

bool CorruptTriggers::Execute ( uint64  ,
uint32   
)
inlineoverridevirtual

Reimplemented from BasicEvent.

88 {
89 std::list<Creature*> creatureList;
91 for (auto const& creature : creatureList)
92 if (_caster->GetExactDist2d(creature) <= 11.0f)
93 creature->CastSpell(creature, SPELL_FOG_OF_CORRUPTION, true);
94 return true;
95 }
@ NPC_FOG_TRIGGER
Definition: boss_felmyst.cpp:79
@ SPELL_FOG_OF_CORRUPTION
Definition: boss_felmyst.cpp:59
void GetCreaturesWithEntryInRange(std::list< Creature * > &creatureList, float radius, uint32 entry)
Definition: Object.cpp:3097
float GetExactDist2d(const float x, const float y) const
Definition: Position.h:165

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().