Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Modules/Data/Ranged.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function _Ranged:GetHitBonus()
end

if hitFromItems then -- This needs to be checked because on dungeon entering it becomes nil
hitValue = hitValue + hitFromItems + _Ranged:GetHitTalentBonus()
hitValue = hitValue + hitFromItems + _Ranged:GetHitTalentBonus() + _Ranged:GetHitFromBuffs()
end

return hitValue
Expand All @@ -94,6 +94,17 @@ function _Ranged:GetHitTalentBonus()
return bonus
end

---@return number
function _Ranged:GetHitFromBuffs()
local mod = 0
if C_UnitAuras.GetPlayerAuraBySpellID(6562) or C_SpellBook.IsSpellKnown(6562) or ( -- Heroic Presence
(C_SpellBook.IsSpellKnown(28878) or C_UnitAuras.GetPlayerAuraBySpellID(28878)) and ECS.IsWotlk -- Inspiring Presence
) then
mod = mod + 1
end
return mod
end

---@return string
function Data:RangeMissChanceSameLevel()
local rangedAttackBase, rangedAttackMod = UnitRangedAttack("player")
Expand Down
Loading