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

Private Member Functions

 PrepareSpellScript (spell_volazj_whisper)
 
bool Validate (SpellInfo const *) override
 
bool Load () override
 
void HandleScriptEffect (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

◆ HandleScriptEffect()

void spell_volazj_whisper::HandleScriptEffect ( SpellEffIndex  )
inlineprivate
472 {
473 Unit* target = GetHitPlayer();
474 Creature* caster = GetCaster()->ToCreature();
475 if (!target || !caster)
476 {
477 return;
478 }
479
480 uint32 text = 0;
481 switch (GetSpellInfo()->Id)
482 {
483 case SPELL_WHISPER_AGGRO: text = WHISPER_AGGRO; break;
484 case SPELL_WHISPER_INSANITY: text = WHISPER_INSANITY; break;
485 case SPELL_WHISPER_SLAY_1: text = WHISPER_SLAY_1; break;
486 case SPELL_WHISPER_SLAY_2: text = WHISPER_SLAY_2; break;
487 case SPELL_WHISPER_SLAY_3: text = WHISPER_SLAY_3; break;
488 case SPELL_WHISPER_DEATH_1: text = WHISPER_DEATH_1; break;
489 case SPELL_WHISPER_DEATH_2: text = WHISPER_DEATH_2; break;
490 default: return;
491 }
492 caster->AI()->Talk(text, target);
493 }
std::uint32_t uint32
Definition: Define.h:107
@ SPELL_WHISPER_SLAY_3
Definition: boss_herald_volazj.cpp:48
@ SPELL_WHISPER_SLAY_1
Definition: boss_herald_volazj.cpp:46
@ SPELL_WHISPER_INSANITY
Definition: boss_herald_volazj.cpp:45
@ SPELL_WHISPER_AGGRO
Definition: boss_herald_volazj.cpp:44
@ SPELL_WHISPER_DEATH_1
Definition: boss_herald_volazj.cpp:49
@ SPELL_WHISPER_SLAY_2
Definition: boss_herald_volazj.cpp:47
@ SPELL_WHISPER_DEATH_2
Definition: boss_herald_volazj.cpp:50
@ WHISPER_AGGRO
Definition: boss_herald_volazj.cpp:63
@ WHISPER_SLAY_3
Definition: boss_herald_volazj.cpp:67
@ WHISPER_INSANITY
Definition: boss_herald_volazj.cpp:64
@ WHISPER_DEATH_1
Definition: boss_herald_volazj.cpp:68
@ WHISPER_SLAY_2
Definition: boss_herald_volazj.cpp:66
@ WHISPER_SLAY_1
Definition: boss_herald_volazj.cpp:65
@ WHISPER_DEATH_2
Definition: boss_herald_volazj.cpp:69
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
Definition: CreatureAI.cpp:50
Definition: Creature.h:46
CreatureAI * AI() const
Definition: Creature.h:143
Creature * ToCreature()
Definition: Object.h:202
Definition: Unit.h:630
Player * GetHitPlayer()
Definition: SpellScript.cpp:471
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:411
Unit * GetCaster()
Definition: SpellScript.cpp:401

References Creature::AI(), SpellScript::GetCaster(), SpellScript::GetHitPlayer(), SpellScript::GetSpellInfo(), SPELL_WHISPER_AGGRO, SPELL_WHISPER_DEATH_1, SPELL_WHISPER_DEATH_2, SPELL_WHISPER_INSANITY, SPELL_WHISPER_SLAY_1, SPELL_WHISPER_SLAY_2, SPELL_WHISPER_SLAY_3, CreatureAI::Talk(), Object::ToCreature(), WHISPER_AGGRO, WHISPER_DEATH_1, WHISPER_DEATH_2, WHISPER_INSANITY, WHISPER_SLAY_1, WHISPER_SLAY_2, and WHISPER_SLAY_3.

Referenced by Register().

◆ Load()

bool spell_volazj_whisper::Load ( )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

469{ return GetCaster()->IsCreature(); }
bool IsCreature() const
Definition: Object.h:201

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

◆ PrepareSpellScript()

spell_volazj_whisper::PrepareSpellScript ( spell_volazj_whisper  )
private

◆ Register()

void spell_volazj_whisper::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

496 {
498 }
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
@ EFFECT_0
Definition: SharedDefines.h:31
@ SPELL_EFFECT_SCRIPT_EFFECT
Definition: SharedDefines.h:855
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:336
void HandleScriptEffect(SpellEffIndex)
Definition: boss_herald_volazj.cpp:471

References EFFECT_0, HandleScriptEffect(), SpellScript::OnEffectHitTarget, SPELL_EFFECT_SCRIPT_EFFECT, and SpellEffectFn.

◆ Validate()

bool spell_volazj_whisper::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual