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

Member Function Documentation

◆ operator()()

bool Acore::WorldObjectSpellTrajTargetCheck::operator() ( WorldObject target)
9052 {
9053 // return all targets on missile trajectory (0 - size of a missile)
9054 if (!_caster->HasInLine(target, target->GetObjectSize()))
9055 return false;
9057 }
float GetObjectSize() const
Definition: Object.cpp:2734
bool HasInLine(Position const *pos, float width) const
Definition: Position.cpp:42
Unit * _caster
Definition: Spell.h:795
bool operator()(WorldObject *target)
Definition: Spell.cpp:9005

References Acore::WorldObjectSpellTargetCheck::_caster, WorldObject::GetObjectSize(), Position::HasInLine(), and Acore::WorldObjectSpellAreaTargetCheck::operator()().