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

Private Member Functions

 PrepareSpellScript (spell_blood_queen_vampiric_bite)
 
bool Validate (SpellInfo const *) override
 
SpellCastResult CheckTarget ()
 
void OnCast (SpellMissInfo missInfo)
 
void HandlePresence (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 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< 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

◆ CheckTarget()

SpellCastResult spell_blood_queen_vampiric_bite::CheckTarget ( )
inlineprivate
810 {
811 if (GetExplTargetUnit()->GetMapId() != MAP_ICECROWN_CITADEL)
814 {
817 }
818 if (InstanceScript* instance = GetExplTargetUnit()->GetInstanceScript())
819 if (instance->GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == IN_PROGRESS)
820 return SPELL_CAST_OK;
821
823 }
@ MAP_ICECROWN_CITADEL
Definition AreaDefines.h:269
@ IN_PROGRESS
Definition InstanceScript.h:59
@ SPELL_CUSTOM_ERROR_CANT_TARGET_VAMPIRES
Definition SharedDefines.h:1215
@ SPELL_FAILED_CUSTOM_ERROR
Definition SharedDefines.h:1109
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
Definition SharedDefines.h:1110
@ SPELL_CAST_OK
Definition SharedDefines.h:1126
bool IsVampire(Unit const *unit)
Definition boss_blood_queen_lana_thel.cpp:85
Definition InstanceScript.h:143
Unit * GetExplTargetUnit()
Definition SpellScript.cpp:438
void SetCustomCastResultMessage(SpellCustomErrors result)
Definition SpellScript.cpp:651
@ DATA_BLOOD_QUEEN_LANA_THEL
Definition icecrown_citadel.h:97

References DATA_BLOOD_QUEEN_LANA_THEL, SpellScript::GetExplTargetUnit(), IN_PROGRESS, IsVampire(), MAP_ICECROWN_CITADEL, SpellScript::SetCustomCastResultMessage(), SPELL_CAST_OK, SPELL_CUSTOM_ERROR_CANT_TARGET_VAMPIRES, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW, and SPELL_FAILED_CUSTOM_ERROR.

Referenced by Register().

◆ HandlePresence()

void spell_blood_queen_vampiric_bite::HandlePresence ( SpellEffIndex  )
inlineprivate
859 {
862 }
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
Definition SpellDefines.h:158
@ SPELL_PRESENCE_OF_THE_DARKFALLEN_DUMMY
Definition boss_blood_queen_lana_thel.cpp:57
@ SPELL_PRESENCE_OF_THE_DARKFALLEN_SE
Definition boss_blood_queen_lana_thel.cpp:59
Unit * GetHitUnit()
Definition SpellScript.cpp:453
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1372

References Unit::CastSpell(), SpellScript::GetHitUnit(), SPELL_PRESENCE_OF_THE_DARKFALLEN_DUMMY, SPELL_PRESENCE_OF_THE_DARKFALLEN_SE, and TRIGGERED_FULL_MASK.

Referenced by Register().

◆ OnCast()

void spell_blood_queen_vampiric_bite::OnCast ( SpellMissInfo  missInfo)
inlineprivate
826 {
827 if (missInfo != SPELL_MISS_NONE)
828 {
829 return;
830 }
831
832 if (!GetCaster()->IsPlayer() || GetCaster()->GetMapId() != MAP_ICECROWN_CITADEL)
833 return;
835 if (!instance || instance->GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) != IN_PROGRESS)
836 return;
837
838 uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_FRENZIED_BLOODTHIRST, GetCaster());
841
842 if (Aura* aura = GetCaster()->GetAura(SPELL_GUSHING_WOUND))
843 {
844 if (aura->GetStackAmount() == 3)
845 {
847 GetCaster()->RemoveAura(aura);
848 }
849 else
851 }
852
853 if (InstanceScript* instance = GetCaster()->GetInstanceScript())
855 bloodQueen->AI()->SetGUID(GetHitUnit()->GetGUID(), GUID_VAMPIRE);
856 }
std::uint32_t uint32
Definition Define.h:107
@ SPELL_MISS_NONE
Definition SharedDefines.h:1523
@ AURA_REMOVE_BY_ENEMY_SPELL
Definition SpellAuraDefines.h:394
#define sSpellMgr
Definition SpellMgr.h:847
@ SPELL_FRENZIED_BLOODTHIRST
Definition boss_blood_queen_lana_thel.cpp:55
@ SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR
Definition boss_blood_queen_lana_thel.cpp:53
@ SPELL_GUSHING_WOUND
Definition boss_blood_queen_lana_thel.cpp:81
@ SPELL_THIRST_QUENCHED
Definition boss_blood_queen_lana_thel.cpp:82
@ GUID_VAMPIRE
Definition boss_blood_queen_lana_thel.cpp:114
Definition SpellAuras.h:88
Definition Creature.h:47
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:115
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
static ObjectGuid const Empty
Definition ObjectGuid.h:123
Unit * GetCaster()
Definition SpellScript.cpp:401
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4797
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1247
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234

