AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
spell_putricide_mutation_init::spell_putricide_mutation_init_SpellScript Class Reference
Inheritance diagram for spell_putricide_mutation_init::spell_putricide_mutation_init_SpellScript:
SpellScript _SpellScript

Private Member Functions

 PrepareSpellScript (spell_putricide_mutation_init_SpellScript)
 
SpellCastResult CheckRequirementInternal (SpellCustomErrors &extendedError)
 
SpellCastResult CheckRequirement ()
 
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

◆ CheckRequirement()

SpellCastResult spell_putricide_mutation_init::spell_putricide_mutation_init_SpellScript::CheckRequirement ( )
inlineprivate
1451 {
1452 if (!GetExplTargetUnit())
1454
1455 if (GetExplTargetUnit()->GetTypeId() != TYPEID_PLAYER)
1457
1459 SpellCastResult result = CheckRequirementInternal(extension);
1460 if (result != SPELL_CAST_OK)
1461 {
1462 Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), 0, result, extension);
1463 return result;
1464 }
1465
1466 return SPELL_CAST_OK;
1467 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
SpellCustomErrors
Definition: SharedDefines.h:1114
@ SPELL_CUSTOM_ERROR_NONE
Definition: SharedDefines.h:1115
SpellCastResult
Definition: SharedDefines.h:920
@ SPELL_FAILED_TARGET_NOT_PLAYER
Definition: SharedDefines.h:1043
@ SPELL_FAILED_BAD_TARGETS
Definition: SharedDefines.h:933
@ SPELL_CAST_OK
Definition: SharedDefines.h:1110
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE)
Definition: Spell.cpp:4619
Unit * GetExplTargetUnit()
Definition: SpellScript.cpp:433
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:411
SpellCastResult CheckRequirementInternal(SpellCustomErrors &extendedError)
Definition: boss_professor_putricide.cpp:1425

References CheckRequirementInternal(), SpellScript::GetExplTargetUnit(), SpellScript::GetSpellInfo(), Spell::SendCastResult(), SPELL_CAST_OK, SPELL_CUSTOM_ERROR_NONE, SPELL_FAILED_BAD_TARGETS, SPELL_FAILED_TARGET_NOT_PLAYER, and TYPEID_PLAYER.

Referenced by Register().

◆ CheckRequirementInternal()

SpellCastResult spell_putricide_mutation_init::spell_putricide_mutation_init_SpellScript::CheckRequirementInternal ( SpellCustomErrors extendedError)
inlineprivate
1426 {
1428 if (!instance)
1430
1432 if (!professor)
1434
1435 if (professor->AI()->GetData(DATA_PHASE) == 3 || !professor->IsAlive())
1436 {
1439 }
1440
1441 if (professor->AI()->GetData(DATA_ABOMINATION))
1442 {
1445 }
1446
1447 return SPELL_CAST_OK;
1448 }
@ DATA_PHASE
Definition: boss_professor_putricide.cpp:118
@ DATA_ABOMINATION
Definition: boss_professor_putricide.cpp:119
@ DATA_PROFESSOR_PUTRICIDE
Definition: icecrown_citadel.h:97
@ SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS
Definition: SharedDefines.h:1202
@ SPELL_CUSTOM_ERROR_ALL_POTIONS_USED
Definition: SharedDefines.h:1203
@ SPELL_FAILED_CUSTOM_ERROR
Definition: SharedDefines.h:1093
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
Definition: SharedDefines.h:1094
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
virtual uint32 GetData(uint32) const
Definition: UnitAI.h:202
Definition: Creature.h:46
CreatureAI * AI() const
Definition: Creature.h:134
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool IsAlive() const
Definition: Unit.h:1806
Definition: InstanceScript.h:140
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93

References Creature::AI(), DATA_ABOMINATION, DATA_PHASE, DATA_PROFESSOR_PUTRICIDE, ObjectAccessor::GetCreature(), UnitAI::GetData(), SpellScript::GetExplTargetUnit(), InstanceScript::GetGuidData(), WorldObject::GetInstanceScript(), Unit::IsAlive(), SPELL_CAST_OK, SPELL_CUSTOM_ERROR_ALL_POTIONS_USED, SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS, SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW, and SPELL_FAILED_CUSTOM_ERROR.

Referenced by CheckRequirement().

◆ PrepareSpellScript()

spell_putricide_mutation_init::spell_putricide_mutation_init_SpellScript::PrepareSpellScript ( spell_putricide_mutation_init_SpellScript  )
private

◆ Register()

void spell_putricide_mutation_init::spell_putricide_mutation_init_SpellScript::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

1470 {
1472 }
#define SpellCheckCastFn(F)
Definition: SpellScript.h:329
HookList< CheckCastHandler > OnCheckCast
Definition: SpellScript.h:328
SpellCastResult CheckRequirement()
Definition: boss_professor_putricide.cpp:1450

References CheckRequirement(), SpellScript::OnCheckCast, and SpellCheckCastFn.