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
847: _caster(caster), _targetGUID(targetGUID), _spellInfo(spellInfo) { }
Unit * _caster
Definition: Spell.h:851
ObjectGuid _targetGUID
Definition: Spell.h:852
SpellInfo const * _spellInfo
Definition: Spell.h:853

Member Function Documentation

◆ Execute()

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

Reimplemented from BasicEvent.

8175{
8177 if (target && _caster->IsInMap(target))
8179 return true;
8180}
@ BASE_ATTACK
Definition: Unit.h:396
@ 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
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:202
bool IsInMap(WorldObject const *obj) const
Definition: Object.cpp:1285
Definition: Unit.h:1302
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:6316

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