References AURA_REMOVE_BY_ENEMY_SPELL, Unit::CastSpell(), DATA_BLOOD_QUEEN_LANA_THEL, ObjectGuid::Empty, InstanceScript::GetBossState(), SpellScript::GetCaster(), ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), SpellScript::GetHitUnit(), WorldObject::GetInstanceScript(), GUID_VAMPIRE, IN_PROGRESS, MAP_ICECROWN_CITADEL, Unit::RemoveAura(), SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, SPELL_FRENZIED_BLOODTHIRST, SPELL_GUSHING_WOUND, SPELL_MISS_NONE, SPELL_THIRST_QUENCHED, sSpellMgr, and TRIGGERED_FULL_MASK.

◆ PrepareSpellScript()

spell_blood_queen_vampiric_bite::PrepareSpellScript ( spell_blood_queen_vampiric_bite  )
private

◆ Register()

void spell_blood_queen_vampiric_bite::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

865 {
869 }
@ EFFECT_1
Definition SharedDefines.h:32
@ SPELL_EFFECT_TRIGGER_SPELL
Definition SharedDefines.h:830
#define BeforeSpellHitFn(F)
Definition SpellScript.h:342
#define SpellCheckCastFn(F)
Definition SpellScript.h:329
#define SpellEffectFn(F, I, N)
Definition SpellScript.h:337
HookList< CheckCastHandler > OnCheckCast
Definition SpellScript.h:328
HookList< EffectHandler > OnEffectHitTarget
Definition SpellScript.h:336
HookList< CastHandler > OnCast
Definition SpellScript.h:321
HookList< BeforeHitHandler > BeforeHit
Definition SpellScript.h:341
SpellCastResult CheckTarget()
Definition boss_blood_queen_lana_thel.cpp:809
void HandlePresence(SpellEffIndex)
Definition boss_blood_queen_lana_thel.cpp:858

References SpellScript::BeforeHit, BeforeSpellHitFn, CheckTarget(), EFFECT_1, HandlePresence(), SpellScript::OnCast, SpellScript::OnCheckCast, SpellScript::OnEffectHitTarget, SPELL_EFFECT_TRIGGER_SPELL, SpellCheckCastFn, and SpellEffectFn.

◆ Validate()

bool spell_blood_queen_vampiric_bite::Validate ( SpellInfo const *  )
inlineoverrideprivatevirtual

Reimplemented from _SpellScript.

800 {
801 return ValidateSpellInfo(
802 {
806 });
807 }
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Definition SpellScript.h:125

References SPELL_ESSENCE_OF_THE_BLOOD_QUEEN_PLR, SPELL_FRENZIED_BLOODTHIRST, SPELL_PRESENCE_OF_THE_DARKFALLEN_DUMMY, and _SpellScript::ValidateSpellInfo().


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