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
1317 {
1318 if (!GetExplTargetUnit())
1320
1321 if (!GetExplTargetUnit()->IsPlayer())
1323
1325 SpellCastResult result = CheckRequirementInternal(extension);
1326 if (result != SPELL_CAST_OK)
1327 {
1328 Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), 0, result, extension);
1329 return result;
1330 }
1331
1332 return SPELL_CAST_OK;
1333 }
SpellCustomErrors
Definition SharedDefines.h:1142
@ SPELL_CUSTOM_ERROR_NONE
Definition SharedDefines.h:1143
SpellCastResult
Definition SharedDefines.h:948
@ SPELL_FAILED_TARGET_NOT_PLAYER
Definition SharedDefines.h:1071
@ SPELL_FAILED_BAD_TARGETS
Definition SharedDefines.h:961
@ SPELL_CAST_OK
Definition SharedDefines.h:1138
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:4685
SpellCastResult CheckRequirementInternal(SpellCustomErrors &extendedError)
Definition boss_professor_putricide.cpp:1291

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
1292 {
1294 if (!instance)
1296
1298 if (!professor)
1300
1301 if (professor->AI()->GetData(DATA_PHASE) == 3 || !professor->IsAlive())
1302 {
1305 }
1306
1307 if (professor->AI()->GetData(DATA_ABOMINATION))
1308 {
1311 }
1312
1313 return SPELL_CAST_OK;
1314 }
@ SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS
Definition SharedDefines.h:1230
@ SPELL_CUSTOM_ERROR_ALL_POTIONS_USED
Definition SharedDefines.h:1231
@ SPELL_FAILED_CUSTOM_ERROR
Definition SharedDefines.h:1121
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
Definition SharedDefines.h:1122
@ DATA_PHASE
Definition boss_professor_putricide.cpp:119
@ DATA_ABOMINATION
Definition boss_professor_putricide.cpp:120
Definition Creature.h:43
CreatureAI * AI() const
Definition Creature.h:141
Definition InstanceScript.h:143
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
virtual uint32 GetData(uint32) const
Definition UnitAI.h:213
bool IsAlive() const
Definition Unit.h:1707
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1203
@ 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.

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

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


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