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 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
844: _caster(caster), _targetGUID(targetGUID), _spellInfo(spellInfo) { }
Unit * _caster
Definition Spell.h:848
ObjectGuid _targetGUID
Definition Spell.h:849
SpellInfo const * _spellInfo
Definition Spell.h:850

Member Function Documentation

◆ Execute()

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

Reimplemented from BasicEvent.

8247{
8249 if (target && _caster->IsInMap(target))
8251 return true;
8252}
@ 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
Definition Unit.h:636
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:6433
bool IsInMap(WorldObject const *obj) const
Definition Object.cpp:1296
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition ObjectAccessor.cpp:199

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


The documentation for this class was generated from the following files: