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

Public Member Functions

 RaiseDeadCheck (Player const *caster)
 
bool operator() (WorldObject *obj) const
 

Private Attributes

Player const * _caster
 

Detailed Description

Constructor & Destructor Documentation

◆ RaiseDeadCheck()

RaiseDeadCheck::RaiseDeadCheck ( Player const *  caster)
inlineexplicit
1846: _caster(caster) { }
Player const * _caster
Definition: spell_dk.cpp:1863

Member Function Documentation

◆ operator()()

bool RaiseDeadCheck::operator() ( WorldObject obj) const
inline
1849 {
1850 if (Unit* target = obj->ToUnit())
1851 {
1852 if (!target->IsAlive()
1853 && _caster->isHonorOrXPTarget(target)
1854 && target->GetCreatureType() == CREATURE_TYPE_HUMANOID
1855 && target->GetDisplayId() == target->GetNativeDisplayId())
1856 return false;
1857 }
1858
1859 return true;
1860 }
@ CREATURE_TYPE_HUMANOID
Definition: SharedDefines.h:2634
Unit * ToUnit()
Definition: Object.h:206
bool isHonorOrXPTarget(Unit *victim) const
Definition: Player.cpp:12676
Definition: Unit.h:630

References _caster, CREATURE_TYPE_HUMANOID, Player::isHonorOrXPTarget(), and Object::ToUnit().

Member Data Documentation

◆ _caster

Player const* RaiseDeadCheck::_caster
private

Referenced by operator()().