Fix permanent cast icons

This commit is contained in:
OldManAlpha 2025-11-24 11:19:41 -08:00
parent 4d5220fb4d
commit 791669534c
2 changed files with 7 additions and 4 deletions

View File

@ -51,7 +51,6 @@ function PTCastIcon:OnDispose()
self.castOrder:Show()
self.overhealIndicator:Show()
self:GetHandle():SetAlpha(1)
self:GetHandle():ClearAllPoints()
self:SetScript("OnUpdate", nil)
local index = PTUtil.KeyOf(self.castIcons, self)
if index ~= nil then
@ -68,6 +67,10 @@ function PTCastIcon:GetProgress()
return math.min((GetTime() - self.startTime) / self.time, 1)
end
function PTCastIcon:GetOvertime()
return GetTime() - self.endTime
end
local importantCasts = {
"Soulstone Resurrection",
"Proclaim Champion",
@ -116,7 +119,7 @@ function PTCastIcon:Start(spellName, spellTexture, time, unit, healAmount, unitF
local healPowerSizeMult = 9.2
local size = math.max(math.min(startSize + (healPower * healPowerSizeMult), maxSize), startSize)
if PTUtil.ResurrectionSpellsSet[spellName] or importantCasts[spellName] then
size = 13
size = 14
self.overhealIndicator:Hide()
end
Puppeteer.print("Size: "..size)
@ -126,7 +129,7 @@ function PTCastIcon:Start(spellName, spellTexture, time, unit, healAmount, unitF
order:SetFont("Fonts\\FRIZQT__.TTF", size, "OUTLINE")
order:SetTextColor(1, 1, 0)
else
order:SetFont("Fonts\\FRIZQT__.TTF", size - 2, "OUTLINE")
order:SetFont("Fonts\\FRIZQT__.TTF", size - 1, "OUTLINE")
order:SetTextColor(0.9, 0.9, 0.9)
end
if not unitFrame.castIcons then

View File

@ -202,7 +202,6 @@ function AddIncomingCast(target, caster, spellID, healAmount, castTime, multi)
if PTGlobalOptions.Experiments.CastIcons then
local icon = PTGuiLib.Get("puppeteer_cast_icon")
local spellName, _, tex = SpellInfo(spellID)
local targetFrame
for f in Puppeteer.UnitFrames(target) do
@ -214,6 +213,7 @@ function AddIncomingCast(target, caster, spellID, healAmount, castTime, multi)
if not targetFrame then
return
end
local icon = PTGuiLib.Get("puppeteer_cast_icon")
icon:Start(spellName, tex, castTime / 1000, caster, healAmount, targetFrame)
if not castIcons[caster] then
castIcons[caster] = compost:GetTable()