TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity::WorldObjectSpellConeTargetCheck Struct Reference

#include <Spell.h>

Public Member Functions

 WorldObjectSpellConeTargetCheck (float coneAngle, float range, Unit *caster, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionContainer *condList)
 
bool operator() (WorldObject *target)
 
- Public Member Functions inherited from Trinity::WorldObjectSpellAreaTargetCheck
 WorldObjectSpellAreaTargetCheck (float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionContainer *condList)
 
bool operator() (WorldObject *target)
 
- Public Member Functions inherited from Trinity::WorldObjectSpellTargetCheck
 WorldObjectSpellTargetCheck (Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionContainer *condList)
 
 ~WorldObjectSpellTargetCheck ()
 
bool operator() (WorldObject *target)
 

Public Attributes

float _coneAngle
 
- Public Attributes inherited from Trinity::WorldObjectSpellAreaTargetCheck
float _range
 
Position const_position
 
- Public Attributes inherited from Trinity::WorldObjectSpellTargetCheck
Unit_caster
 
Unit_referer
 
SpellInfo const_spellInfo
 
SpellTargetCheckTypes _targetSelectionType
 
ConditionSourceInfo_condSrcInfo
 
ConditionContainer_condList
 

Constructor & Destructor Documentation

Trinity::WorldObjectSpellConeTargetCheck::WorldObjectSpellConeTargetCheck ( float  coneAngle,
float  range,
Unit caster,
SpellInfo const spellInfo,
SpellTargetCheckTypes  selectionType,
ConditionContainer condList 
)
7525  : WorldObjectSpellAreaTargetCheck(range, caster, caster, caster, spellInfo, selectionType, condList), _coneAngle(coneAngle) { }
WorldObjectSpellAreaTargetCheck(float range, Position const *position, Unit *caster, Unit *referer, SpellInfo const *spellInfo, SpellTargetCheckTypes selectionType, ConditionContainer *condList)
Definition: Spell.cpp:7512
float _coneAngle
Definition: Spell.h:890

Member Function Documentation

bool Trinity::WorldObjectSpellConeTargetCheck::operator() ( WorldObject target)
7528 {
7530  {
7531  if (!_caster->isInBack(target, _coneAngle))
7532  return false;
7533  }
7535  {
7536  if (!_caster->HasInLine(target, _caster->GetObjectSize() + target->GetObjectSize()))
7537  return false;
7538  }
7539  else
7540  {
7541  if (!_caster->isInFront(target, _coneAngle))
7542  return false;
7543  }
7545 }
SpellInfo const * _spellInfo
Definition: Spell.h:859
bool isInBack(WorldObject const *target, float arc=float(M_PI)) const
Definition: Object.cpp:1794
Unit * _caster
Definition: Spell.h:857
bool HasInLine(Position const *pos, float width) const
Definition: Position.cpp:151
bool operator()(WorldObject *target)
Definition: Spell.cpp:7516
Definition: SpellInfo.h:186
bool HasAttribute(SpellAttr0 attribute) const
Definition: SpellInfo.h:462
bool isInFront(WorldObject const *target, float arc=float(M_PI)) const
Definition: Object.cpp:1789
float GetObjectSize() const
Definition: Object.cpp:2656
Definition: SpellInfo.h:185
float _coneAngle
Definition: Spell.h:890

+ Here is the call graph for this function:

Member Data Documentation

float Trinity::WorldObjectSpellConeTargetCheck::_coneAngle

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