Skip to content

Commit

Permalink
Spell: Add missing comment naming to all existing class spell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Oct 1, 2023
1 parent b89fa37 commit 401bc13
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 7 deletions.
6 changes: 3 additions & 3 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(28238,'spell_gluth_zombie_search_heal'),
(28265,'spell_scourge_strike'),
(28374,'spell_gluth_decimate'),
(28376,'spell_shadowguard'),
(28408,'spell_chains_kel_thuzad'),
(28415,'spell_trigger_KT_add'),
(28416,'spell_trigger_KT_add'),
Expand Down Expand Up @@ -661,6 +660,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(15324,'spell_blackout'),
(15325,'spell_blackout'),
(15326,'spell_blackout'),
(28376,'spell_shadowguard'),
(17,'spell_power_word_shield_priest'),
(592,'spell_power_word_shield_priest'),
(600,'spell_power_word_shield_priest'),
Expand All @@ -674,6 +674,8 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(25217,'spell_power_word_shield_priest'),
(25218,'spell_power_word_shield_priest'),
(27827,'spell_spirit_of_redemption_heal'),
(32379,'spell_shadow_word_death'),
(32996,'spell_shadow_word_death'),
(32676,'spell_consume_magic'),
(33076,'spell_prayer_of_mending'),
(33206,'spell_pain_suppression'),
Expand Down Expand Up @@ -750,8 +752,6 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(30108,'spell_unstable_affliction'),
(30404,'spell_unstable_affliction'),
(30405,'spell_unstable_affliction'),
(32379,'spell_shadow_word_death'),
(32996,'spell_shadow_word_death'),
(19505,'spell_devour_magic'),
(19731,'spell_devour_magic'),
(19734,'spell_devour_magic'),
Expand Down
4 changes: 4 additions & 0 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Druid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enum
SPELL_BLESSING_OF_THE_CLAW = 28750,
};

// 8936 - Regrowth
struct Regrowth : public AuraScript
{
void OnPeriodicTickEnd(Aura* aura) const override
Expand All @@ -35,6 +36,7 @@ struct Regrowth : public AuraScript
}
};

// 1178 - Bear Form, 3025 - Cat Form, 9635 - Dire Bear Form, 24905 - Moonkin Form
struct FormScalingAttackPowerAuras : public AuraScript
{
int32 OnAuraValueCalculate(AuraCalcData& data, int32 value) const override
Expand All @@ -56,6 +58,7 @@ struct FormScalingAttackPowerAuras : public AuraScript
}
};

// 33831 - Force of Nature
struct ForceOfNatureSummon : public SpellScript, public AuraScript
{
void OnSummon(Spell* /*spell*/, Creature* summon) const override
Expand All @@ -75,6 +78,7 @@ struct ForceOfNatureSummon : public SpellScript, public AuraScript
}
};

// 41929 - Guardian Aggro Spell
struct GuardianAggroSpell : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
Expand Down
4 changes: 4 additions & 0 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Hunter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "Spells/Scripts/SpellScript.h"
#include "Spells/SpellAuras.h"

// 1130 - Hunter's Mark
struct HuntersMark : public AuraScript
{
int32 OnAuraValueCalculate(AuraCalcData& data, int32 value) const override
Expand Down Expand Up @@ -68,6 +69,7 @@ struct HuntersMark : public AuraScript
}
};

// 34026 - Kill Command
struct KillCommand : public SpellScript
{
void OnHit(Spell* spell, SpellMissInfo /*missInfo*/) const override
Expand Down Expand Up @@ -101,6 +103,7 @@ struct KillCommand : public SpellScript
}
};

// 34477 - Misdirection
struct Misdirection : public SpellScript
{
SpellCastResult OnCheckCast(Spell* spell, bool/* strict*/) const override
Expand All @@ -119,6 +122,7 @@ struct Misdirection : public SpellScript
}
};

// 34501 - Expose Weakness
struct ExposeWeakness : public AuraScript
{
int32 OnAuraValueCalculate(AuraCalcData& data, int32 value) const override
Expand Down
10 changes: 7 additions & 3 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Paladin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ struct JudgementOfWisdomIntermediate : public SpellScript
}
};

// 20271 - Judgement
struct spell_judgement : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override
Expand Down Expand Up @@ -146,13 +147,14 @@ struct spell_judgement : public SpellScript
if (caster->HasAura(37188)) // improved judgement
caster->CastSpell(nullptr, 43838, TRIGGERED_OLD_TRIGGERED);

if (caster->HasAura(40470)) // spell_paladin_tier_6_trinket
if (caster->HasAura(40470)) // PaladinTier6Trinket
if (roll_chance_f(50.f))
caster->CastSpell(unitTarget, 40472, TRIGGERED_OLD_TRIGGERED);
}
};

