unitframes: option that replaces name by missing health

This commit is contained in:
shagu
2019-04-25 21:28:55 +02:00
parent 1bf95836df
commit 81e7216ada
10 changed files with 36 additions and 0 deletions
+18
View File
@@ -1953,6 +1953,24 @@ function pfUI.uf:GetStatusValue(unit, pos)
else
return unit:GetColor("health") .. pfUI.api.Abbreviate(hp)
end
elseif config == "namehealth" then
local health = ceil(hp - hpmax)
if UnitIsDead(unitstr) then
return unit:GetColor("health") .. DEAD
elseif health == 0 then
return unit:GetColor("unit") .. UnitName(unitstr)
else
return unit:GetColor("health") .. pfUI.api.Abbreviate(health)
end
elseif config == "shortnamehealth" then
local health = ceil(hp - hpmax)
if UnitIsDead(unitstr) then
return unit:GetColor("health") .. DEAD
elseif health == 0 then
return unit:GetColor("unit") .. strsub(UnitName(unitstr), 0, 3)
else
return unit:GetColor("health") .. pfUI.api.Abbreviate(health)
end
elseif config == "healthminmax" then
return unit:GetColor("health") .. pfUI.api.Abbreviate(hp) .. "/" .. pfUI.api.Abbreviate(hpmax)
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["deDE"] = {
["ms"] = nil,
["N/A"] = nil,
["Name"] = nil,
["Name | Health Missing"] = nil,
["Nameplates"] = nil,
["Nameplate Width"] = nil,
["Name (Short)"] = nil,
["Name (Short) | Health Missing"] = nil,
["Native"] = nil,
["Network Down"] = nil,
["Network Latency"] = nil,
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["enUS"] = {
["ms"] = nil,
["N/A"] = nil,
["Name"] = nil,
["Name | Health Missing"] = nil,
["Nameplates"] = nil,
["Nameplate Width"] = nil,
["Name (Short)"] = nil,
["Name (Short) | Health Missing"] = nil,
["Native"] = nil,
["Network Down"] = nil,
["Network Latency"] = nil,
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["esES"] = {
["ms"] = "ms",
["N/A"] = "N/D",
["Name"] = "Nombre",
["Name | Health Missing"] = nil,
["Nameplates"] = "Placas identificativas",
["Nameplate Width"] = "Ancho de las placas identificativas",
["Name (Short)"] = "Nombre (corto)",
["Name (Short) | Health Missing"] = nil,
["Native"] = "Nativo",
["Network Down"] = "Velocidad de bajada",
["Network Latency"] = "Latencia de red",
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["frFR"] = {
["ms"] = nil,
["N/A"] = nil,
["Name"] = "Nom",
["Name | Health Missing"] = nil,
["Nameplates"] = "Barres de vie flottantes",
["Nameplate Width"] = "Largeur des barres de vie flottantes",
["Name (Short)"] = "Nom (Court)",
["Name (Short) | Health Missing"] = nil,
["Native"] = nil,
["Network Down"] = "Débit Descendant",
["Network Latency"] = "Latence Réseau",
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["koKR"] = {
["ms"] = "핑",
["N/A"] = nil,
["Name"] = "이름",
["Name | Health Missing"] = nil,
["Nameplates"] = "상바",
["Nameplate Width"] = "상바 넓이",
["Name (Short)"] = nil,
["Name (Short) | Health Missing"] = nil,
["Native"] = nil,
["Network Down"] = "네트워크 다운로드",
["Network Latency"] = "네트워크 지연 시간",
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["ruRU"] = {
["ms"] = "мс",
["N/A"] = "Н/Д",
["Name"] = "Имя",
["Name | Health Missing"] = nil,
["Nameplates"] = "Индикаторы здоровья",
["Nameplate Width"] = "Ширина индикатора здоровья",
["Name (Short)"] = "Короткое имя",
["Name (Short) | Health Missing"] = nil,
["Native"] = "Родная",
["Network Down"] = "Сеть отдача",
["Network Latency"] = "Задержка сети",
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["zhCN"] = {
["ms"] = "毫秒",
["N/A"] = "无",
["Name"] = "名字",
["Name | Health Missing"] = nil,
["Nameplates"] = "姓名板",
["Nameplate Width"] = "姓名板宽度",
["Name (Short)"] = "名字 (短)",
["Name (Short) | Health Missing"] = nil,
["Native"] = "本地",
["Network Down"] = "下行速率",
["Network Latency"] = "网络延迟",
+2
View File
@@ -382,9 +382,11 @@ pfUI_translation["zhTW"] = {
["ms"] = "毫秒",
["N/A"] = "",
["Name"] = "名字",
["Name | Health Missing"] = nil,
["Nameplates"] = "姓名板",
["Nameplate Width"] = "姓名板高度",
["Name (Short)"] = "名字 (短)",
["Name (Short) | Health Missing"] = nil,
["Native"] = "本地",
["Network Down"] = "下行速率",
["Network Latency"] = "網路延遲",
+2
View File
@@ -962,6 +962,8 @@ pfUI:RegisterModule("gui", 20400, function ()
"nameshort:" .. T["Name (Short)"],
"level:" .. T["Level"],
"class:" .. T["Class"],
"namehealth:" .. T["Name | Health Missing"],
"shortnamehealth:" .. T["Name (Short) | Health Missing"],
"healthdyn:" .. T["Health - Auto"],
"health:" .. T["Health - Current"],
"healthmax:" .. T["Health - Max"],