fix(monk): Ironskin Brew, Keg Smash brew-CDR, Combo Breaker (audit BM/WW)

Suite a l'audit de la classe moine (3 mecaniques cassees vs Wowhead 7.3.5) :

1. Ironskin Brew (115308) ne faisait RIEN : effet unique DUMMY, buff 215479
   (+35% Stagger) orphelin (reference nulle part). Nouveau script
   spell_monk_ironskin_brew : applique/prolonge 215479 (cumul de duree, cap 3x).
   Le calcul du Stagger (stance_of_the_sturdy_ox) lit desormais 215479 et l'ajoute
   au pourcentage. -> le Brewmaster recupere sa mitigation active.
   (binding via spell_script_names 115308 -> spell_monk_ironskin_brew)

2. Keg Smash (121253) executait des sorts MoP disparus (Weakened Blows,
   Dizzying Haze, energize Chi 127796 absent). Remplace par la mecanique Legion :
   -4 s sur la recharge des 4 breuvages. Ironskin/Purifying partagent une categorie
   de charges (dedup) -> nouvel API core SpellHistory::ModifyChargeRecoveryTime ;
   Black Ox/Fortifying via ModifyCooldown.

3. Combo Breaker : le proc tentait 118864 (Tiger Palm MoP, absent du client 7.3.5)
   1 fois sur 2 -> proc perdu. Proc desormais toujours Blackout Kick! (116768).

