castbar: limit lag to maximum castbar width

This commit is contained in:
shagu
2020-09-11 20:12:52 +02:00
parent 24ffe289aa
commit cc385c11f1
+1 -1
View File
@@ -124,7 +124,7 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function ()
if this.showlag then
local _, _, lag = GetNetStats()
local width = this:GetWidth() / (duration/1000) * (lag/1000)
this.bar.lag:SetWidth(width)
this.bar.lag:SetWidth(math.min(this:GetWidth(), width))
else
this.bar.lag:Hide()
end