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 
)
9095 : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, selectionType, condList)
9096 {
9097 }
WorldObjectSpellAreaTargetCheck(float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList)
Definition Spell.cpp:9047

Member Function Documentation

◆ operator()()

bool Acore::WorldObjectSpellTrajTargetCheck::operator() ( WorldObject target)
9100 {
9101 // return all targets on missile trajectory (0 - size of a missile)
9102 if (!_caster->HasInLine(target, target->GetCombatReach(), TRAJECTORY_MISSILE_SIZE))
9103 return false;
9104
9105 if (target->GetExactDist2d(_position) > _range)
9106 return false;
9107
9109 }
#define TRAJECTORY_MISSILE_SIZE
Definition Spell.h:42
virtual float GetCombatReach() const
Definition Object.h:502
float _range
Definition Spell.h:827
Position const * _position
Definition Spell.h:828
bool operator()(WorldObject *target)
Definition Spell.cpp:8963
Unit * _caster
Definition Spell.h:803
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: