aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2025_06_08_02_world.sql7
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp63
2 files changed, 47 insertions, 23 deletions
diff --git a/sql/updates/world/master/2025_06_08_02_world.sql b/sql/updates/world/master/2025_06_08_02_world.sql
new file mode 100644
index 00000000000..0f5ab5edab3
--- /dev/null
+++ b/sql/updates/world/master/2025_06_08_02_world.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_warr_enrage_proc', 'spell_warr_rampage_enrage');
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(184361, 'spell_warr_enrage_proc');
+
+DELETE FROM `spell_proc` WHERE `SpellId` IN (184361);
+INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
+(184361,0x00,4,0x00000000,0x00000400,0x00000000,0x08000000,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0,0,0,0); -- Enrage
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index fb652d0b197..7f87f53d3ad 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -340,6 +340,45 @@ class spell_warr_devastator : public AuraScript
}
};
+// 184361 - Enrage
+class spell_warr_enrage_proc : public AuraScript
+{
+ static bool CheckRampageProc(AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo)
+ {
+ SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
+ if (!spellInfo || !spellInfo->IsAffected(SPELLFAMILY_WARRIOR, { 0x0, 0x0, 0x0, 0x8000000 })) // Rampage
+ return false;
+
+ return true;
+ }
+
+ static bool CheckBloodthirstProc(AuraEffect const* aurEff, ProcEventInfo const& eventInfo)
+ {
+ SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
+ if (!spellInfo || !spellInfo->IsAffected(SPELLFAMILY_WARRIOR, { 0x0, 0x400 })) // Bloodthirst/Bloodbath
+ return false;
+
+ return roll_chance_i(aurEff->GetAmount());
+ }
+
+ void HandleProc(ProcEventInfo const& eventInfo)
+ {
+ PreventDefaultAction();
+
+ GetTarget()->CastSpell(nullptr, SPELL_WARRIOR_ENRAGE, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .TriggeringSpell = eventInfo.GetProcSpell()
+ });
+ }
+
+ void Register() override
+ {
+ DoCheckEffectProc += AuraCheckEffectProcFn(spell_warr_enrage_proc::CheckRampageProc, EFFECT_0, SPELL_AURA_DUMMY);
+ DoCheckEffectProc += AuraCheckEffectProcFn(spell_warr_enrage_proc::CheckBloodthirstProc, EFFECT_1, SPELL_AURA_DUMMY);
+ OnProc += AuraProcFn(spell_warr_enrage_proc::HandleProc);
+ }
+};
+
// 260798 - Execute (Arms, Protection)
class spell_warr_execute_damage : public SpellScript
{
@@ -702,28 +741,6 @@ class spell_warr_rallying_cry : public SpellScript
}
};
-// 184367 - Rampage (triggers enrage)
-class spell_warr_rampage_enrage : public SpellScript
-{
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- return ValidateSpellInfo({ SPELL_WARRIOR_ENRAGE });
- }
-
- void HandleCast() const
- {
- GetCaster()->CastSpell(nullptr, SPELL_WARRIOR_ENRAGE, CastSpellExtraArgsInit{
- .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
- .TriggeringSpell = GetSpell()
- });
- }
-
- void Register() override
- {
- OnCast += SpellCastFn(spell_warr_rampage_enrage::HandleCast);
- }
-};
-
// 275339 - (attached to 46968 - Shockwave)
class spell_warr_rumbling_earth : public SpellScript
{
@@ -1040,6 +1057,7 @@ void AddSC_warrior_spell_scripts()
RegisterSpellScript(spell_warr_colossus_smash);
RegisterSpellScript(spell_warr_critical_thinking);
RegisterSpellScript(spell_warr_devastator);
+ RegisterSpellScript(spell_warr_enrage_proc);
RegisterSpellScript(spell_warr_execute_damage);
RegisterSpellScript(spell_warr_frenzied_enrage);
RegisterSpellScript(spell_warr_fueled_by_violence);
@@ -1053,7 +1071,6 @@ void AddSC_warrior_spell_scripts()
RegisterSpellScript(spell_warr_powerful_enrage);
RegisterSpellScript(spell_warr_raging_blow_cooldown_reset);
RegisterSpellScript(spell_warr_rallying_cry);
- RegisterSpellScript(spell_warr_rampage_enrage);
RegisterSpellScript(spell_warr_rumbling_earth);
RegisterSpellScript(spell_warr_shield_block);
RegisterSpellScript(spell_warr_shield_charge);