18 #ifndef __SPELL_SCRIPT_H
19 #define __SPELL_SCRIPT_H
42 #define SPELL_EFFECT_ANY (uint16)-1
43 #define SPELL_AURA_ANY (uint16)-1
52 #define SPELL_SCRIPT_STATE_END SPELL_SCRIPT_STATE_UNLOADING + 1
60 virtual bool _Validate(
SpellInfo const* entry);
65 virtual void _Register();
66 virtual void _Unload();
67 virtual void _Init(std::string
const* scriptname,
uint32 spellId);
68 std::string
const* _GetScriptName()
const;
79 virtual bool CheckEffect(
SpellInfo const* spellInfo,
uint8 effIndex) = 0;
80 std::string EffIndexToString();
114 virtual void Register() = 0;
120 virtual bool Load() {
return true; }
146 #define HOOK_SPELL_HIT_START SPELL_SCRIPT_HOOK_EFFECT_HIT
147 #define HOOK_SPELL_HIT_END SPELL_SCRIPT_HOOK_AFTER_HIT + 1
148 #define HOOK_SPELL_START SPELL_SCRIPT_HOOK_EFFECT
149 #define HOOK_SPELL_END SPELL_SCRIPT_HOOK_CHECK_CAST + 1
150 #define HOOK_SPELL_COUNT HOOK_SPELL_END - HOOK_SPELL_START
157 #define SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \
158 typedef SpellCastResult(CLASSNAME::*SpellCheckCastFnType)(); \
159 typedef void(CLASSNAME::*SpellEffectFnType)(SpellEffIndex); \
160 typedef void(CLASSNAME::*SpellHitFnType)(); \
161 typedef void(CLASSNAME::*SpellCastFnType)(); \
162 typedef void(CLASSNAME::*SpellObjectAreaTargetSelectFnType)(std::list<WorldObject*>&); \
163 typedef void(CLASSNAME::*SpellObjectTargetSelectFnType)(WorldObject*&); \
164 typedef void(CLASSNAME::*SpellDestinationTargetSelectFnType)(SpellDestination&);
171 CastHandler(SpellCastFnType _pCastHandlerScript);
200 HitHandler(SpellHitFnType _pHitHandlerScript);
223 void Call(
SpellScript* spellScript, std::list<WorldObject*>& targets);
246 #define SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
247 class CastHandlerFunction : public SpellScript::CastHandler { public: CastHandlerFunction(SpellCastFnType _pCastHandlerScript) : SpellScript::CastHandler((SpellScript::SpellCastFnType)_pCastHandlerScript) { } }; \
248 class CheckCastHandlerFunction : public SpellScript::CheckCastHandler { public: CheckCastHandlerFunction(SpellCheckCastFnType _checkCastHandlerScript) : SpellScript::CheckCastHandler((SpellScript::SpellCheckCastFnType)_checkCastHandlerScript) { } }; \
249 class EffectHandlerFunction : public SpellScript::EffectHandler { public: EffectHandlerFunction(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : SpellScript::EffectHandler((SpellScript::SpellEffectFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
250 class HitHandlerFunction : public SpellScript::HitHandler { public: HitHandlerFunction(SpellHitFnType _pHitHandlerScript) : SpellScript::HitHandler((SpellScript::SpellHitFnType)_pHitHandlerScript) { } }; \
251 class ObjectAreaTargetSelectHandlerFunction : public SpellScript::ObjectAreaTargetSelectHandler { public: ObjectAreaTargetSelectHandlerFunction(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectAreaTargetSelectHandler((SpellScript::SpellObjectAreaTargetSelectFnType)_pObjectAreaTargetSelectHandlerScript, _effIndex, _targetType) { } }; \
252 class ObjectTargetSelectHandlerFunction : public SpellScript::ObjectTargetSelectHandler { public: ObjectTargetSelectHandlerFunction(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::ObjectTargetSelectHandler((SpellScript::SpellObjectTargetSelectFnType)_pObjectTargetSelectHandlerScript, _effIndex, _targetType) { } }; \
253 class DestinationTargetSelectHandlerFunction : public SpellScript::DestinationTargetSelectHandler { public: DestinationTargetSelectHandlerFunction(SpellDestinationTargetSelectFnType _DestinationTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType) : SpellScript::DestinationTargetSelectHandler((SpellScript::SpellDestinationTargetSelectFnType)_DestinationTargetSelectHandlerScript, _effIndex, _targetType) { } }
255 #define PrepareSpellScript(CLASSNAME) SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) SPELLSCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
283 #define SpellCastFn(F) CastHandlerFunction(&F)
288 #define SpellCheckCastFn(F) CheckCastHandlerFunction(&F)
297 #define SpellEffectFn(F, I, N) EffectHandlerFunction(&F, I, N)
306 #define SpellHitFn(F) HitHandlerFunction(&F)
311 #define SpellObjectAreaTargetSelectFn(F, I, N) ObjectAreaTargetSelectHandlerFunction(&F, I, N)
316 #define SpellObjectTargetSelectFn(F, I, N) ObjectTargetSelectHandlerFunction(&F, I, N)
321 #define SpellDestinationTargetSelectFn(F, I, N) DestinationTargetSelectHandlerFunction(&F, I, N)
481 #define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \
482 typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \
483 typedef void(CLASSNAME::*AuraDispelFnType)(DispelInfo* dispelInfo); \
484 typedef void(CLASSNAME::*AuraEffectApplicationModeFnType)(AuraEffect const*, AuraEffectHandleModes); \
485 typedef void(CLASSNAME::*AuraEffectPeriodicFnType)(AuraEffect const*); \
486 typedef void(CLASSNAME::*AuraEffectUpdatePeriodicFnType)(AuraEffect*); \
487 typedef void(CLASSNAME::*AuraEffectCalcAmountFnType)(AuraEffect const*, int32 &, bool &); \
488 typedef void(CLASSNAME::*AuraEffectCalcPeriodicFnType)(AuraEffect const*, bool &, int32 &); \
489 typedef void(CLASSNAME::*AuraEffectCalcSpellModFnType)(AuraEffect const*, SpellModifier* &); \
490 typedef void(CLASSNAME::*AuraEffectAbsorbFnType)(AuraEffect*, DamageInfo &, uint32 &); \
491 typedef void(CLASSNAME::*AuraEffectSplitFnType)(AuraEffect*, DamageInfo &, uint32 &); \
492 typedef bool(CLASSNAME::*AuraCheckProcFnType)(ProcEventInfo&); \
493 typedef void(CLASSNAME::*AuraProcFnType)(ProcEventInfo&); \
494 typedef void(CLASSNAME::*AuraEffectProcFnType)(AuraEffect const*, ProcEventInfo&); \
501 CheckAreaTargetHandler(AuraCheckAreaTargetFnType pHandlerScript);
619 #define AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME) \
620 class CheckAreaTargetFunction : public AuraScript::CheckAreaTargetHandler { public: CheckAreaTargetFunction(AuraCheckAreaTargetFnType _pHandlerScript) : AuraScript::CheckAreaTargetHandler((AuraScript::AuraCheckAreaTargetFnType)_pHandlerScript) { } }; \
621 class AuraDispelFunction : public AuraScript::AuraDispelHandler { public: AuraDispelFunction(AuraDispelFnType _pHandlerScript) : AuraScript::AuraDispelHandler((AuraScript::AuraDispelFnType)_pHandlerScript) { } }; \
622 class EffectPeriodicHandlerFunction : public AuraScript::EffectPeriodicHandler { public: EffectPeriodicHandlerFunction(AuraEffectPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectPeriodicHandler((AuraScript::AuraEffectPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
623 class EffectUpdatePeriodicHandlerFunction : public AuraScript::EffectUpdatePeriodicHandler { public: EffectUpdatePeriodicHandlerFunction(AuraEffectUpdatePeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectUpdatePeriodicHandler((AuraScript::AuraEffectUpdatePeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
624 class EffectCalcAmountHandlerFunction : public AuraScript::EffectCalcAmountHandler { public: EffectCalcAmountHandlerFunction(AuraEffectCalcAmountFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcAmountHandler((AuraScript::AuraEffectCalcAmountFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
625 class EffectCalcPeriodicHandlerFunction : public AuraScript::EffectCalcPeriodicHandler { public: EffectCalcPeriodicHandlerFunction(AuraEffectCalcPeriodicFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcPeriodicHandler((AuraScript::AuraEffectCalcPeriodicFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
626 class EffectCalcSpellModHandlerFunction : public AuraScript::EffectCalcSpellModHandler { public: EffectCalcSpellModHandlerFunction(AuraEffectCalcSpellModFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName) : AuraScript::EffectCalcSpellModHandler((AuraScript::AuraEffectCalcSpellModFnType)_pEffectHandlerScript, _effIndex, _effName) { } }; \
627 class EffectApplyHandlerFunction : public AuraScript::EffectApplyHandler { public: EffectApplyHandlerFunction(AuraEffectApplicationModeFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName, AuraEffectHandleModes _mode) : AuraScript::EffectApplyHandler((AuraScript::AuraEffectApplicationModeFnType)_pEffectHandlerScript, _effIndex, _effName, _mode) { } }; \
628 class EffectAbsorbFunction : public AuraScript::EffectAbsorbHandler { public: EffectAbsorbFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectAbsorbHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) { } }; \
629 class EffectManaShieldFunction : public AuraScript::EffectManaShieldHandler { public: EffectManaShieldFunction(AuraEffectAbsorbFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectManaShieldHandler((AuraScript::AuraEffectAbsorbFnType)_pEffectHandlerScript, _effIndex) { } }; \
630 class EffectSplitFunction : public AuraScript::EffectSplitHandler { public: EffectSplitFunction(AuraEffectSplitFnType _pEffectHandlerScript, uint8 _effIndex) : AuraScript::EffectSplitHandler((AuraScript::AuraEffectSplitFnType)_pEffectHandlerScript, _effIndex) { } }; \
631 class CheckProcHandlerFunction : public AuraScript::CheckProcHandler { public: CheckProcHandlerFunction(AuraCheckProcFnType handlerScript) : AuraScript::CheckProcHandler((AuraScript::AuraCheckProcFnType)handlerScript) { } }; \
632 class AuraProcHandlerFunction : public AuraScript::AuraProcHandler { public: AuraProcHandlerFunction(AuraProcFnType handlerScript) : AuraScript::AuraProcHandler((AuraScript::AuraProcFnType)handlerScript) { } }; \
633 class EffectProcHandlerFunction : public AuraScript::EffectProcHandler { public: EffectProcHandlerFunction(AuraEffectProcFnType effectHandlerScript, uint8 effIndex, uint16 effName) : AuraScript::EffectProcHandler((AuraScript::AuraEffectProcFnType)effectHandlerScript, effIndex, effName) { } }
635 #define PrepareAuraScript(CLASSNAME) AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) AURASCRIPT_FUNCTION_CAST_DEFINES(CLASSNAME)
657 : _auraApplication(auraApplication), _currentScriptState(currentScriptState), _defaultActionPrevented(defaultActionPrevented)
672 #define AuraCheckAreaTargetFn(F) CheckAreaTargetFunction(&F)
682 #define AuraDispelFn(F) AuraDispelFunction(&F)
693 #define AuraEffectApplyFn(F, I, N, M) EffectApplyHandlerFunction(&F, I, N, M)
704 #define AuraEffectRemoveFn(F, I, N, M) EffectApplyHandlerFunction(&F, I, N, M)
710 #define AuraEffectPeriodicFn(F, I, N) EffectPeriodicHandlerFunction(&F, I, N)
716 #define AuraEffectUpdatePeriodicFn(F, I, N) EffectUpdatePeriodicHandlerFunction(&F, I, N)
722 #define AuraEffectCalcAmountFn(F, I, N) EffectCalcAmountHandlerFunction(&F, I, N)
728 #define AuraEffectCalcPeriodicFn(F, I, N) EffectCalcPeriodicHandlerFunction(&F, I, N)
734 #define AuraEffectCalcSpellModFn(F, I, N) EffectCalcSpellModHandlerFunction(&F, I, N)
740 #define AuraEffectAbsorbFn(F, I) EffectAbsorbFunction(&F, I)
751 #define AuraEffectManaShieldFn(F, I) EffectManaShieldFunction(&F, I)
762 #define AuraEffectSplitFn(F, I) EffectSplitFunction(&F, I)
768 #define AuraCheckProcFn(F) CheckProcHandlerFunction(&F)
782 #define AuraProcFn(F) AuraProcHandlerFunction(&F)
792 #define AuraEffectProcFn(F, I, N) EffectProcHandlerFunction(&F, I, N)
797 void PreventDefaultAction();
809 Unit* GetCaster()
const;
813 Unit* GetUnitOwner()
const;
820 Aura* GetAura()
const;
826 int32 GetDuration()
const;
827 void SetDuration(
int32 duration,
bool withMods =
false);
829 void RefreshDuration();
830 time_t GetApplyTime()
const;
831 int32 GetMaxDuration()
const;
832 void SetMaxDuration(
int32 duration);
833 int32 CalcMaxDuration()
const;
835 bool IsExpired()
const;
837 bool IsPermanent()
const;
840 uint8 GetCharges()
const;
841 void SetCharges(
uint8 charges);
842 uint8 CalcMaxCharges()
const;
848 uint8 GetStackAmount()
const;
849 void SetStackAmount(
uint8 num);
853 bool IsPassive()
const;
855 bool IsDeathPersistent()
const;
858 bool HasEffect(
uint8 effIndex)
const;
863 bool HasEffectType(
AuraType type)
const;
871 Unit* GetTarget()
const;
891 #endif // __SPELL_SCRIPT_H
SpellScriptHookType
Definition: SpellScript.h:127
Definition: SpellScript.h:135
bool _defaultActionPrevented
Definition: SpellScript.h:655
Definition: SpellScript.h:578
AuraType
Definition: SpellAuraDefines.h:58
bool Remove(ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:104
Definition: SpellAuraEffects.h:30
SpellEffectInfo const * GetEffectInfo() const
Definition: SpellScript.cpp:593
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Definition: SpellScript.cpp:583
bool _IsDefaultActionPrevented()
Definition: SpellScript.cpp:952
Definition: SpellScript.h:138
Definition: SpellScript.h:131
HookList< EffectAbsorbHandler > AfterEffectAbsorb
Definition: SpellScript.h:745
uint16 effName
Definition: SpellScript.h:92
GameObject * GetExplTargetGObj()
Definition: SpellScript.cpp:431
Definition: SpellScript.h:48
Unit * GetExplTargetUnit()
Definition: SpellScript.cpp:426
HookList< EffectApplyHandler > AfterEffectApply
Definition: SpellScript.h:692
Definition: SpellScript.h:95
Definition: SpellScript.h:456
Definition: Position.h:228
Definition: SpellScript.h:168
virtual bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex)=0
std::string ToString()
Definition: SpellScript.cpp:148
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Definition: SpellScript.h:310
int8_t int8
Definition: Define.h:148
#define SPELL_SCRIPT_STATE_END
Definition: SpellScript.h:52
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
Definition: SpellScript.h:733
HookList< HitHandler > OnHit
Definition: SpellScript.h:302
ScriptStateStack m_scriptStates
Definition: SpellScript.h:661
Definition: SpellScript.h:47
Definition: SpellScript.h:602
AuraEffectHandleModes
Definition: SpellAuraDefines.h:36
Definition: SpellScript.h:443
Definition: SpellScript.h:459
AuraCheckAreaTargetFnType pHandlerScript
Definition: SpellScript.h:504
bool _IsEffectPrevented(SpellEffIndex effIndex)
Definition: SpellScript.h:260
Definition: SpellScript.h:461
HookList< CastHandler > OnCast
Definition: SpellScript.h:280
WorldLocation * GetHitDest()
Definition: SpellScript.cpp:497
SpellCustomErrors
Definition: SharedDefines.h:1541
Definition: SpellInfo.h:326
Definition: SpellScript.h:453
Definition: SpellScript.h:463
Definition: SpellScript.h:529
AuraObjectType
Definition: SpellAuraDefines.h:546
uint8 m_currentScriptState
Definition: SpellScript.h:105
Definition: SpellScript.h:650
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
Definition: SpellScript.h:671
HookList< EffectHandler > OnEffectHit
Definition: SpellScript.h:294
void CreateItem(uint32 effIndex, uint32 itemId)
Definition: SpellScript.cpp:627
void PreventHitDamage()
Definition: SpellScript.h:397
Definition: SpellScript.h:49
Definition: SpellScript.h:136
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition: SpellScript.h:320
uint8 m_hitPreventEffectMask
Definition: SpellScript.h:270
void PreventHitHeal()
Definition: SpellScript.h:402
bool IsInEffectHook() const
Definition: SpellScript.cpp:389
Definition: SpellScript.h:570
EffectAuraNameCheck(uint16 _effAurName)
Definition: SpellScript.h:98
Definition: SpellAuras.h:50
Definition: SpellScript.h:55
Player * GetHitPlayer()
Definition: SpellScript.cpp:464
virtual ~_SpellScript()
Definition: SpellScript.h:64
Definition: SpellScript.h:452
bool _Load(Aura *aura)
Definition: SpellScript.cpp:926
Definition: SpellScript.h:152
bool IsInCheckCastHook() const
Definition: SpellScript.cpp:367
HookList< EffectManaShieldHandler > OnEffectManaShield
Definition: SpellScript.h:750
AuraEffectAbsorbFnType pEffectHandlerScript
Definition: SpellScript.h:584
arena_t NULL
Definition: jemalloc_internal.h:624
#define false
Definition: CascPort.h:18
AuraEffectPeriodicFnType pEffectHandlerScript
Definition: SpellScript.h:527
Definition: SpellScript.h:457
uint16 effAurName
Definition: SpellScript.h:102
Definition: SpellScript.h:610
void _InitHit()
Definition: SpellScript.cpp:351
Definition: Creature.h:467
Definition: SpellScript.h:586
GameObject * GetHitGObj()
Definition: SpellScript.cpp:487
AuraEffectAbsorbFnType pEffectHandlerScript
Definition: SpellScript.h:576
Definition: SpellScript.h:444
SpellCastFnType pCastHandlerScript
Definition: SpellScript.h:174
Definition: SpellScript.h:445
void SetHitHeal(int32 heal)
Definition: SpellScript.cpp:537
void PreventHitAura()
Definition: SpellScript.cpp:561
Aura * GetHitAura()
Definition: SpellScript.cpp:547
Definition: SpellScript.h:186
Definition: SpellScript.h:130
HookList< EffectHandler > OnEffectLaunchTarget
Definition: SpellScript.h:293
HookList< AuraDispelHandler > AfterDispel
Definition: SpellScript.h:681
AuraApplication const * _auraApplication
Definition: SpellScript.h:653
uint8 m_hitPreventDefaultEffectMask
Definition: SpellScript.h:271
Definition: SpellScript.h:133
Definition: SpellScript.h:142
void _FinishScriptCall()
Definition: SpellScript.cpp:362
int32 GetHitHeal()
Definition: SpellScript.cpp:527
WorldLocation const * GetExplTargetDest()
Definition: SpellScript.cpp:409
AuraEffectHandleModes mode
Definition: SpellScript.h:568
Item * GetHitItem()
Definition: SpellScript.cpp:477
Definition: SpellScript.h:447
SpellEffectFnType pEffectHandlerScript
Definition: SpellScript.h:194
TC_GAME_API uint32 GetId(std::string const &username)
Definition: BattlenetAccountMgr.cpp:128
Definition: DynamicObject.h:35
uint8 effIndex
Definition: SpellScript.h:82
HookList< EffectApplyHandler > OnEffectRemove
Definition: SpellScript.h:699
HookList< EffectAbsorbHandler > OnEffectAbsorb
Definition: SpellScript.h:739
Spell * m_spell
Definition: SpellScript.h:269
Definition: SpellScript.h:514
AuraScript()
Definition: SpellScript.h:638
Definition: SpellScript.h:237
HookList< EffectSplitHandler > OnEffectSplit
Definition: SpellScript.h:761
AuraEffectApplicationModeFnType pEffectHandlerScript
Definition: SpellScript.h:567
string ToString(int i)
Definition: strutil.h:491
WorldObject * GetExplTargetWorldObject()
Definition: SpellScript.cpp:421
virtual ~EffectHook()
Definition: SpellScript.h:75
HookList< HitHandler > BeforeHit
Definition: SpellScript.h:300
Definition: SpellScript.h:134
bool _Validate(SpellInfo const *entry) override
Definition: SpellScript.cpp:305
Definition: SpellScript.h:446
HookList< CastHandler > AfterCast
Definition: SpellScript.h:282
Definition: SpellScript.h:177
uint32 m_scriptSpellId
Definition: SpellScript.h:107
Unit * GetOriginalCaster()
Definition: SpellScript.cpp:399
Spell * GetSpell()
Definition: SpellScript.h:403
uint16 targetType
Definition: SpellScript.h:214
bool IsInTargetHook() const
Definition: SpellScript.cpp:371
HookList< CheckProcHandler > DoCheckProc
Definition: SpellScript.h:767
bool area
Definition: SpellScript.h:215
Definition: SpellScript.h:465
Definition: SpellScript.h:71
AuraEffectSplitFnType pEffectHandlerScript
Definition: SpellScript.h:592
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
Definition: SpellScript.h:315
HookList< EffectApplyHandler > AfterEffectRemove
Definition: SpellScript.h:703
SpellEffIndex
Definition: SharedDefines.h:26
Definition: SpellScript.h:466
Definition: SpellInfo.h:238
int32_t int32
Definition: Define.h:146
ScriptStateStore(uint8 currentScriptState, AuraApplication const *auraApplication, bool defaultActionPrevented)
Definition: SpellScript.h:656
Definition: SpellScript.h:545
HookList< EffectHandler > OnEffectSuccessfulDispel
Definition: SpellScript.h:296
uint32_t uint32
Definition: Define.h:150
bool m_defaultActionPrevented
Definition: SpellScript.h:648
HookList< AuraProcHandler > DoPrepareProc
Definition: SpellScript.h:773
Definition: SpellScript.h:132
AuraApplication const * m_auraApplication
Definition: SpellScript.h:647
#define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME)
Definition: SpellScript.h:481
AuraEffectCalcSpellModFnType pEffectHandlerScript
Definition: SpellScript.h:559
Definition: SpellScript.h:448
uint16_t uint16
Definition: Define.h:151
HookList< EffectHandler > OnEffectHitTarget
Definition: SpellScript.h:295
SpellInfo const * GetSpellInfo()
Definition: SpellScript.cpp:404
Definition: GameObject.h:880
std::string const * m_scriptName
Definition: SpellScript.h:106
Definition: SpellScript.h:594
HookList< AuraProcHandler > OnProc
Definition: SpellScript.h:777
void SetEffectValue(int32 value)
Definition: SpellScript.cpp:611
Definition: SpellScript.h:139
EffectNameCheck(uint16 _effName)
Definition: SpellScript.h:88
Definition: SpellScript.h:137
AuraEffectUpdatePeriodicFnType pEffectHandlerScript
Definition: SpellScript.h:535
Definition: SpellScript.h:451
bool _Validate(SpellInfo const *entry) override
Definition: SpellScript.cpp:664
Definition: SpellScript.h:553
bool IsInHitPhase() const
Definition: SpellScript.cpp:384
HookList< AuraDispelHandler > OnDispel
Definition: SpellScript.h:677
Definition: SpellScript.h:219
AuraEffectCalcAmountFnType pEffectHandlerScript
Definition: SpellScript.h:543
bool dest
Definition: SpellScript.h:216
Definition: SpellScript.h:141
HookList< CheckCastHandler > OnCheckCast
Definition: SpellScript.h:287
void SetExplTargetDest(WorldLocation &loc)
Definition: SpellScript.cpp:416
_SpellScript()
Definition: SpellScript.h:63
SpellObjectTargetSelectFnType pObjectTargetSelectHandlerScript
Definition: SpellScript.h:234
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:688
Definition: SpellScript.h:143
Aura * m_aura
Definition: SpellScript.h:646
uint8 _currentScriptState
Definition: SpellScript.h:654
Definition: SpellScript.h:206
void FinishCast(SpellCastResult result)
Definition: SpellScript.cpp:637
SpellInfo const * GetTriggeringSpell()
Definition: SpellScript.cpp:632
Definition: SpellScript.h:462
SpellScriptState
Definition: SpellScript.h:45
void SetHitDamage(int32 damage)
Definition: SpellScript.cpp:517
Definition: SpellScript.h:197
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:709
SpellValue const * GetSpellValue()
Definition: SpellScript.cpp:654
Unit * GetCaster()
Definition: SpellScript.cpp:394
virtual void Unload()
Definition: SpellScript.h:123
HookList< CastHandler > BeforeCast
Definition: SpellScript.h:278
void _FinishScriptCall()
Definition: SpellScript.cpp:943
void SetCustomCastResultMessage(SpellCustomErrors result)
Definition: SpellScript.cpp:643
#define TC_GAME_API
Definition: Define.h:134
Creature * GetHitCreature()
Definition: SpellScript.cpp:451
int32 GetHitDamage()
Definition: SpellScript.cpp:507
AuraRemoveMode
Definition: Unit.h:448
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
Definition: SpellScript.h:715
Definition: SpellScript.h:454
void PreventHitEffect(SpellEffIndex effIndex)
Definition: SpellScript.cpp:572
Item * GetCastItem()
Definition: SpellScript.cpp:622
uint16 GetTarget() const
Definition: SpellScript.h:212
uint8_t uint8
Definition: Define.h:152
Definition: SpellScript.h:521
HookList< EffectProcHandler > OnEffectProc
Definition: SpellScript.h:787
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const *aurApp=NULL)
Definition: SpellScript.cpp:935
std::stack< ScriptStateStore > ScriptStateStack
Definition: SpellScript.h:660
SpellDestinationTargetSelectFnType DestinationTargetSelectHandlerScript
Definition: SpellScript.h:243
Definition: SpellScript.h:450
HookList< EffectProcHandler > AfterEffectProc
Definition: SpellScript.h:791
SpellCastResult
Definition: SharedDefines.h:1265
virtual bool Validate(SpellInfo const *)
Definition: SpellScript.h:117
const FieldDescriptor value
Definition: descriptor.h:1522
HookList< EffectHandler > OnEffectLaunch
Definition: SpellScript.h:292
Unit * GetHitUnit()
Definition: SpellScript.cpp:441
void _PrepareScriptCall(SpellScriptHookType hookType)
Definition: SpellScript.cpp:357
Definition: ObjectGuid.h:189
int32 GetEffectValue() const
Definition: SpellScript.cpp:600
SpellHitFnType pHitHandlerScript
Definition: SpellScript.h:203
#define SPELLSCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME)
Definition: SpellScript.h:157
AuraScriptHookType
Definition: SpellScript.h:441
Definition: SpellScript.h:228
Definition: SpellScript.h:506
Definition: SpellScript.h:458
Definition: SpellScript.h:475
SpellCheckCastFnType _checkCastHandlerScript
Definition: SpellScript.h:183
AuraCheckProcFnType _HandlerScript
Definition: SpellScript.h:600
Definition: SpellAuras.h:116
AuraDispelFnType pHandlerScript
Definition: SpellScript.h:512
virtual bool Load()
Definition: SpellScript.h:120
HookList< EffectManaShieldHandler > AfterEffectManaShield
Definition: SpellScript.h:756
Definition: SpellScript.h:561
Definition: SpellScript.h:129
Definition: SpellScript.h:50
HookList< EffectCalcAmountHandler > DoEffectCalcAmount
Definition: SpellScript.h:721
HookList< AuraProcHandler > AfterProc
Definition: SpellScript.h:781
Definition: SpellScript.h:464
AuraEffectProcFnType _EffectHandlerScript
Definition: SpellScript.h:616
Definition: SpellScript.h:537
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
Definition: SpellScript.h:727
AuraEffectCalcPeriodicFnType pEffectHandlerScript
Definition: SpellScript.h:551
Item * GetExplTargetItem()
Definition: SpellScript.cpp:436
SpellObjectAreaTargetSelectFnType pObjectAreaTargetSelectHandlerScript
Definition: SpellScript.h:225
bool _IsDefaultEffectPrevented(SpellEffIndex effIndex)
Definition: SpellScript.h:261
AuraProcFnType _HandlerScript
Definition: SpellScript.h:608
Definition: SpellScript.h:449
Definition: SpellScript.h:85
Definition: SpellScript.h:140
Definition: SpellScript.h:455
Definition: SpellScript.h:498
HookList< HitHandler > AfterHit
Definition: SpellScript.h:304
bool _Load(Spell *spell)
Definition: SpellScript.cpp:342