From ecbc33527876efa5b11c62136327425be9f95245 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 1 Mar 2026 04:49:22 +0100 Subject: [PATCH 1/3] fix hit talents being counted twice in wotlk --- Modules/Data/Melee.lua | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index b10071c5..48867616 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -55,43 +55,18 @@ function _Melee:GetHitRatingBonus() return hit + (GetHitModifier() or 0) end ----If a talent spell has the "Apply Aura: Modifies Hit Chance" effect, then we need to handle it here. ----If the effect is "Apply Aura: Mod Spell Hit Chance %", then GetHitModifier() already accounts for it and we don't need to handle it here. +---In TBC and WotLK clients, if a talent spell has the "Apply Aura: Mod Melee & Ranged Hit Chance %", then GetHitModifier() already accounts for it and we don't need to handle it here. ---@return number function _Melee:GetHitTalentBonus() local mod = 0 - - if classId == Data.WARRIOR then - if ECS.IsWotlk then - -- precision - mod = 1 * DataUtils:GetActiveTalentSpell({29590,29591,29592}) - end - elseif classId == Data.HUNTER then - if ECS.IsWotlk then - -- focused aim - mod = 1 * DataUtils:GetActiveTalentSpell({53620,53621,53622}) - end - elseif classId == Data.SHAMAN then - if ECS.IsWotlk then - -- Dual Wield Specialization - if Data:GetMeleeAttackSpeedOffHand() > 0 then - mod = 2 * DataUtils:GetActiveTalentSpell({30816,30818,30819}) - end - elseif ECS.IsClassic then + if ECS.IsClassic then + if classId == Data.SHAMAN then -- Nature's Guidance mod = 1 * DataUtils:GetActiveTalentSpell({16180,16196,16198}) - end - elseif classId == Data.ROGUE then - if ECS.IsClassic then + elseif classId == Data.ROGUE then -- precision mod = 1 * DataUtils:GetActiveTalentSpell({13705,13832,13843,13844,13845}) end - elseif classId == Data.DEATHKNIGHT then - -- Nerves of Cold Steel - -- This assumes a DK is dual wielding and not only using a one-hand main hand weapon - if Data:GetMeleeAttackSpeedOffHand() > 0 then - mod = 1 * DataUtils:GetActiveTalentSpell({49226,50137,50138}) - end end return mod From 061ced01d2a5a9b999bf6f4d8a1ce8407a5558ee Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Sun, 1 Mar 2026 04:54:18 +0100 Subject: [PATCH 2/3] Fix indentation in GetHitTalentBonus function --- Modules/Data/Melee.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index 48867616..3cc30206 100755 --- a/Modules/Data/Melee.lua +++ b/Modules/Data/Melee.lua @@ -60,7 +60,7 @@ end function _Melee:GetHitTalentBonus() local mod = 0 if ECS.IsClassic then - if classId == Data.SHAMAN then + if classId == Data.SHAMAN then -- Nature's Guidance mod = 1 * DataUtils:GetActiveTalentSpell({16180,16196,16198}) elseif classId == Data.ROGUE then From bf25ed8ce9316cb254435b8045cb594cd3e5de5e Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Wed, 4 Mar 2026 04:33:32 +0100 Subject: [PATCH 3/3] also remove ranged hit --- Modules/Data/Ranged.lua | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Modules/Data/Ranged.lua b/Modules/Data/Ranged.lua index f53af9e1..17b0e759 100755 --- a/Modules/Data/Ranged.lua +++ b/Modules/Data/Ranged.lua @@ -7,8 +7,6 @@ local DataUtils = ECSLoader:ImportModule("DataUtils") local _Ranged = {} -local _, _, classId = UnitClass("player") - ---@return number function Data:GetRangeAttackPower() if UnitHasRelicSlot("player") then @@ -80,20 +78,7 @@ function _Ranged:GetHitBonus() hitValue = hitValue + GetCombatRatingBonus(CR_HIT_RANGED) end - return hitValue + (GetHitModifier() or 0) + _Ranged:GetHitTalentBonus() -end - ----If a talent spell has the "Apply Aura: Modifies Hit Chance" effect, then we need to handle it here. ----If the effect is "Apply Aura: Mod Spell Hit Chance %", then GetHitModifier() already accounts for it and we don't need to handle it here. ----@return number -function _Ranged:GetHitTalentBonus() - local bonus = 0 - - if ECS.IsWotlk and classId == Data.HUNTER then - bonus = bonus + 1 * DataUtils:GetActiveTalentSpell({53620,53621,53622}) -- Focused Aim - end - - return bonus + return hitValue + (GetHitModifier() or 0) end ---@return string