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

#include "Spell.h"

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

Public Member Functions

 WorldObjectSpellConeTargetCheck (float coneAngle, float range, Unit *caster, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
 
bool operator() (WorldObject *target)
 
- Public Member Functions inherited from Acore::WorldObjectSpellAreaTargetCheck
 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 _coneAngle
 
- Public Attributes inherited from Acore::WorldObjectSpellAreaTargetCheck
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

◆ WorldObjectSpellConeTargetCheck()

Acore::WorldObjectSpellConeTargetCheck::WorldObjectSpellConeTargetCheck ( float  coneAngle,
float  range,
Unit caster,
SpellInfo const *  spellInfo,
SpellTargetCheckTypes  selectionType,
ConditionList condList 
)
9020 : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle)
9021 {
9022 }
WorldObjectSpellAreaTargetCheck(float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
Definition: Spell.cpp:8998
float _coneAngle
Definition: Spell.h:828

Member Function Documentation

◆ operator()()

bool Acore::WorldObjectSpellConeTargetCheck::operator() ( WorldObject target)
9025 {
9027 {
9028 if (!_caster->isInBack(target, _coneAngle))
9029 return false;
9030 }
9032 {
9033 if (!_caster->HasInLine(target, _caster->GetObjectSize() + target->GetObjectSize()))
9034 return false;
9035 }
9036 else
9037 {
9038 if (!_caster->isInFront(target, _coneAngle))
9039 return false;
9040 }
9042 }
@ SPELL_ATTR0_CU_CONE_BACK
Definition: SpellInfo.h:177
@ SPELL_ATTR0_CU_CONE_LINE
Definition: SpellInfo.h:178
bool isInFront(WorldObject const *target, float arc=M_PI) const
Definition: Object.cpp:1492
bool isInBack(WorldObject const *target, float arc=M_PI) const
Definition: Object.cpp:1497
float GetObjectSize() const
Definition: Object.cpp:2759
bool HasInLine(Position const *pos, float width) const
Definition: Position.cpp:42
SpellInfo const * _spellInfo
Definition: Spell.h:797
Unit * _caster
Definition: Spell.h:795
bool operator()(WorldObject *target)
Definition: Spell.cpp:9004
bool HasAttribute(SpellAttr0 attribute) const
Definition: SpellInfo.h:412

References Acore::WorldObjectSpellTargetCheck::_caster, _coneAngle, Acore::WorldObjectSpellTargetCheck::_spellInfo, WorldObject::GetObjectSize(), SpellInfo::HasAttribute(), Position::HasInLine(), WorldObject::isInBack(), WorldObject::isInFront(), Acore::WorldObjectSpellAreaTargetCheck::operator()(), SPELL_ATTR0_CU_CONE_BACK, and SPELL_ATTR0_CU_CONE_LINE.

Member Data Documentation

◆ _coneAngle

float Acore::WorldObjectSpellConeTargetCheck::_coneAngle

Referenced by operator()().