Skip to content

Commit 6658f50

Browse files
committed
prepare merge
1 parent db8f8d7 commit 6658f50

2 files changed

Lines changed: 14 additions & 22 deletions

File tree

sql/updates/world/master/2026_mm_dd_xx_world.sql renamed to sql/updates/world/master/2026_02_28_00_world.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
44

55
DELETE FROM `spell_proc` WHERE `SpellId` IN (280270);
66
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
7-
(280270,0x00,4,0x00000000,0x00000000,0x00000000,0x00000400,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0,0,0,0); -- Always Angry
7+
(280270,0x00,4,0x00000000,0x00000000,0x00000000,0x00000400,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0,0,0,0); -- Always Angry

src/server/scripts/Spells/spell_warrior.cpp

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,11 +1354,10 @@ class spell_warr_raging_blow_cooldown_reset : public SpellScript
13541354
|| caster->HasAura(SPELL_WARRIOR_SURGE_OF_ADRENALINE_TALENT);
13551355
}
13561356

1357-
void CheckResetCooldown(SpellEffIndex /*effIndex*/)
1357+
void CheckResetCooldown(SpellEffIndex /*effIndex*/) const
13581358
{
1359-
_resetCooldown = false;
13601359
// it is currently impossible to have Wrath and Fury without having Improved Raging Blow, but we will check it anyway
1361-
Unit const* caster = GetCaster();
1360+
Unit* caster = GetCaster();
13621361
int32 value = 0;
13631362
if (caster->HasAura(SPELL_WARRIOR_IMPROVED_RAGING_BLOW))
13641363
value = GetEffectValue();
@@ -1367,30 +1366,23 @@ class spell_warr_raging_blow_cooldown_reset : public SpellScript
13671366
value += auraEffect->GetAmount();
13681367

13691368
if (roll_chance_i(value))
1370-
_resetCooldown = true;
1371-
}
1372-
1373-
void HandleResetCooldown() const
1374-
{
1375-
if (!_resetCooldown)
1376-
return;
1377-
1378-
Unit* caster = GetCaster();
1379-
1380-
caster->CastSpell(nullptr, SPELL_WARRIOR_ALWAYS_ANGRY, CastSpellExtraArgsInit{
1381-
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
1382-
.TriggeringSpell = GetSpell()
1383-
});
1384-
caster->GetSpellHistory()->RestoreCharge(GetSpellInfo()->ChargeCategoryId);
1369+
{
1370+
// HACK: Delay cast to prevent current spell from consuming SPELL_WARRIOR_ALWAYS_ANGRY charge
1371+
caster->m_Events.AddEventAtOffset([caster, originalCastId = GetSpell()->m_originalCastId, chargeCategoryId = GetSpellInfo()->ChargeCategoryId]()
1372+
{
1373+
caster->CastSpell(nullptr, SPELL_WARRIOR_ALWAYS_ANGRY, CastSpellExtraArgsInit{
1374+
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
1375+
.OriginalCastId = originalCastId
1376+
});
1377+
caster->GetSpellHistory()->RestoreCharge(chargeCategoryId);
1378+
}, 0ms);
1379+
}
13851380
}
13861381

13871382
void Register() override
13881383
{
13891384
OnEffectHitTarget += SpellEffectFn(spell_warr_raging_blow_cooldown_reset::CheckResetCooldown, EFFECT_0, SPELL_EFFECT_DUMMY);
1390-
AfterCast += SpellCastFn(spell_warr_raging_blow_cooldown_reset::HandleResetCooldown);
13911385
}
1392-
1393-
bool _resetCooldown = false;
13941386
};
13951387

13961388
// 97462 - Rallying Cry

0 commit comments

Comments
 (0)