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

Private Member Functions

 PrepareAuraScript (spell_malygos_vortex_visual)
 
bool Load () override
 
bool Validate (SpellInfo const *) override
 
void OnRemove (AuraEffect const *, AuraEffectHandleModes)
 
void Register () override
 

Additional Inherited Members

- Public Member Functions inherited from AuraScript
 AuraScript ()
 
bool _Validate (SpellInfo const *entry) override
 
bool _Load (Aura *aura)
 
void _PrepareScriptCall (AuraScriptHookType hookType, AuraApplication const *aurApp=nullptr)
 
void _FinishScriptCall ()
 
bool _IsDefaultActionPrevented ()
 
void PreventDefaultAction ()
 
SpellInfo const * GetSpellInfo () const
 
uint32 GetId () const
 
ObjectGuid GetCasterGUID () const
 
UnitGetCaster () const
 
WorldObjectGetOwner () const
 
UnitGetUnitOwner () const
 
DynamicObjectGetDynobjOwner () const
 
void Remove (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
AuraGetAura () const
 
AuraObjectType GetType () const
 
int32 GetDuration () const
 
void SetDuration (int32 duration, bool withMods=false)
 
void RefreshDuration ()
 
time_t GetApplyTime () const
 
int32 GetMaxDuration () const
 
void SetMaxDuration (int32 duration)
 
int32 CalcMaxDuration () const
 
bool IsExpired () const
 
bool IsPermanent () const
 
uint8 GetCharges () const
 
void SetCharges (uint8 charges)
 
uint8 CalcMaxCharges () const
 
bool ModCharges (int8 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool DropCharge (AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
uint8 GetStackAmount () const
 
void SetStackAmount (uint8 num)
 
bool ModStackAmount (int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
 
bool IsPassive () const
 
bool IsDeathPersistent () const
 
bool HasEffect (uint8 effIndex) const
 
AuraEffectGetEffect (uint8 effIndex) const
 
bool HasEffectType (AuraType type) const
 
UnitGetTarget () const
 
AuraApplication const * GetTargetApplication () const
 
- 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 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 AuraScript
HookList< CheckAreaTargetHandlerDoCheckAreaTarget
 
HookList< AuraDispelHandlerOnDispel
 
HookList< AuraDispelHandlerAfterDispel
 
HookList< EffectApplyHandlerOnEffectApply
 
HookList< EffectApplyHandlerAfterEffectApply
 
HookList< EffectApplyHandlerOnEffectRemove
 
HookList< EffectApplyHandlerAfterEffectRemove
 
HookList< EffectPeriodicHandlerOnEffectPeriodic
 
HookList< EffectUpdatePeriodicHandlerOnEffectUpdatePeriodic
 
HookList< EffectCalcAmountHandlerDoEffectCalcAmount
 
HookList< EffectCalcPeriodicHandlerDoEffectCalcPeriodic
 
HookList< EffectCalcSpellModHandlerDoEffectCalcSpellMod
 
HookList< EffectAbsorbHandlerOnEffectAbsorb
 
HookList< EffectAbsorbHandlerAfterEffectAbsorb
 
HookList< EffectManaShieldHandlerOnEffectManaShield
 
HookList< EffectManaShieldHandlerAfterEffectManaShield
 
HookList< EffectSplitHandlerOnEffectSplit
 
HookList< CheckProcHandlerDoCheckProc
 
HookList< CheckEffectProcHandlerDoCheckEffectProc
 
HookList< AfterCheckProcHandlerDoAfterCheckProc
 
HookList< AuraProcHandlerDoPrepareProc
 
HookList< AuraProcHandlerOnProc
 
HookList< AuraProcHandlerAfterProc
 
HookList< EffectProcHandlerOnEffectProc
 
HookList< EffectProcHandlerAfterEffectProc
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ Load()

bool spell_malygos_vortex_visual::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

1220 {
1221 return GetCaster()->IsCreature();
1222 }
Unit * GetCaster() const
Definition SpellScript.cpp:1035
bool IsCreature() const
Definition Object.h:205

References AuraScript::GetCaster(), and Object::IsCreature().

◆ OnRemove()

void spell_malygos_vortex_visual::OnRemove ( AuraEffect const *  ,
AuraEffectHandleModes   
)
inlineprivate
1230 {
1231 Creature* caster = GetCaster()->ToCreature();
1232 if (!caster)
1233 return;
1234
1235 if (InstanceScript* instance = caster->GetInstanceScript())
1236 {
1237 if (Creature* trigger = ObjectAccessor::GetCreature(*caster, instance->GetGuidData(DATA_VORTEX_TRIGGER)))
1238 {
1239 caster->GetMap()->DoForAllPlayers([&](Player* player)
1240 {
1241 if (player->IsAlive() && !player->IsGameMaster())
1242 trigger->CastSpell(player, SPELL_VORTEX_TELEPORT, true);
1243 });
1244 }
1245 }
1246
1248 caster->RemoveAura(SPELL_VORTEX_1);
1249 }
@ MI_POINT_VORTEX_LAND
Definition boss_malygos.cpp:43
@ SPELL_VORTEX_1
Definition boss_malygos.cpp:63
@ SPELL_VORTEX_TELEPORT
Definition boss_malygos.cpp:66
Definition Creature.h:47
Definition InstanceScript.h:143
void DoForAllPlayers(std::function< void(Player *)> exec)
Definition Map.cpp:2890
void MoveLand(uint32 id, Position const &pos, float speed=0.0f)
Use to move the unit from the air to the ground. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:553
Creature * ToCreature()
Definition Object.h:206
Definition Player.h:1084
bool IsGameMaster() const
Definition Player.h:1174
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5024
MotionMaster * GetMotionMaster()
Definition Unit.h:1758
bool IsAlive() const
Definition Unit.h:1793
Map * GetMap() const
Definition Object.h:625
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
const Position VortexLandPos
Definition eye_of_eternity.h:126
@ DATA_VORTEX_TRIGGER
Definition eye_of_eternity.h:65
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210

References DATA_VORTEX_TRIGGER, Map::DoForAllPlayers(), AuraScript::GetCaster(), ObjectAccessor::GetCreature(), WorldObject::GetInstanceScript(), WorldObject::GetMap(), Unit::GetMotionMaster(), Unit::IsAlive(), Player::IsGameMaster(), MI_POINT_VORTEX_LAND, MotionMaster::MoveLand(), Unit::RemoveAura(), SPELL_VORTEX_1, SPELL_VORTEX_TELEPORT, Object::ToCreature(), and VortexLandPos.

Referenced by Register().

◆ PrepareAuraScript()

spell_malygos_vortex_visual::PrepareAuraScript ( spell_malygos_vortex_visual  )
private

◆ Register()

void spell_malygos_vortex_visual::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1252 {
1256 }
@ EFFECT_0
Definition SharedDefines.h:31
@ SPELL_AURA_DUMMY
Definition SpellAuraDefines.h:67
@ AURA_EFFECT_HANDLE_REAL
Definition SpellAuraDefines.h:42
#define AuraEffectRemoveFn(F, I, N, M)
Definition SpellScript.h:765
HookList< EffectApplyHandler > AfterEffectRemove
Definition SpellScript.h:764
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
Definition boss_malygos.cpp:1229

References AuraScript::AfterEffectRemove, AURA_EFFECT_HANDLE_REAL, AuraEffectRemoveFn, EFFECT_0, OnRemove(), and SPELL_AURA_DUMMY.

◆ Validate()

bool spell_malygos_vortex_visual::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

1225 {
1227 }
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition SpellScript.h:125

References SPELL_VORTEX_1, SPELL_VORTEX_TELEPORT, and _SpellScript::ValidateSpellInfo().


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