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 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

◆ HandleScriptEffect()

void spell_volazj_whisper::HandleScriptEffect ( SpellEffIndex  )
inlineprivate
463 {
464 Unit* target = GetHitPlayer();
465 Creature* caster = GetCaster()->ToCreature();
466 if (!target || !caster)
467 {
468 return;
469 }
470
471 uint32 text = 0;
472 switch (GetSpellInfo()->Id)
473 {
474 case SPELL_WHISPER_AGGRO: text = WHISPER_AGGRO; break;
475 case SPELL_WHISPER_INSANITY: text = WHISPER_INSANITY; break;
476 case SPELL_WHISPER_SLAY_1: text = WHISPER_SLAY_1; break;
477 case SPELL_WHISPER_SLAY_2: text = WHISPER_SLAY_2; break;
478 case SPELL_WHISPER_SLAY_3: text = WHISPER_SLAY_3; break;
479 case SPELL_WHISPER_DEATH_1: text = WHISPER_DEATH_1; break;
480 case SPELL_WHISPER_DEATH_2: text = WHISPER_DEATH_2; break;
481 default: return;
482 }
483 caster->AI()->Talk(text, target);
484 }
std::uint32_t uint32
Definition Define.h:107
@ SPELL_WHISPER_SLAY_3
Definition boss_herald_volazj.cpp:47
@ SPELL_WHISPER_SLAY_1
Definition boss_herald_volazj.cpp:45
@ SPELL_WHISPER_INSANITY
Definition boss_herald_volazj.cpp:44
@ SPELL_WHISPER_AGGRO
Definition boss_herald_volazj.cpp:43
@ SPELL_WHISPER_DEATH_1
Definition boss_herald_volazj.cpp:48
@ SPELL_WHISPER_SLAY_2
Definition boss_herald_volazj.cpp:46
@ SPELL_WHISPER_DEATH_2
Definition boss_herald_volazj.cpp:49
@ WHISPER_AGGRO
Definition boss_herald_volazj.cpp:62
@ WHISPER_SLAY_3
Definition boss_herald_volazj.cpp:66
@ WHISPER_INSANITY
Definition boss_herald_volazj.cpp:63
@ WHISPER_DEATH_1
Definition boss_herald_volazj.cpp:67
@ WHISPER_SLAY_2
Definition boss_herald_volazj.cpp:65
@ WHISPER_SLAY_1
Definition boss_herald_volazj.cpp:64
@ WHISPER_DEATH_2
Definition boss_herald_volazj.cpp:68
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:43
CreatureAI * AI() const
Definition Creature.h:141
Creature * ToCreature()
Definition Object.h:205
Player * GetHitPlayer()
Definition SpellScript.cpp:471
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:411
Unit * GetCaster()
Definition SpellScript.cpp:401
Definition Unit.h:636

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.

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

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

◆ PrepareSpellScript()

spell_volazj_whisper::PrepareSpellScript ( spell_volazj_whisper  )
private

◆ Register()

void spell_volazj_whisper::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

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

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

◆ Validate()

bool spell_volazj_whisper::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

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