AzerothCore 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
1449 {
1450 if (!GetExplTargetUnit())
1452
1453 if (GetExplTargetUnit()->GetTypeId() != TYPEID_PLAYER)
1455
1457 SpellCastResult result = CheckRequirementInternal(extension);
1458 if (result != SPELL_CAST_OK)
1459 {
1460 Spell::SendCastResult(GetExplTargetUnit()->ToPlayer(), GetSpellInfo(), 0, result, extension);
1461 return result;
1462 }
1463
1464 return SPELL_CAST_OK;
1465 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
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
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE)
Definition: Spell.cpp:4645
Unit * GetExplTargetUnit()
Definition: SpellScript.cpp:433
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:411
SpellCastResult CheckRequirementInternal(SpellCustomErrors &extendedError)
Definition: boss_professor_putricide.cpp:1423

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
1424 {
1426 if (!instance)
1428
1430 if (!professor)
1432
1433 if (professor->AI()->GetData(DATA_PHASE) == 3 || !professor->IsAlive())
1434 {
1437 }
1438
1439 if (professor->AI()->GetData(DATA_ABOMINATION))
1440 {
1443 }
1444
1445 return SPELL_CAST_OK;
1446 }
@ DATA_PHASE
Definition: boss_professor_putricide.cpp:119
@ DATA_ABOMINATION
Definition: boss_professor_putricide.cpp:120
@ DATA_PROFESSOR_PUTRICIDE
Definition: icecrown_citadel.h:100
@ 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
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
virtual uint32 GetData(uint32) const
Definition: UnitAI.h:202
Definition: Creature.h:46
CreatureAI * AI() const
Definition: Creature.h:136
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool IsAlive() const
Definition: Unit.h:1822
Definition: InstanceScript.h:141
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94

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.

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

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