diff --git a/Modules/Data/Melee.lua b/Modules/Data/Melee.lua index b10071c5..3cc30206 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 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