AzerothCore 3.3.5a
OpenSource WoW Emulator
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 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
 
- 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.

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

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

◆ RelocateTransportOffset()

void spell_igb_teleport_to_enemy_ship::RelocateTransportOffset ( SpellEffIndex  )
inlineprivate
2056 {
2057 WorldLocation const* dest = GetHitDest();
2058 Unit* target = GetHitUnit();
2059 if (!dest || !target || !target->GetTransport())
2060 return;
2061
2062 float x, y, z, o;
2063 dest->GetPosition(x, y, z, o);
2064 target->GetTransport()->CalculatePassengerOffset(x, y, z, &o);
2065 target->m_movementInfo.transport.pos.Relocate(x, y, z, o);
2066 }
Unit * GetHitUnit()
Definition SpellScript.cpp:448
WorldLocation * GetHitDest()
Definition SpellScript.cpp:504
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:34
Definition Unit.h:620
Definition Position.h:255
Transport * GetTransport() const
Definition Object.h:598
MovementInfo m_movementInfo
Definition Object.h:608
Position pos
Definition Object.h:303
struct MovementInfo::TransportInfo transport
void GetPosition(float &x, float &y) const
Definition Position.h:126
void Relocate(float x, float y)
Definition Position.h:77

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().


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