add NP_EnableEnhancedTooltips

This commit is contained in:
avitasia
2026-04-01 12:55:37 -07:00
parent 4ae9548389
commit 5ef8d6087d
3 changed files with 32 additions and 2 deletions
+6
View File
@@ -138,6 +138,9 @@ L:RegisterTranslations("enUS", function()
["Prevent Mounting When Buff Capped"] = true, ["Prevent Mounting When Buff Capped"] = true,
["Whether to prevent mounting when you have 32 buffs (buff capped) and are not already mounted. This prevents the issue where you mount but cannot dismount because the mount aura fails to apply due to the buff cap. When blocked, displays an error message."] = true, ["Whether to prevent mounting when you have 32 buffs (buff capped) and are not already mounted. This prevents the issue where you mount but cannot dismount because the mount aura fails to apply due to the buff cap. When blocked, displays an error message."] = true,
["Enable Enhanced Tooltips"] = true,
["Whether to enable nampower's tooltip additions such as spell proc chance, ICD, and item cooldown text."] = true,
["Enable Aura Cast Events"] = true, ["Enable Aura Cast Events"] = true,
["Whether to enable AURA_CAST_ON_SELF and AURA_CAST_ON_OTHER events."] = true, ["Whether to enable AURA_CAST_ON_SELF and AURA_CAST_ON_OTHER events."] = true,
@@ -320,6 +323,9 @@ L:RegisterTranslations("zhCN", function()
["Prevent Mounting When Buff Capped"] = "Buff满时阻止上坐骑", ["Prevent Mounting When Buff Capped"] = "Buff满时阻止上坐骑",
["Whether to prevent mounting when you have 32 buffs (buff capped) and are not already mounted. This prevents the issue where you mount but cannot dismount because the mount aura fails to apply due to the buff cap. When blocked, displays an error message."] = "当已有32个增益(Buff已满)且未在坐骑状态时,是否阻止上坐骑,以避免坐骑光环因Buff上限无法施加导致无法下马的问题。被阻止时会显示错误提示。", ["Whether to prevent mounting when you have 32 buffs (buff capped) and are not already mounted. This prevents the issue where you mount but cannot dismount because the mount aura fails to apply due to the buff cap. When blocked, displays an error message."] = "当已有32个增益(Buff已满)且未在坐骑状态时,是否阻止上坐骑,以避免坐骑光环因Buff上限无法施加导致无法下马的问题。被阻止时会显示错误提示。",
["Enable Enhanced Tooltips"] = "启用增强工具提示",
["Whether to enable nampower's tooltip additions such as spell proc chance, ICD, and item cooldown text."] = "是否启用 nampower 的工具提示增强内容,例如法术触发几率、内置冷却时间(ICD)和物品冷却文本。",
["Enable Aura Cast Events"] = "启用光环施放事件", ["Enable Aura Cast Events"] = "启用光环施放事件",
["Whether to enable AURA_CAST_ON_SELF and AURA_CAST_ON_OTHER events."] = "是否启用 AURA_CAST_ON_SELF 和 AURA_CAST_ON_OTHER 事件。", ["Whether to enable AURA_CAST_ON_SELF and AURA_CAST_ON_OTHER events."] = "是否启用 AURA_CAST_ON_SELF 和 AURA_CAST_ON_OTHER 事件。",
+5 -2
View File
@@ -92,7 +92,7 @@ function PrintBuffs(unit)
if not texture then if not texture then
break break
end end
print(tostring(i) .. " " .. tostring(spellId)) print(tostring(i) .. " " .. texture .. " " .. tostring(spellId))
end end
end end
@@ -101,7 +101,10 @@ function PrintAuras(unit)
local applications = GetUnitField(unit, "auraApplications") local applications = GetUnitField(unit, "auraApplications")
if not auras then return end if not auras then return end
for i, auraId in ipairs(auras) do for i, auraId in ipairs(auras) do
local stacks = (applications[i] or 0) + 1 local stacks = -1
if applications then
local stacks = (applications[i] or 0) + 1
end
if auraId > 0 then if auraId > 0 then
print(tostring(i) .. " " .. tostring(auraId) .. " x" .. tostring(stacks)) print(tostring(i) .. " " .. tostring(auraId) .. " x" .. tostring(stacks))
end end
+21
View File
@@ -1139,6 +1139,27 @@ if Nampower:HasMinimumVersion(3, 1, 0) then
end end
end, end,
} }
end
if Nampower:HasMinimumVersion(4, 3, 0) then
Nampower.cmdtable.args.qol_options.args.NP_EnableEnhancedTooltips = {
type = "toggle",
name = L["Enable Enhanced Tooltips"],
desc = L["Whether to enable nampower's tooltip additions such as spell proc chance, ICD, and item cooldown text."],
order = 30,
get = function()
return GetCVar("NP_EnableEnhancedTooltips") == "1"
end,
set = function(v)
Nampower.db.profile.NP_EnableEnhancedTooltips = v
if v == true then
SetCVar("NP_EnableEnhancedTooltips", "1")
else
SetCVar("NP_EnableEnhancedTooltips", "0")
end
end,
}
end end
if Nampower:HasMinimumVersion(3, 3, 0) then if Nampower:HasMinimumVersion(3, 3, 0) then