6#ifndef SF_SPELL_SCRIPT_H
7#define SF_SPELL_SCRIPT_H
30#define SPELL_EFFECT_ANY (uint16)-1
31#define SPELL_AURA_ANY (uint16)-1
40#define SPELL_SCRIPT_STATE_END SPELL_SCRIPT_STATE_UNLOADING + 1
55 virtual void _Init(std::string
const* scriptname,
uint32 spellId);
108 virtual bool Load() {
return true; }
132#define HOOK_SPELL_HIT_START SPELL_SCRIPT_HOOK_EFFECT_HIT
133#define HOOK_SPELL_HIT_END SPELL_SCRIPT_HOOK_AFTER_HIT + 1
134#define HOOK_SPELL_START SPELL_SCRIPT_HOOK_EFFECT
135#define HOOK_SPELL_END SPELL_SCRIPT_HOOK_CHECK_CAST + 1
136#define HOOK_SPELL_COUNT HOOK_SPELL_END - HOOK_SPELL_START
143#define SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \
144 typedef SpellCastResult(CLASSNAME::*SpellCheckCastFnType)(); \
145 typedef void(CLASSNAME::*SpellEffectFnType)(SpellEffIndex); \
146 typedef void(CLASSNAME::*SpellHitFnType)(); \
147 typedef void(CLASSNAME::*SpellCastFnType)(); \
148 typedef void(CLASSNAME::*SpellObjectAreaTargetSelectFnType)(std::list<WorldObject*>&); \
149 typedef void(CLASSNAME::*SpellObjectTargetSelectFnType)(WorldObject*&);
185 HitHandler(SpellHitFnType _pHitHandlerScript);
220#define SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
221 class CastHandlerFunction : public SpellScript::CastHandler { public: CastHandlerFunction(SpellCastFnType _pCastHandlerScript) : SpellScript::CastHandler((SpellScript::SpellCastFnType)_pCastHandlerScript) { } }; \
222 class CheckCastHandlerFunction : public SpellScript::CheckCastHandler { public: CheckCastHandlerFunction(SpellCheckCastFnType _checkCastHandlerScript) : SpellScript::CheckCastHandler((SpellScript::SpellCheckCastFnType)_checkCastHandlerScript) { } }; \
223 class EffectHandlerFunction : public SpellScript::EffectHandler { public: EffectHandlerFunction(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : SpellScript::EffectHandler((SpellScript::SpellEffectFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
224 class HitHandlerFunction : public SpellScript::HitHandler { public: HitHandlerFunction(SpellHitFnType _pHitHandlerScript) : SpellScript::HitHandler((SpellScript::SpellHitFnType)_pHitHandlerScript) { } }; \
225 class ObjectAreaTargetSelectHandlerFunction : public SpellScript::ObjectAreaTargetSelectHandler { public: ObjectAreaTargetSelectHandlerFunction(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectAreaTargetSelectHandler((SpellScript::SpellObjectAreaTargetSelectFnType)_pObjectAreaTargetSelectHandlerScript, _effIndex, _targetType) { } }; \
226 class ObjectTargetSelectHandlerFunction : public SpellScript::ObjectTargetSelectHandler { public: ObjectTargetSelectHandlerFunction(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectTargetSelectHandler((SpellScript::SpellObjectTargetSelectFnType)_pObjectTargetSelectHandlerScript, _effIndex, _targetType) { } };
228#define PrepareSpellScript(CLASSNAME) SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
256#define SpellCastFn(F) CastHandlerFunction(&F)
261#define SpellCheckCastFn(F) CheckCastHandlerFunction(&F)
269#define SpellEffectFn(F, I, N) EffectHandlerFunction(&F, I, N)
278#define SpellHitFn(F) HitHandlerFunction(&F)
283#define SpellObjectAreaTargetSelectFn(F, I, N) ObjectAreaTargetSelectHandlerFunction(&F, I, N)
288#define SpellObjectTargetSelectFn(F, I, N) ObjectTargetSelectHandlerFunction(&F, I, N)
440#define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \
441 typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \
442 typedef void(CLASSNAME::*AuraDispelFnType)(DispelInfo* dispelInfo); \
443 typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const*, AuraEffectHandleModes); \
444 typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const*); \
445 typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect*); \
446 typedef void(CLASSNAME::*AuraEffectCalcAmountFnType)(AuraEffect const*, int32 &, bool &); \
447 typedef void(CLASSNAME::*AuraEffectCalcPeriodicFnType)(AuraEffect const*, bool &, int32 &); \
448 typedef void(CLASSNAME::*AuraEffectCalcSpellModFnType)(AuraEffect const*, SpellModifier* &); \
449 typedef void(CLASSNAME::*AuraEffectAbsorbFnType)(AuraEffect*, DamageInfo &, uint32 &); \
450 typedef void(CLASSNAME::*AuraEffectSplitFnType)(AuraEffect*, DamageInfo &, uint32 &); \
451 typedef bool(CLASSNAME::*AuraCheckProcFnType)(ProcEventInfo&); \
452 typedef void(CLASSNAME::*AuraProcFnType)(ProcEventInfo&); \
453 typedef void(CLASSNAME::*AuraEffectProcFnType)(AuraEffect const*, ProcEventInfo&); \
578#define AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
579 class CheckAreaTargetFunction : public AuraScript::CheckAreaTargetHandler { public: CheckAreaTargetFunction(AuraCheckAreaTargetFnType _pHandlerScript) : AuraScript::CheckAreaTargetHandler((AuraScript::AuraCheckAreaTargetFnType)_pHandlerScript) { } }; \
580 class AuraDispelFunction : public AuraScript::AuraDispelHandler { public: AuraDispelFunction(AuraDispelFnType _pHandlerScript) : AuraScript::AuraDispelHandler((AuraScript::AuraDispelFnType)_pHandlerScript) { } }; \
581 class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
582 class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
583 class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
584 class EffectCalcPeriodicHandlerFunction : public AuraScript::EffectCalcPeriodicHandler { public: EffectCalcPeriodicHandlerFunction(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcPeriodicHandler((AuraScript::AuraEffectCalcPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
585 class EffectCalcSpellModHandlerFunction : public AuraScript::EffectCalcSpellModHandler { public: EffectCalcSpellModHandlerFunction(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcSpellModHandler((AuraScript::AuraEffectCalcSpellModFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
586 class EffectApplyHandlerFunction : public AuraScript::EffectApplyHandler { public: EffectApplyHandlerFunction(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode) : AuraScript::EffectApplyHandler((AuraScript::AuraEffectApplicationModeFnType)_pEffectHandlerScript, _effIndex, _effName, _mode) { } }; \
587 class EffectAbsorbFunction : public AuraScript::EffectAbsorbHandler { public: EffectAbsorbFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectAbsorbHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) { } }; \
588 class EffectManaShieldFunction : public AuraScript::EffectManaShieldHandler { public: EffectManaShieldFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectManaShieldHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) { } }; \
589 class EffectSplitFunction : public AuraScript::EffectSplitHandler { public: EffectSplitFunction(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectSplitHandler((AuraScript::AuraEffectSplitFnType)_pEffectHandlerScript, _effIndex) { } }; \
590 class CheckProcHandlerFunction : public AuraScript::CheckProcHandler { public: CheckProcHandlerFunction(AuraCheckProcFnType handlerScript) : AuraScript::CheckProcHandler((AuraScript::AuraCheckProcFnType)handlerScript) { } }; \
591 class AuraProcHandlerFunction : public AuraScript::AuraProcHandler { public: AuraProcHandlerFunction(AuraProcFnType handlerScript) : AuraScript::AuraProcHandler((AuraScript::AuraProcFnType)handlerScript) { } }; \
592 class EffectProcHandlerFunction : public AuraScript::EffectProcHandler { public: EffectProcHandlerFunction(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName) : AuraScript::EffectProcHandler((AuraScript::AuraEffectProcFnType)effectHandlerScript, effIndex, effName) { } }; \
594#define PrepareAuraScript(CLASSNAME) AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
631#define AuraCheckAreaTargetFn(F) CheckAreaTargetFunction(&F)
641#define AuraDispelFn(F) AuraDispelFunction(&F)
652#define AuraEffectApplyFn(F, I, N, M) EffectApplyHandlerFunction(&F, I, N, M)
663#define AuraEffectRemoveFn(F, I, N, M) EffectApplyHandlerFunction(&F, I, N, M)
669#define AuraEffectPeriodicFn(F, I, N) EffectPeriodicHandlerFunction(&F, I, N)
675#define AuraEffectUpdatePeriodicFn(F, I, N) EffectUpdatePeriodicHandlerFunction(&F, I, N)
681#define AuraEffectCalcAmountFn(F, I, N) EffectCalcAmountHandlerFunction(&F, I, N)
687#define AuraEffectCalcPeriodicFn(F, I, N) EffectCalcPeriodicHandlerFunction(&F, I, N)
693#define AuraEffectCalcSpellModFn(F, I, N) EffectCalcSpellModHandlerFunction(&F, I, N)
699#define AuraEffectAbsorbFn(F, I) EffectAbsorbFunction(&F, I)
710#define AuraEffectManaShieldFn(F, I) EffectManaShieldFunction(&F, I)
721#define AuraEffectSplitFn(F, I) EffectSplitFunction(&F, I)
727#define AuraCheckProcFn(F) CheckProcHandlerFunction(&F)
741#define AuraProcFn(F) AuraProcHandlerFunction(&F)
751#define AuraEffectProcFn(F, I, N) EffectProcHandlerFunction(&F, I, N)
@ AURA_SCRIPT_HOOK_EFFECT_CALC_PERIODIC
@ AURA_SCRIPT_HOOK_EFFECT_CALC_AMOUNT
@ AURA_SCRIPT_HOOK_EFFECT_REMOVE
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD
@ AURA_SCRIPT_HOOK_PREPARE_PROC
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE
@ AURA_SCRIPT_HOOK_AFTER_PROC
@ AURA_SCRIPT_HOOK_CHECK_AREA_TARGET
@ AURA_SCRIPT_HOOK_EFFECT_MANASHIELD
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB
@ AURA_SCRIPT_HOOK_DISPEL
@ AURA_SCRIPT_HOOK_EFFECT_APPLY
@ AURA_SCRIPT_HOOK_EFFECT_PERIODIC
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC
@ AURA_SCRIPT_HOOK_EFFECT_ABSORB
@ AURA_SCRIPT_HOOK_EFFECT_PROC
@ AURA_SCRIPT_HOOK_EFFECT_SPLIT
@ AURA_SCRIPT_HOOK_EFFECT_CALC_SPELLMOD
@ AURA_SCRIPT_HOOK_AFTER_DISPEL
@ AURA_SCRIPT_HOOK_CHECK_PROC
@ AURA_SCRIPT_HOOK_EFFECT_UPDATE_PERIODIC
#define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME)
@ SPELL_SCRIPT_STATE_NONE
@ SPELL_SCRIPT_STATE_LOADING
@ SPELL_SCRIPT_STATE_UNLOADING
@ SPELL_SCRIPT_STATE_REGISTRATION
#define SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME)
#define SPELL_SCRIPT_STATE_END
@ SPELL_SCRIPT_HOOK_AFTER_CAST
@ SPELL_SCRIPT_HOOK_EFFECT_HIT
@ SPELL_SCRIPT_HOOK_AFTER_HIT
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH
@ SPELL_SCRIPT_HOOK_OBJECT_AREA_TARGET_SELECT
@ SPELL_SCRIPT_HOOK_BEFORE_HIT
@ SPELL_SCRIPT_HOOK_CHECK_CAST
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH_TARGET
@ SPELL_SCRIPT_HOOK_BEFORE_CAST
@ SPELL_SCRIPT_HOOK_OBJECT_TARGET_SELECT
@ SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET
@ SPELL_SCRIPT_HOOK_ON_CAST
EffectAuraNameCheck(uint16 _effAurName)
bool Check(SpellInfo const *spellInfo, uint8 effIndex)
uint8 GetAffectedEffectsMask(SpellInfo const *spellInfo)
EffectHook(uint8 _effIndex)
bool IsEffectAffected(SpellInfo const *spellInfo, uint8 effIndex)
std::string EffIndexToString()
virtual bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex)=0
bool Check(SpellInfo const *spellInfo, uint8 effIndex)
EffectNameCheck(uint16 _effName)
std::string const * m_scriptName
uint8 m_currentScriptState
virtual bool Validate(SpellInfo const *)
virtual void Register()=0
std::string const * _GetScriptName() const
virtual void _Init(std::string const *scriptname, uint32 spellId)
virtual bool _Validate(SpellInfo const *entry)
void Call(AuraScript *auraScript, DispelInfo *dispelInfo)
AuraDispelHandler(AuraDispelFnType pHandlerScript)
AuraDispelFnType pHandlerScript
AuraProcHandler(AuraProcFnType handlerScript)
void Call(AuraScript *auraScript, ProcEventInfo &eventInfo)
AuraProcFnType _HandlerScript
CheckAreaTargetHandler(AuraCheckAreaTargetFnType pHandlerScript)
AuraCheckAreaTargetFnType pHandlerScript
bool Call(AuraScript *auraScript, Unit *target)
CheckProcHandler(AuraCheckProcFnType handlerScript)
bool Call(AuraScript *auraScript, ProcEventInfo &eventInfo)
AuraCheckProcFnType _HandlerScript
EffectAbsorbHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex)
AuraEffectAbsorbFnType pEffectHandlerScript
void Call(AuraScript *auraScript, AuraEffect *aurEff, DamageInfo &dmgInfo, uint32 &absorbAmount)
void Call(AuraScript *auraScript, AuraEffect const *_aurEff, AuraEffectHandleModes _mode)
EffectApplyHandler(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode)
AuraEffectHandleModes mode
AuraEffectApplicationModeFnType pEffectHandlerScript
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex)
EffectBase(uint8 _effIndex, uint16 _effName)
void Call(AuraScript *auraScript, AuraEffect const *aurEff, int32 &amount, bool &canBeRecalculated)
EffectCalcAmountHandler(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
AuraEffectCalcAmountFnType pEffectHandlerScript
EffectCalcPeriodicHandler(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
AuraEffectCalcPeriodicFnType pEffectHandlerScript
void Call(AuraScript *auraScript, AuraEffect const *aurEff, bool &isPeriodic, int32 &periodicTimer)
AuraEffectCalcSpellModFnType pEffectHandlerScript
void Call(AuraScript *auraScript, AuraEffect const *aurEff, SpellModifier *&spellMod)
EffectCalcSpellModHandler(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
AuraEffectAbsorbFnType pEffectHandlerScript
EffectManaShieldHandler(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex)
void Call(AuraScript *auraScript, AuraEffect *aurEff, DamageInfo &dmgInfo, uint32 &absorbAmount)
AuraEffectPeriodicFnType pEffectHandlerScript
void Call(AuraScript *auraScript, AuraEffect const *_aurEff)
EffectPeriodicHandler(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
EffectProcHandler(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName)
AuraEffectProcFnType _EffectHandlerScript
void Call(AuraScript *auraScript, AuraEffect const *aurEff, ProcEventInfo &eventInfo)
AuraEffectSplitFnType pEffectHandlerScript
EffectSplitHandler(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex)
void Call(AuraScript *auraScript, AuraEffect *aurEff, DamageInfo &dmgInfo, uint32 &splitAmount)
AuraEffectUpdatePeriodicFnType pEffectHandlerScript
void Call(AuraScript *auraScript, AuraEffect *aurEff)
EffectUpdatePeriodicHandler(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
ScriptStateStore(uint8 currentScriptState, AuraApplication const *auraApplication, bool defaultActionPrevented)
bool _defaultActionPrevented
uint8 _currentScriptState
AuraApplication const * _auraApplication
HookList< EffectManaShieldHandler > AfterEffectManaShield
void PreventDefaultAction()
AuraObjectType GetType() const
void Remove(uint32 removeMode=0)
void SetMaxDuration(int32 duration)
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
AuraApplication const * GetTargetApplication() const
int32 GetDuration() const
HookList< EffectApplyHandler > AfterEffectRemove
AuraApplication const * m_auraApplication
bool ModCharges(int8 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectPeriodicHandler > OnEffectPeriodic
bool m_defaultActionPrevented
SpellInfo const * GetSpellInfo() const
WorldObject * GetOwner() const
uint8 CalcMaxCharges() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectProcHandler > AfterEffectProc
int32 GetMaxDuration() const
time_t GetApplyTime() const
void SetCharges(uint8 charges)
HookList< EffectAbsorbHandler > AfterEffectAbsorb
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
uint64 GetCasterGUID() const
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
void SetDuration(int32 duration, bool withMods=false)
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const *aurApp=NULL)
bool DropCharge(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
HookList< EffectManaShieldHandler > OnEffectManaShield
AuraEffect * GetEffect(uint8 effIndex) const
bool HasEffectType(AuraType type) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
std::stack< ScriptStateStore > ScriptStateStack
bool _Validate(SpellInfo const *entry)
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
bool IsDeathPersistent() const
bool _IsDefaultActionPrevented()
HookList< AuraProcHandler > AfterProc
HookList< AuraDispelHandler > OnDispel
HookList< CheckProcHandler > DoCheckProc
HookList< EffectApplyHandler > OnEffectRemove
HookList< AuraDispelHandler > AfterDispel
ScriptStateStack m_scriptStates
int32 CalcMaxDuration() const
void SetStackAmount(uint8 num)
HookList< EffectProcHandler > OnEffectProc
Unit * GetUnitOwner() const
HookList< AuraProcHandler > DoPrepareProc
HookList< AuraProcHandler > OnProc
HookList< EffectSplitHandler > OnEffectSplit
bool HasEffect(uint8 effIndex) const
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
DynamicObject * GetDynobjOwner() const
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
SpellCastFnType pCastHandlerScript
CastHandler(SpellCastFnType _pCastHandlerScript)
void Call(SpellScript *spellScript)
SpellCastResult Call(SpellScript *spellScript)
CheckCastHandler(SpellCheckCastFnType checkCastHandlerScript)
SpellCheckCastFnType _checkCastHandlerScript
void Call(SpellScript *spellScript, SpellEffIndex effIndex)
SpellEffectFnType pEffectHandlerScript
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex)
EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
void Call(SpellScript *spellScript)
HitHandler(SpellHitFnType _pHitHandlerScript)
SpellHitFnType pHitHandlerScript
SpellObjectAreaTargetSelectFnType pObjectAreaTargetSelectHandlerScript
void Call(SpellScript *spellScript, std::list< WorldObject * > &targets)
ObjectAreaTargetSelectHandler(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType)
void Call(SpellScript *spellScript, WorldObject *&targets)
SpellObjectTargetSelectFnType pObjectTargetSelectHandlerScript
ObjectTargetSelectHandler(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType)
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex)
TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area)
bool _IsDefaultEffectPrevented(SpellEffIndex effIndex) const
Creature * GetHitCreature()
HookList< CastHandler > AfterCast
Unit * GetExplTargetUnit()
HookList< CheckCastHandler > OnCheckCast
WorldLocation const * GetExplTargetDest()
Item * GetExplTargetItem()
void SetExplTargetDest(WorldLocation &loc)
bool IsInEffectHook() const
HookList< HitHandler > AfterHit
void FinishCast(SpellCastResult result)
SpellInfo const * GetSpellInfo()
bool _IsEffectPrevented(SpellEffIndex effIndex) const
HookList< HitHandler > OnHit
bool IsInTargetHook() const
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
bool IsInHitPhase() const
uint8 m_hitPreventEffectMask
HookList< EffectHandler > OnEffectHitTarget
void PreventHitEffect(SpellEffIndex effIndex)
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
HookList< CastHandler > OnCast
WorldLocation * GetHitDest()
HookList< CastHandler > BeforeCast
WorldObject * GetExplTargetWorldObject()
SpellInfo const * GetTriggeringSpell()
void SetCustomCastResultMessage(SpellCustomErrors result)
GameObject * GetHitGObj()
void CreateItem(uint32 effIndex, uint32 itemId)
HookList< EffectHandler > OnEffectLaunchTarget
GameObject * GetExplTargetGObj()
uint8 m_hitPreventDefaultEffectMask
void SetHitDamage(int32 damage)
bool IsInCheckCastHook() const
HookList< EffectHandler > OnEffectLaunch
void SetHitHeal(int32 heal)
Unit * GetOriginalCaster()
SpellValue const * GetSpellValue()
void _PrepareScriptCall(SpellScriptHookType hookType)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
HookList< HitHandler > BeforeHit
bool _Validate(SpellInfo const *entry)