32 TC_LOG_ERROR(
"scripts",
"Spell `{}` did not pass Validate() function of script `{}` - script will be not added to the spell", entry->
Id,
m_scriptName->c_str());
42 TC_LOG_ERROR(
"scripts.spells",
"_SpellScript::ValidateSpellInfo: Spell {} does not exist.", spellId);
69#ifdef TRINITY_API_USE_DYNAMIC_LINKING
72 m_moduleReference =
sScriptMgr->AcquireModuleReferenceOfScriptName(*scriptname);
97 if (CheckEffect(spellEntry, i))
103 if (CheckEffect(spellEntry, effIndex))
104 mask |= (
uint8)1<<effIndex;
111 return (GetAffectedEffectsMask(spellEntry) & 1 << effIndexToCheck) != 0;
121 return "EFFECT_FIRST_FOUND";
129 return "Invalid Value";
135 if (!spellEffectInfo.
Effect && !effName)
137 if (!spellEffectInfo.
Effect)
147 return "SPELL_EFFECT_ANY";
150 sprintf (num,
"%u", effName);
170 return "SPELL_AURA_ANY";
173 sprintf (num,
"%u", effAurName);
180 pCastHandlerScript = _pCastHandlerScript;
185 (spellScript->*pCastHandlerScript)();
190 _checkCastHandlerScript = checkCastHandlerScript;
195 return (spellScript->*_checkCastHandlerScript)();
200 pOnCalculateResistAbsorbHandlerScript = onResistAbsorbCalculateHandlerScript;
205 return (spellScript->*pOnCalculateResistAbsorbHandlerScript)(damageInfo, resistAmount, absorbAmount);
226 (spellScript->*pEffectHandlerScript)(effIndexToHandle);
231 _pBeforeHitHandlerScript = pBeforeHitHandlerScript;
236 (spellScript->*_pBeforeHitHandlerScript)(missInfo);
241 pHitHandlerScript = _pHitHandlerScript;
246 (spellScript->*pHitHandlerScript)();
254 std::ostringstream oss;
255 oss <<
"Index: " << EffIndexToString() <<
" Target: " << targetType;
307 :
TargetHook(_effIndex, _targetType, true, false)
314 (spellScript->*pObjectAreaTargetSelectHandlerScript)(targets);
318 :
TargetHook(_effIndex, _targetType, false, false)
325 (spellScript->*pObjectTargetSelectHandlerScript)(target);
329 :
TargetHook(_effIndex, _targetType, false, true)
336 (spellScript->*DestinationTargetSelectHandlerScript)(target);
348 if (!(*itr).GetAffectedEffectsMask(entry))
349 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
352 if (!(*itr).GetAffectedEffectsMask(entry))
353 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
356 if (!(*itr).GetAffectedEffectsMask(entry))
357 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
360 if (!(*itr).GetAffectedEffectsMask(entry))
361 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
364 if (!(*itr).GetAffectedEffectsMask(entry))
365 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectSuccessfulDispel` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
368 if (!(*itr).GetAffectedEffectsMask(entry))
369 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
372 if (!(*itr).GetAffectedEffectsMask(entry))
373 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
376 if (!(*itr).GetAffectedEffectsMask(entry))
377 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnDestinationTargetSelect` of SpellScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
524 TC_LOG_ERROR(
"scripts",
"Script: `%s` Spell: `%u`: function SpellScript::GetUnitTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
535 TC_LOG_ERROR(
"scripts",
"Script: `%s` Spell: `%u`: function SpellScript::GetGameObjectTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
546 TC_LOG_ERROR(
"scripts",
"Script: `%s` Spell: `%u`: function SpellScript::GetItemTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
715 TC_LOG_ERROR(
"scripts",
"Script: `{}` Spell: `{}`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!",
m_scriptName->c_str(),
m_scriptSpellId);
786 TC_LOG_ERROR(
"scripts",
"Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->
Id,
m_scriptName->c_str());
790 TC_LOG_ERROR(
"scripts",
"Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->
Id,
m_scriptName->c_str());
794 TC_LOG_ERROR(
"scripts",
"Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->
Id,
m_scriptName->c_str());
797 if (!(*itr).GetAffectedEffectsMask(entry))
798 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
801 if (!(*itr).GetAffectedEffectsMask(entry))
802 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
805 if (!(*itr).GetAffectedEffectsMask(entry))
806 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
809 if (!(*itr).GetAffectedEffectsMask(entry))
810 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
813 if (!(*itr).GetAffectedEffectsMask(entry))
814 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
817 if (!(*itr).GetAffectedEffectsMask(entry))
818 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
821 if (!(*itr).GetAffectedEffectsMask(entry))
822 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
825 if (!(*itr).GetAffectedEffectsMask(entry))
826 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
829 if (!(*itr).GetAffectedEffectsMask(entry))
830 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
833 if (!(*itr).GetAffectedEffectsMask(entry))
834 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
837 if (!(*itr).GetAffectedEffectsMask(entry))
838 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
841 if (!(*itr).GetAffectedEffectsMask(entry))
842 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
845 if (!(*itr).GetAffectedEffectsMask(entry))
846 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
849 if (!(*itr).GetAffectedEffectsMask(entry))
850 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
854 TC_LOG_ERROR(
"scripts",
"Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->
Id,
m_scriptName->c_str());
857 if (!itr->GetAffectedEffectsMask(entry))
858 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoCheckEffectProc` of AuraScript won't be executed", entry->
Id, itr->ToString(),
m_scriptName->c_str());
862 TC_LOG_ERROR(
"scripts",
"Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->
Id,
m_scriptName->c_str());
864 for (
auto itr =
OnProc.begin(); itr !=
OnProc.end(); ++itr)
866 TC_LOG_ERROR(
"scripts",
"Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->
Id,
m_scriptName->c_str());
870 TC_LOG_ERROR(
"scripts",
"Spell `{}` of script `{}` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->
Id,
m_scriptName->c_str());
873 if (!(*itr).GetAffectedEffectsMask(entry))
874 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
877 if (!(*itr).GetAffectedEffectsMask(entry))
878 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->
Id, (*itr).ToString(),
m_scriptName->c_str());
890 return (auraScript->*pHandlerScript)(_target);
895 pHandlerScript = _pHandlerScript;
900 (auraScript->*pHandlerScript)(_dispelInfo);
924 (auraScript->*pEffectHandlerScript)(_aurEff);
935 (auraScript->*pEffectHandlerScript)(aurEff);
946 (auraScript->*pEffectHandlerScript)(aurEff, amount, canBeRecalculated);
957 (auraScript->*pEffectHandlerScript)(aurEff, isPeriodic, periodicTimer);
968 (auraScript->*pEffectHandlerScript)(aurEff, spellMod);
981 (auraScript->*pEffectHandlerScript)(_aurEff, _mode);
992 (auraScript->*pEffectHandlerScript)(aurEff, dmgInfo, absorbAmount);
1003 (auraScript->*pEffectHandlerScript)(aurEff, dmgInfo, absorbAmount);
1014 (auraScript->*pEffectHandlerScript)(aurEff, dmgInfo, splitAmount);
1019 _HandlerScript = handlerScript;
1024 return (auraScript->*_HandlerScript)(eventInfo);
1035 return (auraScript->*_HandlerScript)(aurEff, eventInfo);
1040 _HandlerScript = handlerScript;
1045 (auraScript->*_HandlerScript)(eventInfo);
1056 (auraScript->*_EffectHandlerScript)(aurEff, eventInfo);
1105 ABORT_MSG(
"AuraScript::_IsDefaultActionPrevented is called in a wrong place");
#define MAX_SPELL_EFFECTS
#define TC_LOG_ERROR(filterType__,...)
#define EFFECT_FIRST_FOUND
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
@ SPELL_EFFECT_APPLY_AURA
@ SPELL_AURA_SPLIT_DAMAGE_PCT
@ SPELL_AURA_SCHOOL_ABSORB
@ TARGET_SELECT_CATEGORY_CONE
@ TARGET_SELECT_CATEGORY_AREA
@ TARGET_SELECT_CATEGORY_DEFAULT
@ TARGET_SELECT_CATEGORY_NEARBY
@ TARGET_SELECT_CATEGORY_CHANNEL
@ TARGET_OBJECT_TYPE_DEST
@ TARGET_REFERENCE_TYPE_TARGET
@ TARGET_REFERENCE_TYPE_CASTER
@ AURA_SCRIPT_HOOK_CHECK_EFFECT_PROC
@ 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_EFFECT_MANASHIELD
@ AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB
@ 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_CHECK_PROC
@ SPELL_SCRIPT_STATE_NONE
@ SPELL_SCRIPT_STATE_LOADING
@ SPELL_SCRIPT_STATE_UNLOADING
@ SPELL_SCRIPT_STATE_REGISTRATION
#define HOOK_SPELL_HIT_START
#define HOOK_SPELL_HIT_END
@ SPELL_SCRIPT_HOOK_AFTER_CAST
@ SPELL_SCRIPT_HOOK_AFTER_HIT
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH
@ SPELL_SCRIPT_HOOK_BEFORE_HIT
@ SPELL_SCRIPT_HOOK_CHECK_CAST
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH_TARGET
@ SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET
@ SPELL_SCRIPT_HOOK_ON_CAST
void Call(AuraScript *auraScript, DispelInfo *dispelInfo)
AuraDispelHandler(AuraDispelFnType pHandlerScript)
AuraProcHandler(AuraProcFnType handlerScript)
void Call(AuraScript *auraScript, ProcEventInfo &eventInfo)
CheckAreaTargetHandler(AuraCheckAreaTargetFnType pHandlerScript)
AuraCheckAreaTargetFnType pHandlerScript
bool Call(AuraScript *auraScript, Unit *target)
AuraCheckEffectProcFnType _HandlerScript
CheckEffectProcHandler(AuraCheckEffectProcFnType handlerScript, uint8 effIndex, uint16 effName)
bool Call(AuraScript *auraScript, AuraEffect const *aurEff, ProcEventInfo &eventInfo)
CheckProcHandler(AuraCheckProcFnType handlerScript)
bool Call(AuraScript *auraScript, ProcEventInfo &eventInfo)
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) override
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)
bool _defaultActionPrevented
uint8 _currentScriptState
AuraApplication const * _auraApplication
HookList< EffectManaShieldHandler > AfterEffectManaShield
void PreventDefaultAction()
AuraObjectType GetType() const
void _PrepareScriptCall(AuraScriptHookType hookType, AuraApplication const *aurApp=nullptr)
void SetMaxDuration(int32 duration)
HookList< EffectCalcPeriodicHandler > DoEffectCalcPeriodic
AuraApplication const * GetTargetApplication() const
int32 GetDuration() const
HookList< EffectApplyHandler > AfterEffectRemove
AuraApplication const * m_auraApplication
HookList< CheckEffectProcHandler > DoCheckEffectProc
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
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
HookList< EffectCalcSpellModHandler > DoEffectCalcSpellMod
void SetDuration(int32 duration, bool withMods=false)
bool DropCharge(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
SpellEffectInfo const & GetEffectInfo(SpellEffIndex effIndex) const
HookList< EffectManaShieldHandler > OnEffectManaShield
AuraEffect * GetEffect(uint8 effIndex) const
bool HasEffectType(AuraType type) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
bool _Validate(SpellInfo const *entry) override
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
ObjectGuid GetCasterGUID() const
bool IsDeathPersistent() const
bool _IsDefaultActionPrevented()
GameObject * GetGObjCaster() const
HookList< AuraProcHandler > AfterProc
HookList< AuraDispelHandler > OnDispel
HookList< CheckProcHandler > DoCheckProc
HookList< EffectApplyHandler > OnEffectRemove
HookList< AuraDispelHandler > AfterDispel
void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
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)
int32 GetMaxDuration() const
void SetStackAmount(uint8 num)
Unit * GetUnitOwner() const
void RefreshDuration(bool withMods=false)
DynamicObject * GetDynobjOwner() const
ObjectGuid GetCasterGUID() const
bool HasEffect(uint8 effIndex) const
WorldObject * GetOwner() const
bool ModCharges(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
int32 GetDuration() const
bool IsDeathPersistent() const
bool HasEffectType(AuraType type) const
AuraEffect * GetEffect(uint8 effIndex) const
uint8 CalcMaxCharges(Unit *caster) const
void SetCharges(uint8 charges)
bool ModStackAmount(int32 num, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, bool resetPeriodicTimer=true)
int32 CalcMaxDuration() const
void SetDuration(int32 duration, bool withMods=false)
AuraObjectType GetType() const
uint8 GetStackAmount() const
SpellInfo const * GetSpellInfo() const
void SetMaxDuration(int32 duration)
time_t GetApplyTime() const
virtual void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)=0
bool DropCharge(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static GameObject * ToGameObject(Object *o)
static Player * ToPlayer(Object *o)
WorldObject * GetObjectTarget() const
GameObject * GetGOTarget() const
void SetDst(float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
Item * GetItemTarget() const
Unit * GetUnitTarget() const
WorldLocation const * GetDstPos() const
SpellImplicitTargetInfo TargetA
SpellImplicitTargetInfo TargetB
SpellTargetReferenceTypes GetReferenceType() const
SpellTargetSelectionCategories GetSelectionCategory() const
SpellTargetObjectTypes GetObjectType() const
Targets GetTarget() const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
bool HasAreaAuraEffect() const
bool HasEffect(SpellEffects effect) const
BeforeHitHandler(SpellBeforeHitFnType pBeforeHitHandlerScript)
void Call(SpellScript *spellScript, SpellMissInfo missInfo)
CastHandler(SpellCastFnType _pCastHandlerScript)
void Call(SpellScript *spellScript)
SpellCastResult Call(SpellScript *spellScript)
CheckCastHandler(SpellCheckCastFnType checkCastHandlerScript)
void Call(SpellScript *spellScript, SpellDestination &target)
SpellDestinationTargetSelectFnType DestinationTargetSelectHandlerScript
DestinationTargetSelectHandler(SpellDestinationTargetSelectFnType _DestinationTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType)
void Call(SpellScript *spellScript, SpellEffIndex effIndex)
SpellEffectFnType pEffectHandlerScript
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex) override
EffectHandler(SpellEffectFnType _pEffectHandlerScript, uint8 _effIndex, uint16 _effName)
void Call(SpellScript *spellScript)
HitHandler(SpellHitFnType _pHitHandlerScript)
SpellObjectAreaTargetSelectFnType pObjectAreaTargetSelectHandlerScript
void Call(SpellScript *spellScript, std::list< WorldObject * > &targets)
ObjectAreaTargetSelectHandler(SpellObjectAreaTargetSelectFnType _pObjectAreaTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType)
SpellObjectTargetSelectFnType pObjectTargetSelectHandlerScript
void Call(SpellScript *spellScript, WorldObject *&target)
ObjectTargetSelectHandler(SpellObjectTargetSelectFnType _pObjectTargetSelectHandlerScript, uint8 _effIndex, uint16 _targetType)
void Call(SpellScript *spellScript, DamageInfo const &damageInfo, uint32 &resistAmount, int32 &absorbAmount)
OnCalculateResistAbsorbHandler(SpellOnResistAbsorbCalculateFnType _pOnCalculateResistAbsorbHandlerScript)
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex) override
TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area, bool _dest)
WorldLocation * GetHitDest() const
Creature * GetHitCreature() const
Player * GetHitPlayer() const
void SetEffectValue(int32 value)
int32 GetHitDamage() const
void SetExplTargetDest(WorldLocation &loc)
bool IsInEffectHook() const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
bool IsInTargetHook() const
bool IsAfterTargetSelectionPhase() const
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
SpellInfo const * GetTriggeringSpell() const
Unit * GetHitUnit() const
SpellValue const * GetSpellValue() const
bool IsInHitPhase() const
uint8 m_hitPreventEffectMask
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Corpse * GetHitCorpse() const
void PreventHitEffect(SpellEffIndex effIndex)
Item * GetCastItem() const
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
bool _Validate(SpellInfo const *entry) override
Aura * GetHitAura(bool dynObjAura=false) const
void SetCustomCastResultMessage(SpellCustomErrors result)
WorldObject * GetExplTargetWorldObject() const
HookList< EffectHandler > OnEffectLaunchTarget
Item * GetHitItem() const
int64 GetItemTargetCountForEffect(SpellEffIndex effect) const
uint8 m_hitPreventDefaultEffectMask
void SetHitDamage(int32 damage)
HookList< EffectHandler > OnEffectSuccessfulDispel
void CreateItem(uint32 itemId)
WorldLocation const * GetExplTargetDest() const
bool IsInCheckCastHook() const
HookList< EffectHandler > OnEffectLaunch
void SetHitHeal(int32 heal)
GameObject * GetExplTargetGObj() const
GameObject * GetGObjCaster() const
Item * GetExplTargetItem() const
bool IsInModifiableHook() const
Unit * GetExplTargetUnit() const
int64 GetGameObjectTargetCountForEffect(SpellEffIndex effect) const
void _PrepareScriptCall(SpellScriptHookType hookType)
SpellInfo const * GetSpellInfo() const
void FinishCast(SpellCastResult result, uint32 *param1=nullptr, uint32 *param2=nullptr)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetOriginalCaster() const
GameObject * GetHitGObj() const
SpellInfo const * GetSpellInfo() const
GameObject * gameObjTarget
SpellCastTargets m_targets
int64 GetItemTargetCountForEffect(SpellEffIndex effect) const
void DoCreateItem(uint32 itemId)
int64 GetGameObjectTargetCountForEffect(SpellEffIndex effect) const
SpellCustomErrors m_customError
SpellEffectInfo const * effectInfo
SpellInfo const * m_triggeredByAuraSpell
WorldObject * GetCaster() const
Unit * GetOriginalCaster() const
WorldLocation * destTarget
SpellValue *const m_spellValue
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
void finish(bool ok=true)
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, uint32 *param1=nullptr, uint32 *param2=nullptr)
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()
bool Check(SpellInfo const *spellInfo, uint8 effIndex)
std::string const * m_scriptName
uint8 m_currentScriptState
static bool _ValidateSpellInfo(Iterator begin, Iterator end)
virtual bool Validate(SpellInfo const *)
virtual void Register()=0
std::string const * _GetScriptName() const
void _Init(std::string const *scriptname, uint32 spellId)
virtual bool _Validate(SpellInfo const *entry)