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
471 {
472 Unit* target = GetHitPlayer();
473 Creature* caster = GetCaster()->ToCreature();
474 if (!target || !caster)
475 {
476 return;
477 }
478
479 uint32 text = 0;
480 switch (GetSpellInfo()->Id)
481 {
482 case SPELL_WHISPER_AGGRO: text = WHISPER_AGGRO; break;
483 case SPELL_WHISPER_INSANITY: text = WHISPER_INSANITY; break;
484 case SPELL_WHISPER_SLAY_1: text = WHISPER_SLAY_1; break;
485 case SPELL_WHISPER_SLAY_2: text = WHISPER_SLAY_2; break;
486 case SPELL_WHISPER_SLAY_3: text = WHISPER_SLAY_3; break;
487 case SPELL_WHISPER_DEATH_1: text = WHISPER_DEATH_1; break;
488 case SPELL_WHISPER_DEATH_2: text = WHISPER_DEATH_2; break;
489 default: return;
490 }
491 caster->AI()->Talk(text, target);
492 }
std::uint32_t uint32
Definition: Define.h:108
@ 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:46
CreatureAI * AI() const
Definition: Creature.h:135
Creature * ToCreature()
Definition: Object.h:197
Definition: Unit.h:1290
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.

468{ return GetCaster()->GetTypeId() == TYPEID_UNIT; }
@ TYPEID_UNIT
Definition: ObjectGuid.h:37
TypeID GetTypeId() const
Definition: Object.h:121

References SpellScript::GetCaster(), Object::GetTypeId(), and TYPEID_UNIT.

◆ PrepareSpellScript()

spell_volazj_whisper::PrepareSpellScript ( spell_volazj_whisper  )
private

◆ Register()

void spell_volazj_whisper::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

495 {
497 }
#define SpellEffectFn(F, I, N)
Definition: SpellScript.h:337
@ EFFECT_0
Definition: SharedDefines.h:30
@ SPELL_EFFECT_SCRIPT_EFFECT
Definition: SharedDefines.h:827
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:336
void HandleScriptEffect(SpellEffIndex)
Definition: boss_herald_volazj.cpp:470

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

◆ Validate()

bool spell_volazj_whisper::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual