AzerothCore 3.3.5a
OpenSource WoW Emulator
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CorpseExplosionCheck Class Reference

Public Member Functions

 CorpseExplosionCheck (ObjectGuid casterGUID, bool allowGhoul)
 
bool operator() (WorldObject *obj) const
 

Private Attributes

ObjectGuid _casterGUID
 
bool _allowGhoul
 

Detailed Description

Constructor & Destructor Documentation

◆ CorpseExplosionCheck()

CorpseExplosionCheck::CorpseExplosionCheck ( ObjectGuid  casterGUID,
bool  allowGhoul 
)
inlineexplicit
1088: _casterGUID(casterGUID), _allowGhoul(allowGhoul) { }
ObjectGuid _casterGUID
Definition spell_dk.cpp:1104
bool _allowGhoul
Definition spell_dk.cpp:1105

Member Function Documentation

◆ operator()()

bool CorpseExplosionCheck::operator() ( WorldObject obj) const
inline
1091 {
1092 if (Unit* target = obj->ToUnit())
1093 {
1094 if ((target->isDead() || (_allowGhoul && target->GetEntry() == NPC_DK_GHOUL && target->GetOwnerGUID() == _casterGUID))
1095 && !(target->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL)
1096 && target->GetDisplayId() == target->GetNativeDisplayId())
1097 return false;
1098 }
1099
1100 return true;
1101 }
uint32 const CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL
Definition SharedDefines.h:2645
Unit * ToUnit()
Definition Object.h:210
Definition Unit.h:636
@ NPC_DK_GHOUL
Definition spell_dk.cpp:90

References _allowGhoul, _casterGUID, CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL, NPC_DK_GHOUL, and Object::ToUnit().

Member Data Documentation

◆ _allowGhoul

bool CorpseExplosionCheck::_allowGhoul
private

Referenced by operator()().

◆ _casterGUID

ObjectGuid CorpseExplosionCheck::_casterGUID
private

Referenced by operator()().


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