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

Private Member Functions

 PrepareSpellScript (spell_putricide_mutation_init)
 
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 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
 
- 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::CheckRequirement ( )
inlineprivate
1324 {
1325 if (!GetExplTargetUnit())
1327
1328 if (!GetExplTargetUnit()->IsPlayer())
1330
1332 SpellCastResult result = CheckRequirementInternal(extension);
1333 if (result != SPELL_CAST_OK)
1334 {
1335 Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), 0, result, extension);
1336 return result;
1337 }
1338
1339 return SPELL_CAST_OK;
1340 }
SpellCustomErrors
Definition SharedDefines.h:1130
@ SPELL_CUSTOM_ERROR_NONE
Definition SharedDefines.h:1131
SpellCastResult
Definition SharedDefines.h:936
@ SPELL_FAILED_TARGET_NOT_PLAYER
Definition SharedDefines.h:1059
@ SPELL_FAILED_BAD_TARGETS
Definition SharedDefines.h:949
@ SPELL_CAST_OK
Definition SharedDefines.h:1126
Unit * GetExplTargetUnit()
Definition SpellScript.cpp:433
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:411
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE)
Definition Spell.cpp:4639
SpellCastResult CheckRequirementInternal(SpellCustomErrors &extendedError)
Definition boss_professor_putricide.cpp:1298

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

Referenced by Register().

◆ CheckRequirementInternal()

SpellCastResult spell_putricide_mutation_init::CheckRequirementInternal ( SpellCustomErrors extendedError)
inlineprivate
1299 {
1301 if (!instance)
1303
1305 if (!professor)
1307
1308 if (professor->AI()->GetData(DATA_PHASE) == 3 || !professor->IsAlive())
1309 {
1312 }
1313
1314 if (professor->AI()->GetData(DATA_ABOMINATION))
1315 {
1318 }
1319
1320 return SPELL_CAST_OK;
1321 }
@ SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS
Definition SharedDefines.h:1218
@ SPELL_CUSTOM_ERROR_ALL_POTIONS_USED
Definition SharedDefines.h:1219
@ SPELL_FAILED_CUSTOM_ERROR
Definition SharedDefines.h:1109
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
Definition SharedDefines.h:1110
@ DATA_PHASE
Definition boss_professor_putricide.cpp:119
@ DATA_ABOMINATION
Definition boss_professor_putricide.cpp:120
Definition Creature.h:47
CreatureAI * AI() const
Definition Creature.h:144
Definition InstanceScript.h:143
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:111
virtual uint32 GetData(uint32) const
Definition UnitAI.h:218
bool IsAlive() const
Definition Unit.h:1797
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1238
@ DATA_PROFESSOR_PUTRICIDE
Definition icecrown_citadel.h:92
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210

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::PrepareSpellScript ( spell_putricide_mutation_init  )
private

◆ Register()

void spell_putricide_mutation_init::Register ( )
inlineoverrideprivatevirtual

Implements _SpellScript.

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

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


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