AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck Class Reference

#include "GridNotifiers.h"

Public Member Functions

 AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck (Unit const *funit, float range)
 
bool operator() (Unit const *u)
 

Private Attributes

Unit const * i_funit
 
float i_range
 

Detailed Description

Constructor & Destructor Documentation

◆ AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck()

Acore::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck ( Unit const *  funit,
float  range 
)
inline
958 : i_funit(funit), i_range(range) {}
Unit const * i_funit
Definition: GridNotifiers.h:971

Member Function Documentation

◆ operator()()

bool Acore::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck::operator() ( Unit const *  u)
inline
961 {
962 return u->IsAlive()
964 && !i_funit->IsFriendlyTo(u)
966 && !u->IsCritter()
967 && !u->IsTotem() //xinef: dont attack totems
968 /*&& i_funit->CanSeeOrDetect(u)*/; // pussywizard: already checked in IsValidAttackTarget(u)
969 }
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
Definition: Object.cpp:1323
bool IsValidAttackTarget(Unit const *target) const
Definition: Unit.cpp:14620
bool IsFriendlyTo(Unit const *unit) const
Definition: Unit.cpp:11058

References i_funit, i_range, Unit::IsAlive(), Unit::IsCritter(), Unit::IsFriendlyTo(), Unit::IsTotem(), Unit::IsValidAttackTarget(), and WorldObject::IsWithinDistInMap().

Member Data Documentation

◆ i_funit

Unit const* Acore::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck::i_funit
private

Referenced by operator()().

◆ i_range

float Acore::AnyUnfriendlyAttackableVisibleUnitInObjectRangeCheck::i_range
private

Referenced by operator()().