Diagnostic produit lors de l'audit moine, verifie contre les donnees DB2 et
les references 7.3.5, puis deploye manuellement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
SylvaniaCore deploy
2026-07-10 12:49:39 +00:00
parent 7582be8b0a
commit 16cc4e92c8
3 changed files with 78 additions and 10 deletions
+24
View File
@@ -867,6 +867,30 @@ void SpellHistory::ReduceChargeCooldown(SpellCategoryEntry const* chargeCategory
ForceSendSpellCharge(chargeCategoryEntry);
}
void SpellHistory::ModifyChargeRecoveryTime(uint32 chargeCategoryId, Clock::duration offset)
{
auto itr = _categoryCharges.find(chargeCategoryId);
if (itr == _categoryCharges.end() || itr->second.empty())
return;
for (ChargeEntry& entry : itr->second)
{
entry.RechargeStart += offset;
entry.RechargeEnd += offset;
}
if (Player* player = GetPlayerOwner())
{
WorldPackets::Spells::SetSpellCharges setSpellCharges;
setSpellCharges.Category = chargeCategoryId;
Clock::duration remaining = itr->second.front().RechargeEnd - Clock::now();
setSpellCharges.NextRecoveryTime = remaining.count() > 0 ? uint32(std::chrono::duration_cast<std::chrono::milliseconds>(remaining).count()) : 0;
setSpellCharges.ConsumedCharges = uint8(itr->second.size());
setSpellCharges.IsPet = player != _owner;
player->SendDirectMessage(setSpellCharges.Write());
}
}
void SpellHistory::RestoreCharge(uint32 chargeCategoryId)
{
auto itr = _categoryCharges.find(chargeCategoryId);
+1
View File
@@ -102,6 +102,7 @@ public:
void AddCooldown(uint32 spellId, uint32 itemId, Clock::time_point cooldownEnd, uint32 categoryId, Clock::time_point categoryEnd, bool onHold = false);
void ModifyCooldown(uint32 spellId, int32 cooldownModMs);
void ModifyCooldown(uint32 spellId, Clock::duration cooldownMod);
void ModifyChargeRecoveryTime(uint32 chargeCategoryId, Clock::duration offset);
void ResetCooldown(uint32 spellId, bool update = false);
void ResetCooldown(CooldownStorageType::iterator& itr, bool update = false);
template<typename Predicate>
+53 -10
View File
@@ -22,6 +22,7 @@
#include "ScriptMgr.h"
#include "SpellAuraEffects.h"
#include "SpellHistory.h"
#include <set>
#include "SpellMgr.h"
#include "SpellPackets.h"
#include "SpellScript.h"
@@ -1027,11 +1028,25 @@ public:
if (Unit* target = GetHitUnit())
{
_player->CastSpell(target, SPELL_MONK_KEG_SMASH_VISUAL, true);
_player->CastSpell(target, SPELL_MONK_WEAKENED_BLOWS, true);
_player->CastSpell(_player, SPELL_MONK_KEG_SMASH_ENERGIZE, true);
// Prevent to receive 2 CHI more than once time per cast
_player->GetSpellHistory()->AddCooldown(SPELL_MONK_KEG_SMASH_ENERGIZE, 0, std::chrono::seconds(1));
_player->CastSpell(target, SPELL_MONK_DIZZYING_HAZE, true);
// Legion : Keg Smash reduit de 4 s la recharge des breuvages.
// Ironskin (115308) + Purifying (119582) partagent une categorie de charges ;
// Black Ox (115399) + Fortifying (115203) sont sur cooldown classique.
static uint32 const brews[4] = { 115308, 119582, 115399, 115203 };
std::set<uint32> doneCategories;
for (uint32 brew : brews)
{
SpellInfo const* brewInfo = sSpellMgr->GetSpellInfo(brew);
if (!brewInfo)
continue;
if (brewInfo->ChargeCategoryId)
{
if (doneCategories.insert(brewInfo->ChargeCategoryId).second)
_player->GetSpellHistory()->ModifyChargeRecoveryTime(brewInfo->ChargeCategoryId, std::chrono::milliseconds(-4000));
}
else
_player->GetSpellHistory()->ModifyCooldown(brew, -4000);
}
}
}
}
@@ -2073,6 +2088,10 @@ public:
return;
int32 staggerPct = GetSpellInfo()->GetEffect(EFFECT_8)->CalcValue(GetCaster());
// Ironskin Brew (buff 215479) augmente le Stagger de +35% (effet 0) tant qu'il est actif.
if (Aura* ironskin = caster->GetAura(215479))
if (AuraEffect const* isbEff = ironskin->GetEffect(EFFECT_0))
staggerPct += isbEff->GetAmount();
int32 staggerAmount = CalculatePct(dmgInfo.GetDamage(), staggerPct);
absorbAmount = staggerAmount;
@@ -2431,11 +2450,9 @@ public:
{
if (roll_chance_i(comboBreaker->GetAmount()))
{
uint32 spellId = 116768;
if (roll_chance_i(50))
spellId = 118864;
caster->CastSpell(caster, spellId, true);
// Legion : Combo Breaker ne proc que Blackout Kick! (116768).
// L'ancien 118864 (Tiger Palm MoP) est absent du client 7.3.5 -> proc perdu 1 fois sur 2.
caster->CastSpell(caster, 116768, true);
}
}
}
@@ -3954,6 +3971,31 @@ class spell_monk_tiger_palm : public SpellScript
}
};
// Ironskin Brew - 115308 : applique/prolonge le buff 215479 (+35% Stagger), cumul de duree cap 3x.
class spell_monk_ironskin_brew : public SpellScript
{
PrepareSpellScript(spell_monk_ironskin_brew);
void HandleAfterCast()
{
Unit* caster = GetCaster();
SpellInfo const* buff = sSpellMgr->GetSpellInfo(215479);
if (!caster || !buff)
return;
int32 base = buff->GetMaxDuration();
if (Aura* aura = caster->GetAura(215479))
aura->SetDuration(std::min<int32>(aura->GetDuration() + base, base * 3));
else
caster->CastSpell(caster, 215479, true);
}
void Register() override
{
AfterCast += SpellCastFn(spell_monk_ironskin_brew::HandleAfterCast);
}
};
void AddSC_monk_spell_scripts()
{
RegisterAreaTriggerAI(at_monk_gift_of_the_ox_sphere);
@@ -4034,6 +4076,7 @@ void AddSC_monk_spell_scripts()
new playerScript_monk_whirling_dragon_punch();
RegisterAuraScript(spell_monk_whirling_dragon_punch);
RegisterSpellScript(spell_monk_tiger_palm);
RegisterSpellScript(spell_monk_ironskin_brew);
RegisterCreatureAI(npc_monk_sef_spirit);
RegisterCreatureAI(npc_monk_xuen);