struct spell_paladin_tier_6_trinket : public AuraScript
// 40470 - Paladin Tier 6 Trinket
struct PaladinTier6Trinket : public AuraScript
{
SpellAuraProcResult OnProc(Aura* /*aura*/, ProcExecutionData& procData) const override
{
Expand All @@ -176,6 +178,7 @@ struct spell_paladin_tier_6_trinket : public AuraScript
}
};

// 31789 - Righteous Defense
struct RighteousDefense : public SpellScript
{
bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex /*eff*/) const override
Expand Down Expand Up @@ -226,6 +229,7 @@ enum
SPELL_SEAL_OF_BLOOD_SELF_DAMAGE = 32221
};

// 31893 - Seal of Blood, 31898 - Judgement of Blood
struct SealOfBloodSelfDamage : public SpellScript
{
void OnAfterHit(Spell* spell) const override
Expand Down Expand Up @@ -265,6 +269,6 @@ void LoadPaladinScripts()
RegisterSpellScript<RighteousDefense>("spell_righteous_defense");
RegisterSpellScript<SealOfTheCrusader>("spell_seal_of_the_crusader");
RegisterSpellScript<SealOfBloodSelfDamage>("spell_seal_of_blood_self_damage");
RegisterSpellScript<spell_paladin_tier_6_trinket>("spell_paladin_tier_6_trinket");
RegisterSpellScript<PaladinTier6Trinket>("PaladinTier6Trinket");
RegisterSpellScript<BlessingOfLight>("spell_blessing_of_light");
}
9 changes: 9 additions & 0 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Priest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "Spells/SpellAuras.h"
#include "Spells/SpellMgr.h"

// 27827 - Spirit of Redemption
struct SpiritOfRedemptionHeal : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
Expand All @@ -34,6 +35,7 @@ enum
SPELL_PLAYER_CONSUME_MAGIC = 32676,
};

// 32676 - Consume Magic
struct ConsumeMagic : public SpellScript
{
SpellCastResult OnCheckCast(Spell* spell, bool strict) const override
Expand Down Expand Up @@ -68,6 +70,7 @@ struct ConsumeMagic : public SpellScript
}
};

// 10060 - Power Infusion
struct PowerInfusion : public SpellScript
{
SpellCastResult OnCheckCast(Spell* spell, bool/* strict*/) const override
Expand All @@ -82,6 +85,7 @@ struct PowerInfusion : public SpellScript
}
};

// 32379 - Shadow Word: Death
struct ShadowWordDeath : public SpellScript
{
void OnHit(Spell* spell, SpellMissInfo /*missInfo*/) const override
Expand All @@ -92,6 +96,7 @@ struct ShadowWordDeath : public SpellScript
}
};

// 15268 - Blackout
struct Blackout : public AuraScript
{
bool OnCheckProc(Aura* /*aura*/, ProcExecutionData& data) const override
Expand All @@ -102,6 +107,7 @@ struct Blackout : public AuraScript
}
};

// 28376 - Shadowguard
struct Shadowguard : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex /*effIdx*/) const override
Expand Down Expand Up @@ -132,6 +138,7 @@ enum
MANA_LEECH_PASSIVE = 28305,
};

// 34433 - Shadowfiend
struct Shadowfiend : public SpellScript
{
void OnSummon(Spell* spell, Creature* summon) const override
Expand All @@ -141,6 +148,7 @@ struct Shadowfiend : public SpellScript
}
};

// 33076 - Prayer of Mending
struct PrayerOfMending : public SpellScript
{
// not needed in wotlk
Expand Down Expand Up @@ -178,6 +186,7 @@ enum
SPELL_PAIN_SUPPRESSION_THREAT_REDUCTION = 44416,
};

// 33206 - Pain Suppression
struct PainSuppression : public AuraScript
{
void OnApply(Aura* aura, bool apply) const override
Expand Down
2 changes: 1 addition & 1 deletion src/game/Spells/Scripts/Scripting/ClassScripts/Rogue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ enum
};

// Warning: Also currently used by Prowl
// 1784 - Stealth
// 1784 - Stealth, 5215 - Prowl
struct Stealth : public AuraScript
{
bool OnCheckProc(Aura* /*aura*/, ProcExecutionData& data) const override // per 1.12.0 patch notes - no other indication of how it works
Expand Down
2 changes: 2 additions & 0 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Shaman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "AI/BaseAI/TotemAI.h"
#include "AI/ScriptDevAI/ScriptDevAIMgr.h"

// 6495 - Sentry Totem
struct SentryTotem : public SpellScript, public AuraScript
{
void OnRadiusCalculate(Spell* /*spell*/, SpellEffectIndex effIdx, bool targetB, float& radius) const override
Expand Down Expand Up @@ -88,6 +89,7 @@ struct SentryTotemAI : public TotemAI
}
};

// 974 - Earth Shield
struct EarthShield : public AuraScript
{
int32 OnAuraValueCalculate(AuraCalcData& data, int32 value) const override
Expand Down
13 changes: 13 additions & 0 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Warlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ void RemoveShadowEmbraceIfNecessary(Aura* aura)
}
}

