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

#include "Spell.h"

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

Public Member Functions

 WorldObjectSpellTrajTargetCheck (float range, Position const *position, 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)
 

Additional Inherited Members

- 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

◆ WorldObjectSpellTrajTargetCheck()

Acore::WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck ( float  range,
Position const *  position,
Unit caster,
SpellInfo const *  spellInfo,
SpellTargetCheckTypes  selectionType,
ConditionList condList 
)
9055 : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, selectionType, condList)
9056 {
9057 }
WorldObjectSpellAreaTargetCheck(float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
Definition Spell.cpp:9007

Member Function Documentation

◆ operator()()

bool Acore::WorldObjectSpellTrajTargetCheck::operator() ( WorldObject target)
9060 {
9061 // return all targets on missile trajectory (0 - size of a missile)
9062 if (!_caster->HasInLine(target, target->GetCombatReach(), TRAJECTORY_MISSILE_SIZE))
9063 return false;
9064
9065 if (target->GetExactDist2d(_position) > _range)
9066 return false;
9067
9069 }
#define TRAJECTORY_MISSILE_SIZE
Definition Spell.h:42
virtual float GetCombatReach() const
Definition Object.h:503
float _range
Definition Spell.h:824
Position const * _position
Definition Spell.h:825
bool operator()(WorldObject *target)
Definition Spell.cpp:8923
Unit * _caster
Definition Spell.h:800
bool HasInLine(Position const *pos, float width) const
Definition Position.cpp:43
float GetExactDist2d(const float x, const float y) const
Definition Position.h:170

References Acore::WorldObjectSpellTargetCheck::_caster, Acore::WorldObjectSpellAreaTargetCheck::_position, Acore::WorldObjectSpellAreaTargetCheck::_range, WorldObject::GetCombatReach(), Position::GetExactDist2d(), Position::HasInLine(), Acore::WorldObjectSpellTargetCheck::operator()(), and TRAJECTORY_MISSILE_SIZE.


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