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

Private Member Functions

 PrepareSpellScript (spell_pagles_point_cast)
 
void OnEffect (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
 
Unit * GetCaster ()
 
GameObject * GetGObjCaster ()
 
Unit * GetOriginalCaster ()
 
SpellInfo const * GetSpellInfo ()
 
SpellValue const * GetSpellValue ()
 
WorldLocation const * GetExplTargetDest ()
 
void SetExplTargetDest (WorldLocation &loc)
 
WorldObject * GetExplTargetWorldObject ()
 
Unit * GetExplTargetUnit ()
 
GameObject * GetExplTargetGObj ()
 
Item * GetExplTargetItem ()
 
Unit * GetHitUnit ()
 
Creature * GetHitCreature ()
 
Player * GetHitPlayer ()
 
Item * GetHitItem ()
 
GameObject * GetHitGObj ()
 
WorldLocation * GetHitDest ()
 
int32 GetHitDamage ()
 
void SetHitDamage (int32 damage)
 
void PreventHitDamage ()
 
int32 GetHitHeal ()
 
void SetHitHeal (int32 heal)
 
void PreventHitHeal ()
 
Spell * GetSpell ()
 
Aura * GetHitAura ()
 
void PreventHitAura ()
 
void PreventHitEffect (SpellEffIndex effIndex)
 
void PreventHitDefaultEffect (SpellEffIndex effIndex)
 
int32 GetEffectValue () const
 
void SetEffectValue (int32 value)
 
Item * GetCastItem ()
 
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< CastHandler > BeforeCast
 
HookList< CastHandler > OnCast
 
HookList< CastHandler > AfterCast
 
HookList< CheckCastHandler > OnCheckCast
 
HookList< EffectHandler > OnEffectLaunch
 
HookList< EffectHandler > OnEffectLaunchTarget
 
HookList< EffectHandler > OnEffectHit
 
HookList< EffectHandler > OnEffectHitTarget
 
HookList< BeforeHitHandler > BeforeHit
 
HookList< HitHandler > OnHit
 
HookList< HitHandler > AfterHit
 
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
 
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
 
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
 
- Protected Attributes inherited from _SpellScript
uint8 m_currentScriptState
 
std::string const * m_scriptName
 
uint32 m_scriptSpellId
 

Detailed Description

Member Function Documentation

◆ OnEffect()

void spell_pagles_point_cast::OnEffect ( SpellEffIndex  )
inlineprivate
102 {
103 if (Unit* caster = GetCaster())
104 {
105 if (InstanceScript* instanceScript = caster->GetInstanceScript())
106 {
107 if (!instanceScript->GetData(DATA_GAHZRANKA) && !caster->FindNearestCreature(NPC_GAHZRANKA, 50.0f))
108 {
109 caster->m_Events.AddEventAtOffset([caster]()
110 {
111 if (GameObject* lure = caster->SummonGameObject(GAMEOBJECT_MUDSKUNK_LURE, -11688.5f, -1737.74f, 10.409842f, 1.f, 0.f, 0.f, 0.f, 0.f, 30 * IN_MILLISECONDS))
112 {
113 lure->DespawnOrUnsummon(5s);
114 caster->m_Events.AddEventAtOffset([caster]()
115 {
116 if (!caster->FindNearestCreature(NPC_GAHZRANKA, 50.0f))
117 {
118 caster->CastSpell(caster, SPELL_SPLASH, true);
119 caster->SummonCreature(NPC_GAHZRANKA, -11688.5f, -1723.74f, -5.78f, 0.f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5 * DAY * IN_MILLISECONDS);
120 }
121 }, 5s);
122 }
123 }, 2s);
124 }
125 }
126 }
127 }
constexpr auto IN_MILLISECONDS
Definition Common.h:53
@ GAMEOBJECT_MUDSKUNK_LURE
Definition boss_gahzranka.cpp:35
Definition GameObject.h:120
Definition InstanceScript.h:143
Unit * GetCaster()
Definition SpellScript.cpp:401
Definition Unit.h:665
GameObject * SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime, bool checkTransport=true, GOSummonType summonType=GO_SUMMON_TIMED_OR_CORPSE_DESPAWN)
Definition Object.cpp:2467
@ NPC_GAHZRANKA
Definition zulgurub.h:69
@ DATA_GAHZRANKA
Definition zulgurub.h:39

References DATA_GAHZRANKA, GAMEOBJECT_MUDSKUNK_LURE, SpellScript::GetCaster(), IN_MILLISECONDS, NPC_GAHZRANKA, and WorldObject::SummonGameObject().

Referenced by Register().

◆ PrepareSpellScript()

spell_pagles_point_cast::PrepareSpellScript ( spell_pagles_point_cast  )
private

◆ Register()

void spell_pagles_point_cast::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

130 {
132 }
@ EFFECT_1
Definition SharedDefines.h:32
@ SPELL_EFFECT_SEND_EVENT
Definition SharedDefines.h:827
#define SpellEffectFn(F, I, N)
Definition SpellScript.h:337
HookList< EffectHandler > OnEffectLaunch
Definition SpellScript.h:333
void OnEffect(SpellEffIndex)
Definition boss_gahzranka.cpp:101

References EFFECT_1, OnEffect(), SPELL_EFFECT_SEND_EVENT, and SpellEffectFn.


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