// 30108 - Unstable Affliction
struct UnstableAffliction : public AuraScript
{
void OnDispel(SpellAuraHolder* holder, Unit* dispeller, uint32 /*dispellingSpellId*/, uint32 /*originalStacks*/) const override
Expand All @@ -72,6 +73,7 @@ struct UnstableAffliction : public AuraScript
}
};

// 980 - Curse of Agony
struct CurseOfAgony : public AuraScript
{
void OnPeriodicCalculateAmount(Aura* aura, uint32& amount) const override
Expand All @@ -92,6 +94,7 @@ struct CurseOfAgony : public AuraScript
}
};

// 1454 - Life Tap
struct LifeTap : public SpellScript
{
void OnInit(Spell* spell) const override
Expand Down Expand Up @@ -227,6 +230,7 @@ struct CreateHealthStoneWarlock : public SpellScript
}
};

// 35696 - Demonic Knowledge
struct DemonicKnowledge : public AuraScript
{
int32 OnAuraValueCalculate(AuraCalcData& data, int32 value) const override
Expand All @@ -244,6 +248,7 @@ struct DemonicKnowledge : public AuraScript
}
};

// 25228 - Soul Link
struct SoulLink : public AuraScript
{
void OnAuraInit(Aura* aura) const override
Expand All @@ -253,6 +258,7 @@ struct SoulLink : public AuraScript
}
};

// 18265 - Siphon Life
struct SiphonLife : public AuraScript
{
void OnApply(Aura* aura, bool apply) const override
Expand All @@ -262,6 +268,7 @@ struct SiphonLife : public AuraScript
}
};

// 172 - Corruption
struct Corruption : public AuraScript
{
void OnApply(Aura* aura, bool apply) const override
Expand All @@ -271,6 +278,7 @@ struct Corruption : public AuraScript
}
};

// 126 - Eye of Kilrogg (Summon)
struct EyeOfKilrogg : public SpellScript
{
void OnSummon(Spell* /*spell*/, Creature* summon) const override
Expand All @@ -280,6 +288,7 @@ struct EyeOfKilrogg : public SpellScript
}
};

// 603 - Curse of Doom
struct CurseOfDoom : public SpellScript, public AuraScript
{
SpellCastResult OnCheckCast(Spell* spell, bool /*strict*/) const override
Expand All @@ -299,6 +308,7 @@ struct CurseOfDoom : public SpellScript, public AuraScript
}
};

// 18662 - Curse of Doom Effect
struct CurseOfDoomEffect : public SpellScript
{
void OnSummon(Spell* /*spell*/, Creature* summon) const override
Expand All @@ -307,6 +317,7 @@ struct CurseOfDoomEffect : public SpellScript
}
};

// 19505 - Devour Magic
struct DevourMagic : public SpellScript
{
SpellCastResult OnCheckCast(Spell* spell, bool /*strict*/) const override
Expand All @@ -332,6 +343,7 @@ enum
SPELL_SEED_DAMAGE = 27285,
};

// 27243 - Seed of Corruption
struct SeedOfCorruption : public AuraScript
{
void OnApply(Aura* aura, bool apply) const override
Expand Down Expand Up @@ -374,6 +386,7 @@ struct SeedOfCorruption : public AuraScript
}
};

// 27285 - Seed of Corruption
struct SeedOfCorruptionDamage : public SpellScript
{
bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex /*eff*/) const override
Expand Down
6 changes: 6 additions & 0 deletions src/game/Spells/Scripts/Scripting/ClassScripts/Warrior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "Spells/SpellAuras.h"
#include "Spells/SpellMgr.h"

// 5308 - Execute
struct WarriorExecute : public SpellScript
{
void OnCast(Spell* spell) const override // confirmed main spell can not hit and child still hits
Expand All @@ -30,6 +31,7 @@ struct WarriorExecute : public SpellScript
}
};

// 20647 - Execute
struct WarriorExecuteDamage : public SpellScript
{
void OnHit(Spell* spell, SpellMissInfo missInfo) const override
Expand All @@ -39,6 +41,7 @@ struct WarriorExecuteDamage : public SpellScript
}
};

// 34428 - Victory Rush
struct VictoryRush : public SpellScript
{
void OnCast(Spell* spell) const override
Expand All @@ -52,6 +55,7 @@ struct VictoryRush : public SpellScript
}
};

// 20243 - Devastate
struct Devastate : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
Expand Down Expand Up @@ -87,6 +91,7 @@ struct Devastate : public SpellScript
}
};

// 20230 - Retaliation
struct RetaliationWarrior : public AuraScript
{
SpellAuraProcResult OnProc(Aura* /*aura*/, ProcExecutionData& procData) const override
Expand All @@ -100,6 +105,7 @@ struct RetaliationWarrior : public AuraScript
}
};

// 29707 - Heroic Strike
struct HeroicStrike : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
Expand Down

0 comments on commit 401bc13

Please sign in to comment.