TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
spell_hor_evasion::spell_hor_evasion_SpellScript Class Reference

Private Member Functions

 PrepareSpellScript (spell_hor_evasion_SpellScript)
 
bool Load () override
 
void SetDest (SpellDestination &dest)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from SpellScript
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Spell *spell)
 
void _InitHit ()
 
bool _IsEffectPrevented (SpellEffIndex effIndex)
 
bool _IsDefaultEffectPrevented (SpellEffIndex effIndex)
 
void _PrepareScriptCall (SpellScriptHookType hookType)
 
void _FinishScriptCall ()
 
bool IsInCheckCastHook () const
 
bool IsInTargetHook () const
 
bool IsInHitPhase () const
 
bool IsInEffectHook () const
 
UnitGetCaster ()
 
UnitGetOriginalCaster ()
 
SpellInfo constGetSpellInfo ()
 
SpellValue constGetSpellValue ()
 
SpellEffectInfo constGetEffectInfo (SpellEffIndex) const
 
WorldLocation constGetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObjectGetExplTargetWorldObject ()
 
UnitGetExplTargetUnit ()
 
GameObjectGetExplTargetGObj ()
 
ItemGetExplTargetItem ()
 
UnitGetHitUnit ()
 
CreatureGetHitCreature ()
 
PlayerGetHitPlayer ()
 
ItemGetHitItem ()
 
GameObjectGetHitGObj ()
 
WorldLocationGetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
SpellGetSpell ()
 
AuraGetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
SpellEffectInfo constGetEffectInfo () const
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo constGetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void SetCustomCastResultMessage (SpellCustomErrors result)
 
- Public Member Functions inherited from _SpellScript
 _SpellScript ()
 
virtual ~_SpellScript ()
 
virtual void _Register ()
 
virtual void _Unload ()
 
virtual void _Init (std::string const *scriptname, uint32 spellId)
 
std::string const_GetScriptName () const
 
virtual bool Validate (SpellInfo const *)
 
virtual void Unload ()
 
- Public Attributes inherited from SpellScript
HookList< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< EffectHandlerOnEffectSuccessfulDispel
 
HookList< HitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList
< ObjectAreaTargetSelectHandler
OnObjectAreaTargetSelect
 
HookList
< ObjectTargetSelectHandler
OnObjectTargetSelect
 
HookList
< DestinationTargetSelectHandler
OnDestinationTargetSelect
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string constm_scriptName
 
uint32 m_scriptSpellId
 

Member Function Documentation

bool spell_hor_evasion::spell_hor_evasion_SpellScript::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

2768  {
2769  return GetCaster()->GetTypeId() == TYPEID_UNIT;
2770  }
Definition: ObjectGuid.h:32
TypeID GetTypeId() const
Definition: Object.h:113
Unit * GetCaster()
Definition: SpellScript.cpp:394

+ Here is the call graph for this function:

spell_hor_evasion::spell_hor_evasion_SpellScript::PrepareSpellScript ( spell_hor_evasion_SpellScript  )
private
void spell_hor_evasion::spell_hor_evasion_SpellScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2790  {
2792  }
Definition: SharedDefines.h:28
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition: SpellScript.h:320
#define SpellDestinationTargetSelectFn(F, I, N)
Definition: SpellScript.h:321
Definition: SharedDefines.h:1944
void SetDest(SpellDestination &dest)
Definition: halls_of_reflection.cpp:2772

+ Here is the call graph for this function:

void spell_hor_evasion::spell_hor_evasion_SpellScript::SetDest ( SpellDestination dest)
inlineprivate
2773  {
2775  Position pos(*target);
2777 
2778  // prevent evasion outside the room
2779  if (pos.IsInDist2d(&home, 15.0f))
2780  return;
2781 
2782  float angle = pos.GetAngle(&home);
2783  float dist = GetSpellInfo()->GetEffect(EFFECT_0)->CalcRadius(GetCaster());
2784  target->MovePosition(pos, dist, angle);
2785 
2786  dest.Relocate(pos);
2787  }
void MovePosition(Position &pos, float dist, float angle)
Definition: Object.cpp:2661
Definition: SharedDefines.h:28
Definition: Object.h:423
float CalcRadius(Unit *caster=NULL, Spell *=NULL) const
Definition: SpellInfo.cpp:655
WorldObject * GetExplTargetWorldObject()
Definition: SpellScript.cpp:421
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:404
SpellEffectInfo const * GetEffect(uint32 difficulty, uint32 index) const
Definition: SpellInfo.cpp:3348
void Relocate(Position const &pos)
Definition: Spell.cpp:93
Unit * GetCaster()
Definition: SpellScript.cpp:394
Creature * ToCreature()
Definition: Object.h:194
Definition: Position.h:27
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:672

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: