Skip to content

Commit

Permalink
Core/Scripts: updated more documentation comments for spell script ho…
Browse files Browse the repository at this point in the history
…oks to match with the rest

(cherry picked from commit 71ec8c9)
  • Loading branch information
Ovahlord committed Feb 22, 2025
1 parent 72ec1ae commit da07737
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions src/server/game/Spells/SpellScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ class TC_GAME_API SpellScript : public SpellScriptBase
#define SpellCalcDamageFn(F) DamageAndHealingCalcHandler(&F)

// example: CalcHealing += SpellCalcHealingFn(class::function);
// where function is void function(SpellEffectInfo const& spellEffectInfo, Unit* victim, int32& healing, int32& flatMod, float& pctMod)
// where function is void function(SpellEffectInfo const& effectInfo, Unit* victim, int32& healing, int32& flatMod, float& pctMod)
HookList<DamageAndHealingCalcHandler> CalcHealing;
#define SpellCalcHealingFn(F) DamageAndHealingCalcHandler(&F)

Expand Down Expand Up @@ -2114,113 +2114,113 @@ class TC_GAME_API AuraScript : public SpellScriptBase
//
// executed when area aura checks if it can be applied on target
// example: OnEffectApply += AuraEffectApplyFn(class::function);
// where function is: bool function (Unit* target);
// where function is: bool function(Unit* target);
HookList<CheckAreaTargetHandler> DoCheckAreaTarget;
#define AuraCheckAreaTargetFn(F) CheckAreaTargetHandler(&F)

// executed when aura is dispelled by a unit
// example: OnDispel += AuraDispelFn(class::function);
// where function is: void function (DispelInfo* dispelInfo);
// where function is: void function(DispelInfo* dispelInfo);
HookList<AuraDispelHandler> OnDispel;
// executed after aura is dispelled by a unit
// example: AfterDispel += AuraDispelFn(class::function);
// where function is: void function (DispelInfo* dispelInfo);
// where function is: void function(DispelInfo* dispelInfo);
HookList<AuraDispelHandler> AfterDispel;
#define AuraDispelFn(F) AuraDispelHandler(&F)

// executed on every heartbeat of a unit
// example: OnHeartbeat += AuraHeartbeatFn(class::function);
// where function is: void function ();
// where function is: void function();
HookList<AuraHeartbeatHandler> OnHeartbeat;
#define AuraHeartbeatFn(F) AuraHeartbeatHandler(&F)

// executed when aura effect is applied with specified mode to target
// should be used when when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe
// example: OnEffectApply += AuraEffectApplyFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes);
// where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode);
// where function is: void function(AuraEffect const* aurEff, AuraEffectHandleModes mode);
HookList<EffectApplyHandler> OnEffectApply;
// executed after aura effect is applied with specified mode to target
// example: AfterEffectApply += AuraEffectApplyFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes);
// where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode);
// where function is: void function(AuraEffect const* aurEff, AuraEffectHandleModes mode);
HookList<EffectApplyHandler> AfterEffectApply;
#define AuraEffectApplyFn(F, I, N, M) EffectApplyHandler(&F, I, N, M)

// executed after aura effect is removed with specified mode from target
// should be used when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe
// example: OnEffectRemove += AuraEffectRemoveFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes);
// where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode);
// where function is: void function(AuraEffect const* aurEff, AuraEffectHandleModes mode);
HookList<EffectApplyHandler> OnEffectRemove;
// executed when aura effect is removed with specified mode from target
// example: AfterEffectRemove += AuraEffectRemoveFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes);
// where function is: void function (AuraEffect const* aurEff, AuraEffectHandleModes mode);
// where function is: void function(AuraEffect const* aurEff, AuraEffectHandleModes mode);
HookList<EffectApplyHandler> AfterEffectRemove;
#define AuraEffectRemoveFn(F, I, N, M) EffectApplyHandler(&F, I, N, M)

// executed when periodic aura effect ticks on target
// example: OnEffectPeriodic += AuraEffectPeriodicFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect const* aurEff);
// where function is: void function(AuraEffect const* aurEff);
HookList<EffectPeriodicHandler> OnEffectPeriodic;
#define AuraEffectPeriodicFn(F, I, N) EffectPeriodicHandler(&F, I, N)

