更新配置相关显示等

This commit is contained in:
rucky
2026-03-20 14:04:51 +08:00
parent 923a1f9ce2
commit 63337b14d2
14 changed files with 886 additions and 98 deletions

View File

@@ -1418,30 +1418,35 @@ function SFrames.Player:CreateAuras()
end
function SFrames.Player:UpdateAuras()
local timeNow = GetTime()
for i = 1, 16 do
local b = self.frame.buffs[i]
local buffIndex, untilCancelled = GetPlayerBuff(i - 1, "HELPFUL")
if buffIndex >= 0 then
local texture = GetPlayerBuffTexture(buffIndex)
if texture then
b.icon:SetTexture(texture)
b.buffIndex = buffIndex
b:Show()
local timeLeft = GetPlayerBuffTimeLeft(buffIndex)
if timeLeft and timeLeft > 0 and timeLeft < 9999 then
b.cdText:SetText(SFrames:FormatTime(timeLeft))
local slotIdx = 0
for i = 0, 31 do
local buffIndex, untilCancelled = GetPlayerBuff(i, "HELPFUL")
if buffIndex and buffIndex >= 0 then
if not SFrames:IsBuffHidden(buffIndex) then
slotIdx = slotIdx + 1
if slotIdx > 16 then break end
local b = self.frame.buffs[slotIdx]
local texture = GetPlayerBuffTexture(buffIndex)
if texture then
b.icon:SetTexture(texture)
b.buffIndex = buffIndex
b:Show()
local timeLeft = GetPlayerBuffTimeLeft(buffIndex)
if timeLeft and timeLeft > 0 and timeLeft < 9999 then
b.cdText:SetText(SFrames:FormatTime(timeLeft))
else
b.cdText:SetText("")
end
else
b.cdText:SetText("")
b:Hide()
end
else
b:Hide()
end
else
b:Hide()
end
end
for j = slotIdx + 1, 16 do
self.frame.buffs[j]:Hide()
end
end
-- Initialization Hook for Auras and Castbar
@@ -1455,8 +1460,8 @@ function SFrames.Player:Initialize()
self.auraUpdater.timer = 0
self.auraUpdater:SetScript("OnUpdate", function()
this.timer = this.timer + arg1
SFrames.Player:UpdateFiveSecondRule()
if this.timer >= 0.2 then
SFrames.Player:UpdateFiveSecondRule()
SFrames.Player:UpdateAuras()
SFrames.Player:UpdatePower()
SFrames.Player:UpdateHealPrediction()