TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::FriendlyMissingBuffInRange Class Reference

#include <GridNotifiers.h>

Public Member Functions

 FriendlyMissingBuffInRange (Unit const *obj, float range, uint32 spellid)
 
bool operator() (Unit *u)
 

Private Attributes

Unit consti_obj
 
float i_range
 
uint32 i_spell
 

Constructor & Destructor Documentation

Trinity::FriendlyMissingBuffInRange::FriendlyMissingBuffInRange ( Unit const obj,
float  range,
uint32  spellid 
)
inline
781 : i_obj(obj), i_range(range), i_spell(spellid) { }
uint32 i_spell
Definition: GridNotifiers.h:794
Unit const * i_obj
Definition: GridNotifiers.h:792
float i_range
Definition: GridNotifiers.h:793

Member Function Documentation

bool Trinity::FriendlyMissingBuffInRange::operator() ( Unit u)
inline
783  {
784  if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
785  !(u->HasAura(i_spell)))
786  {
787  return true;
788  }
789  return false;
790  }
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4240
bool IsInCombat() const
Definition: Unit.h:1584
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
uint32 i_spell
Definition: GridNotifiers.h:794
Unit const * i_obj
Definition: GridNotifiers.h:792
bool IsAlive() const
Definition: Unit.h:1692
bool IsHostileTo(Unit const *unit) const
Definition: Unit.cpp:7165
float i_range
Definition: GridNotifiers.h:793

+ Here is the call graph for this function:

Member Data Documentation

Unit const* Trinity::FriendlyMissingBuffInRange::i_obj
private
float Trinity::FriendlyMissingBuffInRange::i_range
private
uint32 Trinity::FriendlyMissingBuffInRange::i_spell
private

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