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

#include "Spell.h"

Inheritance diagram for ReflectEvent:
BasicEvent

Public Member Functions

 ReflectEvent (Unit *caster, ObjectGuid targetGUID, SpellInfo const *spellInfo)
 
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 ()
 

Protected Attributes

Unit_caster
 
ObjectGuid _targetGUID
 
SpellInfo const * _spellInfo
 

Detailed Description

Constructor & Destructor Documentation

◆ ReflectEvent()

ReflectEvent::ReflectEvent ( Unit caster,
ObjectGuid  targetGUID,
SpellInfo const *  spellInfo 
)
inline
852: _caster(caster), _targetGUID(targetGUID), _spellInfo(spellInfo) { }
Unit * _caster
Definition: Spell.h:856
ObjectGuid _targetGUID
Definition: Spell.h:857
SpellInfo const * _spellInfo
Definition: Spell.h:858

Member Function Documentation

◆ Execute()

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

Reimplemented from BasicEvent.

8221{
8223 if (target && _caster->IsInMap(target))
8225 return true;
8226}
@ PROC_EX_REFLECT
Definition: SpellMgr.h:205
@ PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG
Definition: SpellMgr.h:132
@ PROC_FLAG_NONE
Definition: SpellMgr.h:105
@ BASE_ATTACK
Definition: Unit.h:209
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:199
bool IsInMap(WorldObject const *obj) const
Definition: Object.cpp:1296
Definition: Unit.h:630
static void ProcDamageAndSpell(Unit *actor, Unit *victim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, WeaponAttackType attType=BASE_ATTACK, SpellInfo const *procSpellInfo=nullptr, SpellInfo const *procAura=nullptr, int8 procAuraEffectIndex=-1, Spell const *procSpell=nullptr, DamageInfo *damageInfo=nullptr, HealInfo *healInfo=nullptr, uint32 procPhase=2)
Definition: Unit.cpp:6378

References _caster, _spellInfo, _targetGUID, BASE_ATTACK, ObjectAccessor::GetUnit(), WorldObject::IsInMap(), PROC_EX_REFLECT, PROC_FLAG_NONE, PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_NEG, and Unit::ProcDamageAndSpell().

Member Data Documentation

◆ _caster

Unit* ReflectEvent::_caster
protected

Referenced by Execute().

◆ _spellInfo

SpellInfo const* ReflectEvent::_spellInfo
protected

Referenced by Execute().

◆ _targetGUID

ObjectGuid ReflectEvent::_targetGUID
protected

Referenced by Execute().