AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck Class Reference

#include "GridNotifiers.h"

Public Member Functions

 AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck (WorldObject const *obj, Unit const *funit, float range)
 
bool operator() (Unit *u)
 

Private Attributes

WorldObject const * i_obj
 
Unit const * i_funit
 
float i_range
 

Detailed Description

Constructor & Destructor Documentation

◆ AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck()

Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck ( WorldObject const *  obj,
Unit const *  funit,
float  range 
)
inline
1125 : i_obj(obj), i_funit(funit), i_range(range)
1126 {}
WorldObject const * i_obj
Definition: GridNotifiers.h:1140
Unit const * i_funit
Definition: GridNotifiers.h:1141

Member Function Documentation

◆ operator()()

bool Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck::operator() ( Unit u)
inline
1128 {
1130 return false;
1131 if (u->GetGUID() == i_funit->GetGUID())
1132 return false;
1133
1135 return true;
1136
1137 return false;
1138 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:230
@ UNIT_FLAG_NOT_SELECTABLE
Definition: UnitDefines.h:254
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1332
bool HasUnitFlag(UnitFlags flags) const
Definition: Unit.h:712
bool IsAlive() const
Definition: Unit.h:1654
bool IsImmuneToPC() const
Definition: Unit.h:877
bool IsInCombat() const
Definition: Unit.h:884

References Object::GetGUID(), Unit::HasUnitFlag(), i_funit, i_obj, i_range, Unit::IsAlive(), Unit::IsImmuneToPC(), Unit::IsInCombat(), WorldObject::IsWithinDistInMap(), UNIT_FLAG_NON_ATTACKABLE, and UNIT_FLAG_NOT_SELECTABLE.

Member Data Documentation

◆ i_funit

Unit const* Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck::i_funit
private

Referenced by operator()().

◆ i_obj

WorldObject const* Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck::i_obj
private

Referenced by operator()().

◆ i_range

float Acore::AnyAttackableUnitExceptForOriginalCasterInObjectRangeCheck::i_range
private

Referenced by operator()().