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
 
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 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< 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

◆ CheckRequirement()

SpellCastResult spell_putricide_mutation_init::CheckRequirement ( )
inlineprivate
1360 {
1361 if (!GetExplTargetUnit())
1363
1364 if (!GetExplTargetUnit()->IsPlayer())
1366
1368 SpellCastResult result = CheckRequirementInternal(extension);
1369 if (result != SPELL_CAST_OK)
1370 {
1371 Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), 0, result, extension);
1372 return result;
1373 }
1374
1375 return SPELL_CAST_OK;
1376 }
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:438
SpellInfo const * GetSpellInfo()
Definition SpellScript.cpp:416
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE)
Definition Spell.cpp:4809
SpellCastResult CheckRequirementInternal(SpellCustomErrors &extendedError)
Definition boss_professor_putricide.cpp:1334

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
1335 {
1337 if (!instance)
1339
1341 if (!professor)
1343
1344 if (professor->AI()->GetData(DATA_PHASE) == 3 || !professor->IsAlive())
1345 {
1348 }
1349
1350 if (professor->AI()->GetData(DATA_ABOMINATION))
1351 {
1354 }
1355
1356 return SPELL_CAST_OK;
1357 }
@ 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:120
@ DATA_ABOMINATION
Definition boss_professor_putricide.cpp:121
Definition Creature.h:47
CreatureAI * AI() const
Definition Creature.h:144
Definition InstanceScript.h:143
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:115
virtual uint32 GetData(uint32) const
Definition UnitAI.h:218
bool IsAlive() const
Definition Unit.h:1796
InstanceScript * GetInstanceScript() const
Definition Object.cpp:1247
@ DATA_PROFESSOR_PUTRICIDE
Definition icecrown_citadel.h:95
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:234

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.

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

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


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