// executed when periodic aura effect is updated
// example: OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect* aurEff);
// where function is: void function(AuraEffect* aurEff);
HookList<EffectUpdatePeriodicHandler> OnEffectUpdatePeriodic;
#define AuraEffectUpdatePeriodicFn(F, I, N) EffectUpdatePeriodicHandler(&F, I, N)

// executed when aura effect calculates amount
// example: DoEffectCalcAmount += AuraEffectCalcAmounFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect* aurEff, int32& amount, bool& canBeRecalculated);
// where function is: void function(AuraEffect* aurEff, int32& amount, bool& canBeRecalculated);
HookList<EffectCalcAmountHandler> DoEffectCalcAmount;
#define AuraEffectCalcAmountFn(F, I, N) EffectCalcAmountHandler(&F, I, N)

// executed when aura effect calculates periodic data
// example: DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect const* aurEff, bool& isPeriodic, int32& amplitude);
// where function is: void function(AuraEffect const* aurEff, bool& isPeriodic, int32& amplitude);
HookList<EffectCalcPeriodicHandler> DoEffectCalcPeriodic;
#define AuraEffectCalcPeriodicFn(F, I, N) EffectCalcPeriodicHandler(&F, I, N)

// executed when aura effect calculates spellmod
// example: DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect const* aurEff, SpellModifier*& spellMod);
// where function is: void function(AuraEffect const* aurEff, SpellModifier*& spellMod);
HookList<EffectCalcSpellModHandler> DoEffectCalcSpellMod;
#define AuraEffectCalcSpellModFn(F, I, N) EffectCalcSpellModHandler(&F, I, N)

// executed when aura effect calculates crit chance for dots and hots
// example: DoEffectCalcCritChance += AuraEffectCalcCritChanceFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect const* aurEff, Unit* victim, float& critChance);
// where function is: void function(AuraEffect const* aurEff, Unit* victim, float& critChance);
HookList<EffectCalcCritChanceHandler> DoEffectCalcCritChance;
#define AuraEffectCalcCritChanceFn(F, I, N) EffectCalcCritChanceHandler(&F, I, N)

// executed when aura effect calculates damage or healing for dots and hots
// example: DoEffectCalcDamageAndHealing += AuraEffectCalcDamageFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// example: DoEffectCalcDamageAndHealing += AuraEffectCalcHealingFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect const* aurEff, Unit* victim, int32& damageOrHealing, int32& flatMod, float& pctMod);
// where function is: void function(AuraEffect const* aurEff, Unit* victim, int32& damageOrHealing, int32& flatMod, float& pctMod);
HookList<EffectCalcDamageAndHealingHandler> DoEffectCalcDamageAndHealing;
#define AuraEffectCalcDamageFn(F, I, N) EffectCalcDamageAndHealingHandler(&F, I, N)
#define AuraEffectCalcHealingFn(F, I, N) EffectCalcDamageAndHealingHandler(&F, I, N)

// executed when absorb aura effect is going to reduce damage
// example: OnEffectAbsorb += AuraEffectAbsorbFn(class::function, EffectIndexSpecifier);
// where function is: void function (AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount);
// where function is: void function(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount);
HookList<EffectAbsorbHandler> OnEffectAbsorb;
#define AuraEffectAbsorbFn(F, I) EffectAbsorbHandler(&F, I, SPELL_AURA_SCHOOL_ABSORB)
#define AuraEffectAbsorbOverkillFn(F, I) EffectAbsorbHandler(&F, I, SPELL_AURA_SCHOOL_ABSORB_OVERKILL)

// executed after absorb aura effect reduced damage to target - absorbAmount is real amount absorbed by aura
// example: AfterEffectAbsorb += AuraEffectAbsorbFn(class::function, EffectIndexSpecifier);
// where function is: void function (AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount);
// where function is: void function(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount);
HookList<EffectAbsorbHandler> AfterEffectAbsorb;

// executed when absorb aura effect is going to reduce damage
// example: OnEffectAbsorbHeal += AuraEffectAbsorbHealFn(class::function, EffectIndexSpecifier);
// where function is: void function (AuraEffect const* aurEff, HealInfo& healInfo, uint32& absorbAmount);
// where function is: void function(AuraEffect const* aurEff, HealInfo& healInfo, uint32& absorbAmount);
HookList<EffectAbsorbHealHandler> OnEffectAbsorbHeal;
#define AuraEffectAbsorbHealFn(F, I) EffectAbsorbHealHandler(&F, I, SPELL_AURA_SCHOOL_HEAL_ABSORB)

