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

Private Member Functions

 PrepareSpellScript (spell_midsummer_summon_ahune_lieutenant)
 
void HandleDummy (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

◆ HandleDummy()

void spell_midsummer_summon_ahune_lieutenant::HandleDummy ( SpellEffIndex  )
inlineprivate
1250 {
1251 Unit* caster = GetCaster();
1252 uint32 zoneId = caster->GetZoneId();
1253 uint32 npcEntry = 0;
1254
1255 switch (zoneId)
1256 {
1257 case 331: // Ashenvale
1258 npcEntry = 26116; // Frostwave Lieutenant
1259 break;
1260 case 405: // Desolace
1261 npcEntry = 26178; // Hailstone Lieutenant
1262 break;
1263 case 33: // Stranglethorn Vale
1264 npcEntry = 26204; // Chillwind Lieutenant
1265 break;
1266 case 51: // Searing Gorge
1267 npcEntry = 26214; // Frigid Lieutenant
1268 break;
1269 case 1377: // Silithus
1270 npcEntry = 26215; // Glacial Lieutenant
1271 break;
1272 case 3483: // Hellfire Peninsula
1273 npcEntry = 26216; // Glacial Templar
1274 break;
1275 }
1276
1277 if (npcEntry)
1279 }
constexpr auto IN_MILLISECONDS
Definition: Common.h:53
constexpr auto MINUTE
Definition: Common.h:47
std::uint32_t uint32
Definition: Define.h:107
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: Object.h:45
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2355
uint32 GetZoneId() const
Definition: Object.cpp:3146
void GetPosition(float &x, float &y) const
Definition: Position.h:121
Definition: Unit.h:630
Unit * GetCaster()
Definition: SpellScript.cpp:401

References SpellScript::GetCaster(), Position::GetPosition(), WorldObject::GetZoneId(), IN_MILLISECONDS, MINUTE, WorldObject::SummonCreature(), and TEMPSUMMON_TIMED_OR_DEAD_DESPAWN.

Referenced by Register().

◆ PrepareSpellScript()

spell_midsummer_summon_ahune_lieutenant::PrepareSpellScript ( spell_midsummer_summon_ahune_lieutenant  )
private

◆ Register()

void spell_midsummer_summon_ahune_lieutenant::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1282 {
1284 }
@ EFFECT_1
Definition: SharedDefines.h:32
@ SPELL_EFFECT_APPLY_AURA
Definition: SharedDefines.h:784
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:335
void HandleDummy(SpellEffIndex)
Definition: midsummer.cpp:1249

References EFFECT_1, HandleDummy(), SpellScript::OnEffectHit, SPELL_EFFECT_APPLY_AURA, and SpellEffectFn.