AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_igb_teleport_to_enemy_ship Class Reference
Inheritance diagram for spell_igb_teleport_to_enemy_ship:
SpellScript _SpellScript

Private Member Functions

 PrepareSpellScript (spell_igb_teleport_to_enemy_ship)
 
void RelocateTransportOffset (SpellEffIndex)
 
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 const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
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)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
ItemGetCastItem ()
 
void CreateItem (uint32 effIndex, uint32 itemId)
 
SpellInfo const * GetTriggeringSpell ()
 
void FinishCast (SpellCastResult result)
 
void Cancel ()
 
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 void Register ()=0
 
virtual bool Validate (SpellInfo const *)
 
virtual bool Load ()
 
virtual void Unload ()
 
- Static Public Member Functions inherited from _SpellScript
static bool ValidateSpellInfo (std::initializer_list< uint32 > spellIds)
 
template<class T >
static bool ValidateSpellInfo (T const &spellIds)
 
- Public Attributes inherited from SpellScript
HookList< CastHandlerBeforeCast
 
HookList< CastHandlerOnCast
 
HookList< CastHandlerAfterCast
 
HookList< CheckCastHandlerOnCheckCast
 
HookList< EffectHandlerOnEffectLaunch
 
HookList< EffectHandlerOnEffectLaunchTarget
 
HookList< EffectHandlerOnEffectHit
 
HookList< EffectHandlerOnEffectHitTarget
 
HookList< BeforeHitHandlerBeforeHit
 
HookList< HitHandlerOnHit
 
HookList< HitHandlerAfterHit
 
HookList< ObjectAreaTargetSelectHandlerOnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandlerOnObjectTargetSelect
 
HookList< DestinationTargetSelectHandlerOnDestinationTargetSelect
 
virtual bool _Validate (SpellInfo const *entry)
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ PrepareSpellScript()

spell_igb_teleport_to_enemy_ship::PrepareSpellScript ( spell_igb_teleport_to_enemy_ship  )
private

◆ Register()

void spell_igb_teleport_to_enemy_ship::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

2066 {
2068 }
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
@ EFFECT_0
Definition: SharedDefines.h:31
@ SPELL_EFFECT_TELEPORT_UNITS
Definition: SharedDefines.h:783
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:336
void RelocateTransportOffset(SpellEffIndex)
Definition: boss_icecrown_gunship_battle.cpp:2052

References EFFECT_0, SpellScript::OnEffectHitTarget, RelocateTransportOffset(), SPELL_EFFECT_TELEPORT_UNITS, and SpellEffectFn.

◆ RelocateTransportOffset()

void spell_igb_teleport_to_enemy_ship::RelocateTransportOffset ( SpellEffIndex  )
inlineprivate
2053 {
2054 WorldLocation const* dest = GetHitDest();
2055 Unit* target = GetHitUnit();
2056 if (!dest || !target || !target->GetTransport())
2057 return;
2058
2059 float x, y, z, o;
2060 dest->GetPosition(x, y, z, o);
2061 target->GetTransport()->CalculatePassengerOffset(x, y, z, &o);
2062 target->m_movementInfo.transport.pos.Relocate(x, y, z, o);
2063 }
struct MovementInfo::TransportInfo transport
Position pos
Definition: Object.h:297
Transport * GetTransport() const
Definition: Object.h:599
MovementInfo m_movementInfo
Definition: Object.h:609
void GetPosition(float &x, float &y) const
Definition: Position.h:122
void Relocate(float x, float y)
Definition: Position.h:73
Definition: Position.h:251
void CalculatePassengerOffset(float &x, float &y, float &z, float *o=nullptr) const override
This method transforms supplied global coordinates into local offsets.
Definition: Transport.h:33
Definition: Unit.h:630
Unit * GetHitUnit()
Definition: SpellScript.cpp:448
WorldLocation * GetHitDest()
Definition: SpellScript.cpp:504

References Transport::CalculatePassengerOffset(), SpellScript::GetHitDest(), SpellScript::GetHitUnit(), Position::GetPosition(), WorldObject::GetTransport(), WorldObject::m_movementInfo, MovementInfo::TransportInfo::pos, Position::Relocate(), and MovementInfo::transport.

Referenced by Register().