AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::WorldObjectSpellAreaTargetCheck Struct Reference

#include "Spell.h"

Inheritance diagram for Acore::WorldObjectSpellAreaTargetCheck:
Acore::WorldObjectSpellTargetCheck Acore::WorldObjectSpellConeTargetCheck Acore::WorldObjectSpellTrajTargetCheck

Public Member Functions

 WorldObjectSpellAreaTargetCheck (float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
 
bool operator() (WorldObject *target)
 
- Public Member Functions inherited from Acore::WorldObjectSpellTargetCheck
 WorldObjectSpellTargetCheck (Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
 
 ~WorldObjectSpellTargetCheck ()
 
bool operator() (WorldObject *target)
 

Public Attributes

float _range
 
Position const * _position
 
- Public Attributes inherited from Acore::WorldObjectSpellTargetCheck
Unit_caster
 
Unit_referer
 
SpellInfo const * _spellInfo
 
SpellTargetCheckTypes _targetSelectionType
 
ConditionSourceInfo_condSrcInfo
 
ConditionList_condList
 

Detailed Description

Constructor & Destructor Documentation

◆ WorldObjectSpellAreaTargetCheck()

Acore::WorldObjectSpellAreaTargetCheck::WorldObjectSpellAreaTargetCheck ( float  range,
Position const *  position,
Unit caster,
Unit referer,
SpellInfo const *  spellInfo,
SpellTargetCheckTypes  selectionType,
ConditionList condList 
)
9082 : WorldObjectSpellTargetCheck(caster, referer, spellInfo, selectionType, condList), _range(range), _position(position)
9083 {
9084 }
float _range
Definition Spell.h:816
Position const * _position
Definition Spell.h:817
WorldObjectSpellTargetCheck(Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
Definition Spell.cpp:8984

Member Function Documentation

◆ operator()()

bool Acore::WorldObjectSpellAreaTargetCheck::operator() ( WorldObject target)
9087 {
9088 if (target->IsGameObject())
9089 {
9091 return false;
9092 }
9093 else if (!target->IsWithinDist3d(_position, _range))
9094 return false;
9095 else if (target->IsCreature() && target->ToCreature()->IsAvoidingAOE()) // pussywizard
9096 return false;
9098 }
bool IsAvoidingAOE() const
Definition Creature.h:131
bool IsInRange(float x, float y, float z, float radius) const
Definition GameObject.cpp:2143
bool IsGameObject() const
Definition Object.h:212
GameObject * ToGameObject()
Definition Object.h:213
bool IsCreature() const
Definition Object.h:204
Creature * ToCreature()
Definition Object.h:205
bool IsWithinDist3d(float x, float y, float z, float dist) const
Definition Object.cpp:1306
bool operator()(WorldObject *target)
Definition Spell.cpp:9000
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122

References _position, _range, Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Creature::IsAvoidingAOE(), Object::IsCreature(), Object::IsGameObject(), GameObject::IsInRange(), WorldObject::IsWithinDist3d(), Acore::WorldObjectSpellTargetCheck::operator()(), Object::ToCreature(), and Object::ToGameObject().

Referenced by Acore::WorldObjectSpellConeTargetCheck::operator()(), and Acore::WorldObjectSpellTrajTargetCheck::operator()().

Member Data Documentation

◆ _position

Position const* Acore::WorldObjectSpellAreaTargetCheck::_position

Referenced by operator()().

◆ _range

float Acore::WorldObjectSpellAreaTargetCheck::_range

Referenced by operator()().


The documentation for this struct was generated from the following files: