From 462e99ec307b51a8aa22ca461dd39e1027fa6358 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Sun, 19 Jan 2025 13:56:22 +0800 Subject: [PATCH] Fix triggered charged buff check --- src/PlayerbotAI.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 29c25ce1..0a5a4672 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -2928,7 +2928,10 @@ bool PlayerbotAI::CanCastSpell(uint32 spellid, Unit* target, bool checkHasSpell, } Unit* oldSel = bot->GetSelectedUnit(); - Spell* spell = new Spell(bot, spellInfo, TRIGGERED_NONE); + // TRIGGERED_IGNORE_POWER_AND_REAGENT_COST flag for not calling CheckPower in check + // which causes buff charge to be ineffectively reduced (e.g. dk freezing fog for howling blast) + /// @TODO: Fix all calling on ApplySpellMod + Spell* spell = new Spell(bot, spellInfo, TRIGGERED_IGNORE_POWER_AND_REAGENT_COST); spell->m_targets.SetUnitTarget(target); spell->m_CastItem = castItem; @@ -2938,7 +2941,6 @@ bool PlayerbotAI::CanCastSpell(uint32 spellid, Unit* target, bool checkHasSpell, ; } spell->m_targets.SetItemTarget(itemTarget); - SpellCastResult result = spell->CheckCast(true); delete spell;