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, WorldObject *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, WorldObject *caster, WorldObject *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList, Acore::WorldObjectSpellAreaTargetSearchReason searchReason=Acore::WorldObjectSpellAreaTargetSearchReason::Area, SpellTargetReferenceTypes referenceType=TARGET_REFERENCE_TYPE_CASTER)
 
bool operator() (WorldObject *target)
 
- Public Member Functions inherited from Acore::WorldObjectSpellTargetCheck
 WorldObjectSpellTargetCheck (WorldObject *caster, WorldObject *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
 
Acore::WorldObjectSpellAreaTargetSearchReason _searchReason
 
SpellTargetReferenceTypes _referenceType
 
- Public Attributes inherited from Acore::WorldObjectSpellTargetCheck
WorldObject * _caster
 
WorldObject * _referer
 
SpellInfo const * _spellInfo
 
SpellTargetCheckTypes _targetSelectionType
 
ConditionSourceInfo * _condSrcInfo
 
ConditionList * _condList
 

Detailed Description

Constructor & Destructor Documentation

◆ WorldObjectSpellTrajTargetCheck()

Acore::WorldObjectSpellTrajTargetCheck::WorldObjectSpellTrajTargetCheck ( float  range,
Position const *  position,
WorldObject *  caster,
SpellInfo const *  spellInfo,
SpellTargetCheckTypes  selectionType,
ConditionList *  condList 
)
9539 : WorldObjectSpellAreaTargetCheck(range, position, caster, caster, spellInfo, selectionType, condList)
9540 {
9541 }
WorldObjectSpellAreaTargetCheck(float range, Position const *position, WorldObject *caster, WorldObject *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionList *condList, Acore::WorldObjectSpellAreaTargetSearchReason searchReason=Acore::WorldObjectSpellAreaTargetSearchReason::Area, SpellTargetReferenceTypes referenceType=TARGET_REFERENCE_TYPE_CASTER)
Definition Spell.cpp:9441

Member Function Documentation

◆ operator()()

bool Acore::WorldObjectSpellTrajTargetCheck::operator() ( WorldObject *  target)
9544 {
9545 // return all targets on missile trajectory (0 - size of a missile)
9546 if (!_caster->HasInLine(target, target->GetCombatReach(), TRAJECTORY_MISSILE_SIZE))
9547 return false;
9548
9549 if (target->GetExactDist2d(_position) > _range)
9550 return false;
9551
9553 }
#define TRAJECTORY_MISSILE_SIZE
Definition Spell.h:51
virtual float GetCombatReach() const
Definition Object.h:513
float _range
Definition Spell.h:840
Position const * _position
Definition Spell.h:841
bool operator()(WorldObject *target)
Definition Spell.cpp:9356
WorldObject * _caster
Definition Spell.h:816
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: