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

◆ HandleScriptEffect()

void spell_volazj_whisper::HandleScriptEffect ( SpellEffIndex  )
inlineprivate
402 {
403 Unit* target = GetHitPlayer();
404 Creature* caster = GetCaster()->ToCreature();
405 if (!target || !caster)
406 {
407 return;
408 }
409
410 uint32 text = 0;
411 switch (GetSpellInfo()->Id)
412 {
413 case SPELL_WHISPER_AGGRO: text = WHISPER_AGGRO; break;
414 case SPELL_WHISPER_INSANITY: text = WHISPER_INSANITY; break;
415 case SPELL_WHISPER_SLAY_1: text = WHISPER_SLAY_1; break;
416 case SPELL_WHISPER_SLAY_2: text = WHISPER_SLAY_2; break;
417 case SPELL_WHISPER_SLAY_3: text = WHISPER_SLAY_3; break;
418 case SPELL_WHISPER_DEATH_1: text = WHISPER_DEATH_1; break;
419 case SPELL_WHISPER_DEATH_2: text = WHISPER_DEATH_2; break;
420 default: return;
421 }
422 caster->AI()->Talk(text, target);
423 }
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=0ms)
Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
Definition CreatureAI.cpp:67
Definition Creature.h:47
CreatureAI * AI() const
Definition Creature.h:144
Creature * ToCreature()
Definition Object.h:212
Player * GetHitPlayer()
Definition SpellScript.cpp:476
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:416
Unit * GetCaster()
Definition SpellScript.cpp:401
Definition Unit.h:665

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.

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

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

◆ PrepareSpellScript()

spell_volazj_whisper::PrepareSpellScript ( spell_volazj_whisper  )
private

◆ Register()

void spell_volazj_whisper::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

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

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: