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);
48 TC_LOG_ERROR(
"scripts.spells",
"SpellScriptBase::ValidateSpellInfo: Spell {} does not exist.", spellId);
60 TC_LOG_ERROR(
"scripts.spells",
"SpellScriptBase::ValidateSpellEffect: Spell {} does not exist.", spellId);
64 if (spellInfo->
GetEffects().size() <= effectIndex)
66 TC_LOG_ERROR(
"scripts.spells",
"SpellScriptBase::ValidateSpellEffect: Spell {} does not have EFFECT_{}.", spellId,
uint32(effectIndex));
93#ifdef TRINITY_API_USE_DYNAMIC_LINKING
96 m_moduleReference =
sScriptMgr->AcquireModuleReferenceOfScriptName(scriptname);
125 if (CheckEffect(spellInfo, i))
131 if (CheckEffect(spellInfo, _effIndex))
132 mask |= 1 << _effIndex;
139 return (GetAffectedEffectsMask(spellInfo) & 1 << effIndex) != 0;
147 return "EFFECT_FIRST_FOUND";
150 return "Invalid Value";
175 if (spellInfo->
GetEffects().size() <= effIndex)
178 if (!spellEffectInfo.
Effect && !_effName)
180 if (!spellEffectInfo.
Effect)
186 :
EffectHook(effectIndex), _targetType(targetType), _area(area), _dest(dest) { }
202 if (spellInfo->
GetEffects().size() <= effIndex)
222 return _area || _dest;
260 if (!hook.GetAffectedEffectsMask(entry))
261 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, hook.ToString(),
m_scriptName);
264 if (!hook.GetAffectedEffectsMask(entry))
265 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, hook.ToString(),
m_scriptName);
268 if (!hook.GetAffectedEffectsMask(entry))
269 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, hook.ToString(),
m_scriptName);
272 if (!hook.GetAffectedEffectsMask(entry))
273 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, hook.ToString(),
m_scriptName);
276 if (!hook.GetAffectedEffectsMask(entry))
277 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, hook.ToString(),
m_scriptName);
280 if (!hook.GetAffectedEffectsMask(entry))
281 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, hook.ToString(),
m_scriptName);
284 if (!hook.GetAffectedEffectsMask(entry))
285 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, hook.ToString(),
m_scriptName);
288 if (!hook.GetAffectedEffectsMask(entry))
289 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, hook.ToString(),
m_scriptName);
300 TC_LOG_ERROR(
"scripts",
"Spell `{}` script `{}` does not have a damage effect - handler bound to hook `CalcDamage` of SpellScript won't be executed", entry->
Id,
m_scriptName);
309 TC_LOG_ERROR(
"scripts",
"Spell `{}` script `{}` does not have a damage effect - handler bound to hook `CalcHealing` of SpellScript won't be executed", entry->
Id,
m_scriptName);
463 TC_LOG_ERROR(
"scripts",
"Script: `{}` Spell: `{}`: function SpellScript::GetUnitTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
474 TC_LOG_ERROR(
"scripts",
"Script: `{}` Spell: `{}`: function SpellScript::GetGameObjectTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
485 TC_LOG_ERROR(
"scripts",
"Script: `{}` Spell: `{}`: function SpellScript::GetItemTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
496 TC_LOG_ERROR(
"scripts",
"Script: `{}` Spell: `{}`: function SpellScript::GetCorpseTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
628 return targetInfo.TargetGUID == hitUnit->GetGUID();
780 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);
784 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);
788 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);
791 if (!itr->GetAffectedEffectsMask(entry))
792 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);
795 if (!itr->GetAffectedEffectsMask(entry))
796 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);
799 if (!itr->GetAffectedEffectsMask(entry))
800 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);
803 if (!itr->GetAffectedEffectsMask(entry))
804 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);
807 if (!itr->GetAffectedEffectsMask(entry))
808 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);
811 if (!itr->GetAffectedEffectsMask(entry))
812 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);
815 if (!itr->GetAffectedEffectsMask(entry))
816 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);
819 if (!itr->GetAffectedEffectsMask(entry))
820 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);
823 if (!itr->GetAffectedEffectsMask(entry))
824 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);
827 if (!itr->GetAffectedEffectsMask(entry))
828 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcCritChance` of AuraScript won't be executed", entry->
Id, itr->ToString(),
m_scriptName);
831 if (!hook.GetAffectedEffectsMask(entry))
832 TC_LOG_ERROR(
"scripts",
"Spell `{}` Effect `{}` of script `{}` did not match dbc effect data - handler bound to hook `DoEffectCalcDamageAndHealing` of AuraScript won't be executed", entry->
Id, hook.ToString(),
m_scriptName);
835 if (!itr->GetAffectedEffectsMask(entry))
836 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);
839 if (!itr->GetAffectedEffectsMask(entry))
840 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);
843 if (!itr->GetAffectedEffectsMask(entry))
844 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);
847 if (!itr->GetAffectedEffectsMask(entry))
848 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);
851 if (!itr->GetAffectedEffectsMask(entry))
852 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);
856 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);
859 if (!itr->GetAffectedEffectsMask(entry))
860 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);
864 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);
866 for (
auto itr =
OnProc.begin(); itr !=
OnProc.end(); ++itr)
868 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);
872 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);
875 if (!itr->GetAffectedEffectsMask(entry))
876 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);
879 if (!itr->GetAffectedEffectsMask(entry))
880 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);
886 :
EffectHook(effIndex), _auraType(auraType) { }
894 if (spellInfo->
GetEffects().size() <= effIndex)
961 ABORT_MSG(
"AuraScript::_IsDefaultActionPrevented is called in a wrong place");
#define MAX_SPELL_EFFECTS
#define STRING_VIEW_FMT_ARG(str)
#define TC_LOG_ERROR(filterType__,...)
#define EFFECT_FIRST_FOUND
@ SPELL_EFFECT_HEALTH_LEECH
@ SPELL_EFFECT_WEAPON_DAMAGE
@ SPELL_EFFECT_NORMALIZED_WEAPON_DMG
@ SPELL_EFFECT_HEAL_MECHANICAL
@ SPELL_EFFECT_WEAPON_PERCENT_DAMAGE
@ SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL
@ SPELL_EFFECT_PERSISTENT_AREA_AURA
@ SPELL_EFFECT_POWER_DRAIN
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_APPLY_AURA
@ TARGET_SELECT_CATEGORY_CONE
@ TARGET_SELECT_CATEGORY_AREA
@ TARGET_SELECT_CATEGORY_DEFAULT
@ TARGET_SELECT_CATEGORY_NEARBY
@ TARGET_SELECT_CATEGORY_LINE
@ TARGET_SELECT_CATEGORY_CHANNEL
@ TARGET_OBJECT_TYPE_UNIT_AND_DEST
@ TARGET_OBJECT_TYPE_DEST
@ TARGET_REFERENCE_TYPE_TARGET
@ TARGET_REFERENCE_TYPE_CASTER
@ AURA_SCRIPT_HOOK_CHECK_EFFECT_PROC
@ AURA_SCRIPT_HOOK_EFFECT_CALC_DAMAGE_AND_HEALING
@ AURA_SCRIPT_HOOK_EFFECT_REMOVE
@ AURA_SCRIPT_HOOK_EFFECT_CALC_CRIT_CHANCE
@ 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
@ AURA_SCRIPT_HOOK_ENTER_LEAVE_COMBAT
@ 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_SUCCESSFUL_DISPEL
@ SPELL_SCRIPT_HOOK_CALC_HEALING
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH
@ SPELL_SCRIPT_HOOK_BEFORE_HIT
@ SPELL_SCRIPT_HOOK_CALC_DAMAGE
@ SPELL_SCRIPT_HOOK_CHECK_CAST
@ SPELL_SCRIPT_HOOK_EFFECT_LAUNCH_TARGET
@ SPELL_SCRIPT_HOOK_EFFECT_HIT_TARGET
@ SPELL_SCRIPT_HOOK_CALC_CRIT_CHANCE
@ SPELL_SCRIPT_HOOK_ON_CAST
std::string ToString() const
EffectBase & operator=(EffectBase const &right)=delete
EffectBase(uint8 effIndex, uint16 auraType)
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex) const override
bool _defaultActionPrevented
uint8 _currentScriptState
AuraApplication const * _auraApplication
HookList< EffectAbsorbHandler > OnEffectManaShield
HookList< EffectCalcDamageAndHealingHandler > DoEffectCalcDamageAndHealing
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
AuraEffect * GetEffect(uint8 effIndex) const
bool HasEffectType(AuraType type) const
HookList< EffectAbsorbHandler > OnEffectAbsorb
bool _Validate(SpellInfo const *entry) override
HookList< EffectCalcCritChanceHandler > DoEffectCalcCritChance
HookList< EffectAbsorbHandler > AfterEffectManaShield
HookList< CheckAreaTargetHandler > DoCheckAreaTarget
ObjectGuid GetCasterGUID() const
bool IsDeathPersistent() const
GameObject * GetGObjCaster() const
HookList< AuraProcHandler > AfterProc
HookList< AuraDispelHandler > OnDispel
Difficulty GetCastDifficulty() const
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
bool _IsDefaultActionPrevented() const
HookList< AuraProcHandler > OnProc
bool HasEffect(uint8 effIndex) const
uint8 GetStackAmount() const
HookList< EffectApplyHandler > OnEffectApply
DynamicObject * GetDynobjOwner() const
HookList< EffectAbsorbHandler > OnEffectSplit
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(uint32 index) 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)
Difficulty GetCastDifficulty() const
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
bool HasEffect(SpellEffectName effect) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
std::vector< SpellEffectInfo > const & GetEffects() const
bool HasAreaAuraEffect() const
bool IsEffectAffected(SpellInfo const *spellInfo, uint8 effIndex) const
EffectHook(uint8 effIndex)
uint32 GetAffectedEffectsMask(SpellInfo const *spellInfo) const
EffectHook & operator=(EffectHook const &right)=delete
std::string EffIndexToString() const
uint8 m_currentScriptState
void _Init(std::string const &scriptname, uint32 spellId)
virtual void Register()=0
virtual bool Validate(SpellInfo const *spellInfo)
std::string_view m_scriptName
static bool ValidateSpellInfoImpl(Iterator begin, Iterator end)
static bool ValidateSpellEffectImpl(uint32 spellId, SpellEffIndex effectIndex)
virtual ~SpellScriptBase()
std::string_view GetScriptName() const
virtual bool _Validate(SpellInfo const *entry)
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex) const override
EffectBase & operator=(EffectBase const &right)=delete
EffectBase(uint8 effIndex, uint16 effName)
std::string ToString() const
std::string ToString() const
bool CheckEffect(SpellInfo const *spellInfo, uint8 effIndex) const override
TargetHook(uint8 effectIndex, uint16 targetType, bool area, bool dest)
TargetHook & operator=(TargetHook const &right)=delete
HookList< DamageAndHealingCalcHandler > CalcDamage
WorldLocation * GetHitDest() const
Creature * GetHitCreature() const
Player * GetHitPlayer() const
void SetEffectValue(int32 value)
int32 GetHitDamage() const
int64 GetCorpseTargetCountForEffect(SpellEffIndex effect) const
bool IsInEffectHook() const
void SetEffectVariance(float variance)
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
void CreateItem(uint32 itemId, ItemContext context)
uint32 m_hitPreventDefaultEffectMask
bool IsInTargetHook() const
uint32 m_hitPreventEffectMask
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
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
void SetExplTargetDest(WorldLocation const &loc)
Aura * GetHitAura(bool dynObjAura=false) const
void SetCustomCastResultMessage(SpellCustomErrors result)
void FinishCast(SpellCastResult result, int32 *param1=nullptr, int32 *param2=nullptr)
WorldObject * GetExplTargetWorldObject() const
HookList< EffectHandler > OnEffectLaunchTarget
Item * GetHitItem() const
int64 GetItemTargetCountForEffect(SpellEffIndex effect) const
Difficulty GetCastDifficulty() const
void SetHitDamage(int32 damage)
HookList< EffectHandler > OnEffectSuccessfulDispel
WorldLocation const * GetExplTargetDest() const
bool IsInCheckCastHook() const
HookList< EffectHandler > OnEffectLaunch
void SetHitHeal(int32 heal)
HookList< DamageAndHealingCalcHandler > CalcHealing
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
float GetEffectVariance() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetOriginalCaster() const
GameObject * GetHitGObj() const
SpellInfo const * GetSpellInfo() const
GameObject * gameObjTarget
int64 GetCorpseTargetCountForEffect(SpellEffIndex effect) const
SpellCastTargets m_targets
Difficulty GetCastDifficulty() const
std::vector< TargetInfo > m_UniqueTargetInfo
int64 GetItemTargetCountForEffect(SpellEffIndex effect) const
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, SpellCastVisual spellVisual, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, int32 *param1=nullptr, int32 *param2=nullptr)
void DoCreateItem(uint32 itemId, ItemContext context=ItemContext::NONE, std::vector< int32 > const *bonusListIDs=nullptr)
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
void finish(SpellCastResult result=SPELL_CAST_OK)
int64 GetUnitTargetCountForEffect(SpellEffIndex effect) const
std::string StringFormat(FormatString< Args... > fmt, Args &&... args)
Default TC string format function.