// executed after absorb aura effect reduced heal to target - absorbAmount is real amount absorbed by aura
// example: AfterEffectAbsorbHeal += AuraEffectAbsorbHealFn(class::function, EffectIndexSpecifier);
// where function is: void function (AuraEffect* aurEff, HealInfo& healInfo, uint32& absorbAmount);
// where function is: void function(AuraEffect* aurEff, HealInfo& healInfo, uint32& absorbAmount);
HookList<EffectAbsorbHealHandler> AfterEffectAbsorbHeal;

// executed when mana shield aura effect is going to reduce damage
Expand All @@ -2231,48 +2231,48 @@ class TC_GAME_API AuraScript : public SpellScriptBase

// executed after mana shield aura effect reduced damage to target - absorbAmount is real amount absorbed by aura
// example: AfterEffectManaShield += AuraEffectManaShieldFn(class::function, EffectIndexSpecifier);
// where function is: void function (AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount);
// where function is: void function(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount);
HookList<EffectAbsorbHandler> AfterEffectManaShield;

// executed when the caster of some spell with split dmg aura gets damaged through it
// example: OnEffectSplit += AuraEffectSplitFn(class::function, EffectIndexSpecifier);
// where function is: void function (AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& splitAmount);
// where function is: void function(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& splitAmount);
HookList<EffectAbsorbHandler> OnEffectSplit;
#define AuraEffectSplitFn(F, I) EffectAbsorbHandler(&F, I, SPELL_AURA_SPLIT_DAMAGE_PCT)

// executed when aura checks if it can proc
// example: DoCheckProc += AuraCheckProcFn(class::function);
// where function is: bool function (ProcEventInfo& eventInfo);
// where function is: bool function(ProcEventInfo& eventInfo);
HookList<CheckProcHandler> DoCheckProc;
#define AuraCheckProcFn(F) CheckProcHandler(&F)

// executed when aura effect checks if it can proc the aura
// example: DoCheckEffectProc += AuraCheckEffectProcFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is bool function (AuraEffect const* aurEff, ProcEventInfo& eventInfo);
// where function is bool function(AuraEffect const* aurEff, ProcEventInfo& eventInfo);
HookList<CheckEffectProcHandler> DoCheckEffectProc;
#define AuraCheckEffectProcFn(F, I, N) CheckEffectProcHandler(&F, I, N)

// executed before aura procs (possibility to prevent charge drop/cooldown)
// example: DoPrepareProc += AuraProcFn(class::function);
// where function is: void function (ProcEventInfo& eventInfo);
// where function is: void function(ProcEventInfo& eventInfo);
HookList<AuraProcHandler> DoPrepareProc;
// executed when aura procs
// example: OnProc += AuraProcFn(class::function);
// where function is: void function (ProcEventInfo& eventInfo);
// where function is: void function(ProcEventInfo& eventInfo);
HookList<AuraProcHandler> OnProc;
// executed after aura proced
// example: AfterProc += AuraProcFn(class::function);
// where function is: void function (ProcEventInfo& eventInfo);
// where function is: void function(ProcEventInfo& eventInfo);
HookList<AuraProcHandler> AfterProc;
#define AuraProcFn(F) AuraProcHandler(&F)

// executed when aura effect procs
// example: OnEffectProc += AuraEffectProcFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect* aurEff, ProcEventInfo& procInfo);
// where function is: void function(AuraEffect* aurEff, ProcEventInfo& procInfo);
HookList<EffectProcHandler> OnEffectProc;
// executed after aura effect proced
// example: AfterEffectProc += AuraEffectProcFn(class::function, EffectIndexSpecifier, EffectAuraNameSpecifier);
// where function is: void function (AuraEffect* aurEff, ProcEventInfo& procInfo);
// where function is: void function(AuraEffect* aurEff, ProcEventInfo& procInfo);
HookList<EffectProcHandler> AfterEffectProc;
#define AuraEffectProcFn(F, I, N) EffectProcHandler(&F, I, N)

Expand Down

0 comments on commit da07737

Please sign in to comment.