From cfbc1644fed0d9fb73a0ec5cb691cb19281d71d4 Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Sat, 28 Feb 2026 21:47:19 +0100 Subject: [PATCH 1/3] removed superwow checkups, not required anymore removed superwow checkups, not required anymore --- modules/nameplates.lua | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index c807a1f5..0a167028 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -12,12 +12,6 @@ pfUI:RegisterModule("nameplates", "vanilla", function () end end - -- Check for SuperWoW support (fallback) - local hasSuperwow = SUPERWOW_VERSION ~= nil - - -- Use either Nampower or SuperWoW for GetName(1) GUID support - local superwow_active = hasNampower or hasSuperwow - -- Local function references for performance local GetTime = GetTime local UnitExists = UnitExists @@ -947,7 +941,7 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA") local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size -- use superwow unit guid as unitstr if possible - if superwow_active and not unitstr then + if hasNampower and not unitstr then unitstr = plate.parent:GetName(1) end @@ -998,7 +992,7 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA") end -- target indicator - if superwow_active and cfg.outcombatstate then + if hasNampower and cfg.outcombatstate then local guid = plate.parent:GetName(1) or "" -- determine color based on combat state @@ -1088,7 +1082,7 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA") local rhp, rhpmax, estimated -- Try Nampower first for real HP values via GUID - local guid = superwow_active and plate.parent:GetName(1) or nil + local guid = hasNampower and plate.parent:GetName(1) or nil if guid and GetUnitField then local npHp = GetUnitField(guid, "health") local npMaxHp = GetUnitField(guid, "maxHealth") @@ -1138,11 +1132,11 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA") r, g, b, a = RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b, 1 end - if superwow_active and unitstr and UnitIsTapped(unitstr) and not UnitIsTappedByPlayer(unitstr) then + if hasNampower and unitstr and UnitIsTapped(unitstr) and not UnitIsTappedByPlayer(unitstr) then r, g, b, a = .5, .5, .5, .8 end - if superwow_active and cfg.barcombatstate then + if hasNampower and cfg.barcombatstate then local guid = plate.parent:GetName(1) or "" local color = GetCombatStateColor(guid) @@ -1249,7 +1243,7 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA") local nameplate = frame.nameplate -- Register GUID when plate becomes visible - if superwow_active then + if hasNampower then local guid = frame:GetName(1) if guid then nameplate.cachedGuid = guid @@ -1265,7 +1259,7 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA") local now = state and state.now or GetTime() -- Update GUID registry (lightweight, needed for event routing) - if superwow_active then + if hasNampower then local guid = frame:GetName(1) if guid and guid ~= nameplate.cachedGuid then if nameplate.cachedGuid and guidRegistry[nameplate.cachedGuid] == frame then @@ -1397,7 +1391,7 @@ nameplates:RegisterEvent("ZONE_CHANGED_NEW_AREA") -- trigger update when name color changed (includes combat state check) local r, g, b = original.name:GetTextColor() local inCombatWithPlayer = false - if superwow_active and cfg.namefightcolor then + if hasNampower and cfg.namefightcolor then local guid = nameplate.cachedGuid if guid then inCombatWithPlayer = UnitAffectingCombat(guid) and UnitAffectingCombat("player") From 6649656d822b2d73e7fcd089a211cebda40f799e Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Sat, 28 Feb 2026 22:12:51 +0100 Subject: [PATCH 2/3] got rid of more superwow checks, we have nampower now! --- libs/libdebuff.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libs/libdebuff.lua b/libs/libdebuff.lua index 25a0d8dd..bd20f0d1 100644 --- a/libs/libdebuff.lua +++ b/libs/libdebuff.lua @@ -424,7 +424,7 @@ local dispelTypeMap = { -- Get current debuff state directly from WoW via GetUnitField -- Returns: { [displaySlot] = {auraSlot, spellId, spellName, stacks, texture, dtype} } local function GetDebuffSlotMap(guid) - if not guid or not GetUnitField or not SpellInfo then + if not guid or not GetUnitField then return nil end @@ -1275,9 +1275,13 @@ if hasNampower then end if numMissed > 0 or numHit == 0 then return end - if not SpellInfo then return end - - local spellName, spellRankString = SpellInfo(spellId) + + local spellName, spellRankString + if SpellInfo then + spellName, spellRankString = SpellInfo(spellId) + elseif GetSpellRecField then + spellName = GetSpellRecField(spellId, "name") + end if not spellName then return end local castRank = 0 @@ -1411,10 +1415,10 @@ if hasNampower then local durationMs = arg8 local auraCapStatus = arg9 - if not SpellInfo or not spellId then return end + if not spellId then return end if not targetGuid or targetGuid == "" or targetGuid == "0x0000000000000000" then return end - local spellName = SpellInfo(spellId) + local spellName = SpellInfo and SpellInfo(spellId) or (GetSpellRecField and GetSpellRecField(spellId, "name")) if not spellName then return end -- Deduplicate: Ignore if we processed this exact cast recently (within 100ms) From 30d36a5af1cf8102db9a474ebf8843126b763c1a Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Sat, 28 Feb 2026 22:44:49 +0100 Subject: [PATCH 3/3] Revert "add optional sp/haste display to player frame" --- api/config.lua | 13 ++-- env/translations_deDE.lua | 8 --- env/translations_enUS.lua | 8 --- env/translations_esES.lua | 8 --- env/translations_frFR.lua | 8 --- env/translations_koKR.lua | 8 --- env/translations_ruRU.lua | 8 --- env/translations_zhCN.lua | 8 --- env/translations_zhTW.lua | 8 --- modules/castbar.lua | 6 +- modules/energytick.lua | 2 +- modules/gui.lua | 15 +--- modules/player.lua | 148 +------------------------------------- 13 files changed, 11 insertions(+), 237 deletions(-) diff --git a/api/config.lua b/api/config.lua index a2454c51..b26828f2 100644 --- a/api/config.lua +++ b/api/config.lua @@ -307,15 +307,10 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("unitframes", nil, "clickcast5_alt", "") pfUI:UpdateConfig("unitframes", nil, "clickcast5_ctrl", "") - pfUI:UpdateConfig("unitframes", "player", "showPVPMinimap", "0") - pfUI:UpdateConfig("unitframes", "player", "showRest", "0") - pfUI:UpdateConfig("unitframes", "player", "energy", "1") - pfUI:UpdateConfig("unitframes", "player", "manatick", "0") - pfUI:UpdateConfig("unitframes", "player", "display_haste", "0") - pfUI:UpdateConfig("unitframes", "player", "display_haste_color", "1,1,1,1") - pfUI:UpdateConfig("unitframes", "player", "display_spellpower", "1") - pfUI:UpdateConfig("unitframes", "player", "display_sp_color_override", "0") - pfUI:UpdateConfig("unitframes", "player", "display_sp_color", "") + pfUI:UpdateConfig("unitframes", "player", "showPVPMinimap", "0") + pfUI:UpdateConfig("unitframes", "player", "showRest", "0") + pfUI:UpdateConfig("unitframes", "player", "energy", "1") + pfUI:UpdateConfig("unitframes", "player", "manatick", "0") pfUI:UpdateConfig("unitframes", "focus", "width", "120") pfUI:UpdateConfig("unitframes", "focus", "height", "34") diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index 6a860e34..6ca88afa 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -222,7 +222,6 @@ pfUI_translation["deDE"] = { ["Display Frame"] = nil, ["Display Mode"] = nil, ["Display Overheal"] = nil, - ["Display Spell Power"] = nil, ["Dock"] = nil, ["Dodge"] = nil, ["Donate"] = nil, @@ -236,7 +235,6 @@ pfUI_translation["deDE"] = { ["Draw Glow Around Target Nameplate"] = nil, ["Druid Mana Bar Height"] = nil, ["Druid Mana Bar Text"] = nil, - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = nil, ["Elysium Based Core"] = nil, ["Enable"] = nil, @@ -363,9 +361,6 @@ pfUI_translation["deDE"] = { ["Gryphons"] = nil, ["Guild Online"] = nil, ["Happiness Icon Size"] = nil, - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = nil, ["Health"] = nil, ["Health - Auto"] = nil, @@ -583,7 +578,6 @@ pfUI_translation["deDE"] = { ["Player Buff Bar"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = nil, ["Please enter a name for the new profile."] = nil, ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = nil, @@ -761,7 +755,6 @@ pfUI_translation["deDE"] = { ["Soulshards"] = nil, ["Spacing"] = nil, ["Special Recipient"] = nil, - ["Spell Power Color"] = nil, ["Square"] = nil, ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, @@ -847,7 +840,6 @@ pfUI_translation["deDE"] = { ["Use Custom Color On Full Health"] = nil, ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, ["Use Original Game Fonts"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index 6a8470c8..031c68b3 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -222,7 +222,6 @@ pfUI_translation["enUS"] = { ["Display Frame"] = nil, ["Display Mode"] = nil, ["Display Overheal"] = nil, - ["Display Spell Power"] = nil, ["Dock"] = nil, ["Dodge"] = nil, ["Donate"] = nil, @@ -236,7 +235,6 @@ pfUI_translation["enUS"] = { ["Draw Glow Around Target Nameplate"] = nil, ["Druid Mana Bar Height"] = nil, ["Druid Mana Bar Text"] = nil, - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = nil, ["Elysium Based Core"] = nil, ["Enable"] = nil, @@ -363,9 +361,6 @@ pfUI_translation["enUS"] = { ["Gryphons"] = nil, ["Guild Online"] = nil, ["Happiness Icon Size"] = nil, - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = nil, ["Health"] = nil, ["Health - Auto"] = nil, @@ -583,7 +578,6 @@ pfUI_translation["enUS"] = { ["Player Buff Bar"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = nil, ["Please enter a name for the new profile."] = nil, ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = nil, @@ -761,7 +755,6 @@ pfUI_translation["enUS"] = { ["Soulshards"] = nil, ["Spacing"] = nil, ["Special Recipient"] = nil, - ["Spell Power Color"] = nil, ["Square"] = nil, ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, @@ -847,7 +840,6 @@ pfUI_translation["enUS"] = { ["Use Custom Color On Full Health"] = nil, ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, ["Use Original Game Fonts"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index 9f89d09f..40b98503 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -222,7 +222,6 @@ pfUI_translation["esES"] = { ["Display Frame"] = "Mostrar marco", ["Display Mode"] = "Modo de mostrar", ["Display Overheal"] = "Mostrar Sobresanación", - ["Display Spell Power"] = nil, ["Dock"] = "Acoplar", ["Dodge"] = "Esquivar", ["Donate"] = nil, @@ -236,7 +235,6 @@ pfUI_translation["esES"] = { ["Draw Glow Around Target Nameplate"] = "Brillar alrededor de la placa identificativa del objetivo", ["Druid Mana Bar Height"] = nil, ["Druid Mana Bar Text"] = nil, - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = "Acerca elástico", ["Elysium Based Core"] = "Núcleo basado en Elysium", ["Enable"] = "Activar", @@ -363,9 +361,6 @@ pfUI_translation["esES"] = { ["Gryphons"] = nil, ["Guild Online"] = "Conectados en hermandad", ["Happiness Icon Size"] = "Tamaño del icono de felicidad", - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = "Color de curación", ["Health"] = "Salud", ["Health - Auto"] = "Salud - Auto", @@ -583,7 +578,6 @@ pfUI_translation["esES"] = { ["Player Buff Bar"] = "Barra de beneficios del jugador", ["Player Castbar"] = "Barra de lanzamiento del jugador", ["Player Debuff Bar"] = "Barra de perjuicios del jugador", - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = "Marco del jugador", ["Please enter a name for the new profile."] = "Mete un nombre para el nuevo perfil.", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "Mete un nombre para el nuevo perfil.\nSi ya existe un perfil con el mismo nombre, este será sobrescrito.", @@ -761,7 +755,6 @@ pfUI_translation["esES"] = { ["Soulshards"] = "Fragmentos de alma", ["Spacing"] = "Espaciado", ["Special Recipient"] = "Destinatario especial", - ["Spell Power Color"] = nil, ["Square"] = "Cuadrado", ["Stance Bar 1"] = "Barra de actitud 1", ["Stance Bar 2"] = "Barra de actitud 2", @@ -847,7 +840,6 @@ pfUI_translation["esES"] = { ["Use Custom Color On Full Health"] = "Usar color personalizado en plena salud", ["Use Custom Color Power Bar Background"] = "Usar un color personalizado para el fondo de la barra de poder", ["Use Custom Font Settings"] = "Usar las opciones de fuente personalizada", - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = "Usar un tamaño de fuente dinámico", ["Use Item Rarity Color For Loot-Roll Timer"] = "Usar el color de la rareza del objeto para el temporizador de tirar los dados", ["Use Original Game Fonts"] = nil, diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index 9bf04233..5d0d14b2 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -222,7 +222,6 @@ pfUI_translation["frFR"] = { ["Display Frame"] = "Montre le cadre", ["Display Mode"] = nil, ["Display Overheal"] = "Montre le Overheal", - ["Display Spell Power"] = nil, ["Dock"] = "Accroche", ["Dodge"] = "Esquive", ["Donate"] = nil, @@ -236,7 +235,6 @@ pfUI_translation["frFR"] = { ["Draw Glow Around Target Nameplate"] = "Dessiner une lueur autour des barres de vie flottantes de la cible", ["Druid Mana Bar Height"] = nil, ["Druid Mana Bar Text"] = nil, - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = "Zoom élastique", ["Elysium Based Core"] = "Basé sur le core d'Elysium", ["Enable"] = "Activer", @@ -363,9 +361,6 @@ pfUI_translation["frFR"] = { ["Gryphons"] = nil, ["Guild Online"] = "Membres de guilde connectés", ["Happiness Icon Size"] = nil, - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = nil, ["Health"] = "Point de vie", ["Health - Auto"] = "Points de vie - Automatique", @@ -583,7 +578,6 @@ pfUI_translation["frFR"] = { ["Player Buff Bar"] = "Barre des Améliorations du Joueur", ["Player Castbar"] = "Barre d'incantation du Joueur", ["Player Debuff Bar"] = "Barre des Affaiblissements du Joueur", - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = "Cadre du Joueur", ["Please enter a name for the new profile."] = "Entrez un nom pour le nouveau profil", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "Entrez un nom pour le nouveau profil.\nUn profil existant du même nom sera écrasé.", @@ -761,7 +755,6 @@ pfUI_translation["frFR"] = { ["Soulshards"] = "Pierre d'âme", ["Spacing"] = "Espacement", ["Special Recipient"] = "Recipient spécial", - ["Spell Power Color"] = nil, ["Square"] = "Carré", ["Stance Bar 1"] = "Barre de posture 1", ["Stance Bar 2"] = "Barre de posture 2", @@ -847,7 +840,6 @@ pfUI_translation["frFR"] = { ["Use Custom Color On Full Health"] = "Utiliser une couleur personnalisée la vie est pleine", ["Use Custom Color Power Bar Background"] = "Utiliser l'arrière-plan de la barre d'alimentation de couleur personnalisée", ["Use Custom Font Settings"] = nil, - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = "Utiliser la taille de police dynamique", ["Use Item Rarity Color For Loot-Roll Timer"] = "Utiliser la couleur de la rareté de l'objet pour la minuterie du lancer de dés", ["Use Original Game Fonts"] = nil, diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index a82899d0..8bc621f5 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -222,7 +222,6 @@ pfUI_translation["koKR"] = { ["Display Frame"] = nil, ["Display Mode"] = nil, ["Display Overheal"] = nil, - ["Display Spell Power"] = nil, ["Dock"] = "독", ["Dodge"] = "우측 챗팅창 위", ["Donate"] = nil, @@ -236,7 +235,6 @@ pfUI_translation["koKR"] = { ["Draw Glow Around Target Nameplate"] = nil, ["Druid Mana Bar Height"] = nil, ["Druid Mana Bar Text"] = nil, - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = nil, ["Elysium Based Core"] = "엘리시움 기반 코어", ["Enable"] = nil, @@ -363,9 +361,6 @@ pfUI_translation["koKR"] = { ["Gryphons"] = nil, ["Guild Online"] = "접속중인 길드원", ["Happiness Icon Size"] = nil, - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = nil, ["Health"] = nil, ["Health - Auto"] = "체력-자동", @@ -583,7 +578,6 @@ pfUI_translation["koKR"] = { ["Player Buff Bar"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = nil, ["Please enter a name for the new profile."] = nil, ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "새 프로필의 이름을 입력하십시오.\n동일한 이름을 작성하면 기존 프로파일을 덮어 씁니다.", @@ -761,7 +755,6 @@ pfUI_translation["koKR"] = { ["Soulshards"] = "영혼의 조각", ["Spacing"] = nil, ["Special Recipient"] = nil, - ["Spell Power Color"] = nil, ["Square"] = nil, ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, @@ -847,7 +840,6 @@ pfUI_translation["koKR"] = { ["Use Custom Color On Full Health"] = nil, ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = nil, ["Use Original Game Fonts"] = nil, diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index 33c44911..a6f60009 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -222,7 +222,6 @@ pfUI_translation["ruRU"] = { ["Display Frame"] = "Отобразить рамку", ["Display Mode"] = "Режим отображения", ["Display Overheal"] = "Отобразить избыточное исцеление", - ["Display Spell Power"] = nil, ["Dock"] = "панель", ["Dodge"] = "Над окном чата справа", ["Donate"] = "Пожертвовать", @@ -236,7 +235,6 @@ pfUI_translation["ruRU"] = { ["Draw Glow Around Target Nameplate"] = "Сияние вокруг индикатора здоровья цели", ["Druid Mana Bar Height"] = nil, ["Druid Mana Bar Text"] = nil, - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = "Эластичное увеличение", ["Elysium Based Core"] = "Ядро на основе Elysium", ["Enable"] = "Включить", @@ -363,9 +361,6 @@ pfUI_translation["ruRU"] = { ["Gryphons"] = nil, ["Guild Online"] = "Члены гильдии в сети", ["Happiness Icon Size"] = "Размер значка счастья", - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = "Цвет исцеления", ["Health"] = "Здоровье", ["Health - Auto"] = "Здоровье - автоматически", @@ -583,7 +578,6 @@ pfUI_translation["ruRU"] = { ["Player Buff Bar"] = "Панель баффов игрока", ["Player Castbar"] = "Панель применения игрока", ["Player Debuff Bar"] = "Панель дебаффов игрока", - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = "Окно юнита Игрок", ["Please enter a name for the new profile."] = "Пожалуйста введите имя для нового профиля.", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "Пожалуйста введите имя для нового профиля. Существующие профили, имеющие одно и то же имя, будут перезаписаны.", @@ -761,7 +755,6 @@ pfUI_translation["ruRU"] = { ["Soulshards"] = "Камни душ", ["Spacing"] = "Расстояние", ["Special Recipient"] = "Конкретный получатель", - ["Spell Power Color"] = nil, ["Square"] = "Квадрат", ["Stance Bar 1"] = "Панель 1-ой стойки", ["Stance Bar 2"] = "Панель 2-ой стойки", @@ -847,7 +840,6 @@ pfUI_translation["ruRU"] = { ["Use Custom Color On Full Health"] = "Использовать пользовательский цвет при полном здоровье", ["Use Custom Color Power Bar Background"] = "Использовать пользовательский цвет фона панели силы", ["Use Custom Font Settings"] = "Использовать пользовательские настройки шрифта", - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = "Использовать динамический размер шрифта", ["Use Item Rarity Color For Loot-Roll Timer"] = "Использовать цвет качества предмета для таймера распределения добычи", ["Use Original Game Fonts"] = "Использовать оригинальные игровые шрифты", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index dc879872..b41108db 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -222,7 +222,6 @@ pfUI_translation["zhCN"] = { ["Display Frame"] = "显示框架", ["Display Mode"] = "显示模式", ["Display Overheal"] = "显示过量治疗", - ["Display Spell Power"] = nil, ["Dock"] = "停靠", ["Dodge"] = "聊天框顶部", ["Donate"] = "捐赠", @@ -236,7 +235,6 @@ pfUI_translation["zhCN"] = { ["Draw Glow Around Target Nameplate"] = "目标姓名板周围显示光晕", ["Druid Mana Bar Height"] = "德鲁伊法力条高度", ["Druid Mana Bar Text"] = "德鲁伊法力条字体", - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = "弹性变焦", ["Elysium Based Core"] = "Elysium 基础核心", ["Enable"] = "启用", @@ -363,9 +361,6 @@ pfUI_translation["zhCN"] = { ["Gryphons"] = "狮鹫(多个)", ["Guild Online"] = "公会在线", ["Happiness Icon Size"] = "高兴值图标大小", - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = "治疗颜色", ["Health"] = "生命值", ["Health - Auto"] = "动态生命值和百分比", @@ -583,7 +578,6 @@ pfUI_translation["zhCN"] = { ["Player Buff Bar"] = "玩家Buffs条", ["Player Castbar"] = "玩家施法条", ["Player Debuff Bar"] = "玩家Debuffs条", - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = "玩家单位框架", ["Please enter a name for the new profile."] = "请输入新配置文件的名称", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "请输入新配置文件的名称。\n如果你创建具有相同名称的配置文件将覆盖现有的配置文件。", @@ -762,7 +756,6 @@ pfUI_translation["zhCN"] = { ["Soulshards"] = "灵魂碎片", ["Spacing"] = "间距", ["Special Recipient"] = "特殊指定角色", - ["Spell Power Color"] = nil, ["Square"] = "方块", ["Stance Bar 1"] = "姿态动作条 1", ["Stance Bar 2"] = "姿态动作条 2", @@ -848,7 +841,6 @@ pfUI_translation["zhCN"] = { ["Use Custom Color On Full Health"] = "在生命值满时使用自定义颜色", ["Use Custom Color Power Bar Background"] = "使用自定义颜色显示能量值背景", ["Use Custom Font Settings"] = "使用自定义字体设置", - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = "使用动态字体大小", ["Use Item Rarity Color For Loot-Roll Timer"] = "为战利品Roll点计时框启用物品稀有颜色", ["Use Original Game Fonts"] = "使用游戏原始字体", diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index b60b8b99..6f886232 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -222,7 +222,6 @@ pfUI_translation["zhTW"] = { ["Display Frame"] = "顯示框架", ["Display Mode"] = nil, ["Display Overheal"] = nil, - ["Display Spell Power"] = nil, ["Dock"] = "停靠", ["Dodge"] = "聊天框頂部", ["Donate"] = nil, @@ -236,7 +235,6 @@ pfUI_translation["zhTW"] = { ["Draw Glow Around Target Nameplate"] = nil, ["Druid Mana Bar Height"] = nil, ["Druid Mana Bar Text"] = nil, - ["Effective Haste (Haste * cast time reduction)"] = nil, ["Elastic Zoom"] = nil, ["Elysium Based Core"] = "Elysium Based Core", ["Enable"] = nil, @@ -363,9 +361,6 @@ pfUI_translation["zhTW"] = { ["Gryphons"] = nil, ["Guild Online"] = "公會線上", ["Happiness Icon Size"] = nil, - ["Haste (cast speed increase)"] = nil, - ["Haste Display"] = nil, - ["Haste Display Color"] = nil, ["Heal Color"] = nil, ["Health"] = nil, ["Health - Auto"] = "動態生命值和百分比", @@ -583,7 +578,6 @@ pfUI_translation["zhTW"] = { ["Player Buff Bar"] = nil, ["Player Castbar"] = nil, ["Player Debuff Bar"] = nil, - ["Player SP/Haste Display"] = nil, ["Player Unitframe"] = nil, ["Please enter a name for the new profile."] = "請輸入新設定檔的名稱", ["Please enter a name for the new profile.\nExisting profiles sharing the same name will be overwritten."] = "請輸入新設定檔的名稱。\n如果你創建具有相同名稱的設定檔將覆蓋現有的設定檔。", @@ -761,7 +755,6 @@ pfUI_translation["zhTW"] = { ["Soulshards"] = "靈魂碎片", ["Spacing"] = nil, ["Special Recipient"] = "特殊指定角色", - ["Spell Power Color"] = nil, ["Square"] = "方形", ["Stance Bar 1"] = nil, ["Stance Bar 2"] = nil, @@ -847,7 +840,6 @@ pfUI_translation["zhTW"] = { ["Use Custom Color On Full Health"] = nil, ["Use Custom Color Power Bar Background"] = nil, ["Use Custom Font Settings"] = nil, - ["Use Custom Spell Power Color (unchecked = biggest school color)"] = nil, ["Use Dynamic Font Size"] = nil, ["Use Item Rarity Color For Loot-Roll Timer"] = "為戰利品Roll點計時框啟用物品稀有顏色", ["Use Original Game Fonts"] = nil, diff --git a/modules/castbar.lua b/modules/castbar.lua index 8bac67fb..f5f04187 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -80,8 +80,8 @@ pfUI:RegisterModule("castbar", "vanilla", function () cb:SetScript("OnUpdate", function() -- Throttle for performance if (this.tick or 0) > GetTime() then return end - this.tick = GetTime() + 0.020 -- ~50 FPS for smooth castbar - + this.tick = GetTime() + 0.020 -- ~60 FPS for smooth castbar + if this.drag and this.drag:IsShown() then this:SetAlpha(1) return @@ -385,4 +385,4 @@ pfUI:RegisterModule("castbar", "vanilla", function () UpdateMovable(pfUI.castbar.focus) end -end) +end) \ No newline at end of file diff --git a/modules/energytick.lua b/modules/energytick.lua index 9f40046b..72c19703 100644 --- a/modules/energytick.lua +++ b/modules/energytick.lua @@ -84,7 +84,7 @@ pfUI:RegisterModule("energytick", "vanilla:tbc", function() if (this.tick or 0) > GetTime() then return end - this.tick = GetTime() + 0.020 -- ~50 FPS + this.tick = GetTime() + 0.020 if this.target then this.start, this.max = GetTime(), this.target diff --git a/modules/gui.lua b/modules/gui.lua index 8260f125..0ed0165c 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2264,19 +2264,6 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(U[c], T["Rage Color"], C.unitframes[c], "ragecolor", "color") CreateConfig(U[c], T["Energy Color"], C.unitframes[c], "energycolor", "color") CreateConfig(U[c], T["Focus Color"], C.unitframes[c], "focuscolor", "color") - - if c == "player" then - CreateConfig(U[c], T["Player SP/Haste Display"], nil, nil, "header") - CreateConfig(U[c], T["Haste Display"], C.unitframes[c], "display_haste", "dropdown", { - "0:"..T["None"], - "1:"..T["Haste (cast speed increase)"], - "2:"..T["Effective Haste (Haste * cast time reduction)"], -- Only affects mages/warlocks I believe - }) - CreateConfig(U[c], T["Haste Display Color"], C.unitframes[c], "display_haste_color", "color") - CreateConfig(U[c], T["Display Spell Power"], C.unitframes[c], "display_spellpower", "checkbox") - CreateConfig(U[c], T["Use Custom Spell Power Color (unchecked = biggest school color)"], C.unitframes[c], "display_sp_color_override", "checkbox") - CreateConfig(U[c], T["Spell Power Color"], C.unitframes[c], "display_sp_color", "color") - end end) end @@ -2852,4 +2839,4 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () end end) end -end) +end) \ No newline at end of file diff --git a/modules/player.lua b/modules/player.lua index eb75d706..b1c0b020 100644 --- a/modules/player.lua +++ b/modules/player.lua @@ -11,153 +11,9 @@ pfUI:RegisterModule("player", "vanilla:tbc", function () pfUI.uf.player:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOM", -75, 125) UpdateMovable(pfUI.uf.player) - -- infoTopCenterText: used to display haste / spell power above health bar - local playerFrame = pfUI.uf.player - if not playerFrame.infoTopCenterText then - playerFrame.infoTopCenterText = playerFrame.texts:CreateFontString(nil, "OVERLAY") - playerFrame.infoTopCenterText:SetFontObject(GameFontWhite) - local cfg = playerFrame.config - local fontname, fontsize, fontstyle - if cfg.customfont == "1" then - fontname = pfUI.media[cfg.customfont_name] - fontsize = tonumber(cfg.customfont_size) - fontstyle = cfg.customfont_style - else - fontname = pfUI.font_unit - fontsize = tonumber(C.global.font_unit_size) - fontstyle = C.global.font_unit_style - end - playerFrame.infoTopCenterText:SetFont(fontname, fontsize, fontstyle) - playerFrame.infoTopCenterText:SetJustifyH("CENTER") - playerFrame.infoTopCenterText:SetPoint("TOPLEFT", playerFrame.hp.bar, "TOPLEFT", 0, 0) - playerFrame.infoTopCenterText:SetPoint("TOPRIGHT", playerFrame.hp.bar, "TOPRIGHT", 0, 0) - playerFrame.infoTopCenterText:SetHeight(14) - end - - local _, myclass = UnitClass("player") - playerFrame.myclass = myclass - playerFrame.isSpellCaster = myclass ~= "WARRIOR" and myclass ~= "ROGUE" and myclass ~= "HUNTER" - - -- Compute class-based casting speed modifier and cache on the frame. - -- This is re-evaluated on LEARNED_SPELL_IN_TAB (with 1s delay) so talent changes are handled. - -- Not sure if there are any other effects that give % cast reduction time - local function UpdatePlayerModCastingTime() - playerFrame.modCastingTime = 1 - if myclass == "MAGE" then - local _, _, _, _, acceleratedArcana = GetTalentInfo(1, 16) - if acceleratedArcana and acceleratedArcana > 0 then - playerFrame.modCastingTime = 0.95 - end - elseif myclass == "WARLOCK" then - local _, _, _, _, rapidDeter = GetTalentInfo(1, 14) - if rapidDeter and rapidDeter > 0 then - playerFrame.modCastingTime = 1 - (rapidDeter * 0.03) - end - end - end - - local talentFrame = CreateFrame("Frame") - talentFrame:RegisterEvent("PLAYER_ENTERING_WORLD") - talentFrame:RegisterEvent("LEARNED_SPELL_IN_TAB") - talentFrame:SetScript("OnEvent", function() - -- Delay 1s for both PLAYER_ENTERING_WORLD and LEARNED_SPELL_IN_TAB - local checkAt = GetTime() + 1 - talentFrame:SetScript("OnUpdate", function() - if GetTime() >= checkAt then - talentFrame:SetScript("OnUpdate", nil) - UpdatePlayerModCastingTime() - end - end) - end) - - -- Convert "r,g,b,a" config color string to a 6-char hex string, or nil if unset - local function cfgColorToHex(colorStr) - if not colorStr or colorStr == "" then return nil end - local r, g, b = strsplit(",", colorStr) - r, g, b = tonumber(r), tonumber(g), tonumber(b) - if not r or not g or not b then return nil end - return string.format("%02X%02X%02X", r * 255, g * 255, b * 255) - end - - -- SP school colors indexed by GetSpellPower("net") return order - -- (1=phys, 2=holy, 3=fire, 4=nature, 5=frost, 6=shadow, 7=arcane) - local spColors = { "FFFFFF", "FFFF80", "FF8000", "4DFF4D", "80FFFF", "9482C9", "FFFFFF" } - - -- Default SP school per class used as tiebreaker when multiple schools are equal - local spDefaultSchool = { - PALADIN = 2, PRIEST = 2, - SHAMAN = 4, DRUID = 4, - MAGE = 7, WARLOCK = 6, - } - - -- Compute and cache the haste/SP text; called from OnUpdate, throttled to 0.25s - local function UpdateInfoText() - local cfg = playerFrame.config - if not cfg then - return - end - local hasteMode = cfg.display_haste -- "0"=none, "1"=modCastSpeed, "2"=modCastSpeed*modCastingTime - local showSP = cfg.display_spellpower == "1" - - local isSpellCaster = playerFrame.isSpellCaster - if (hasteMode == "0" or not isSpellCaster) and not showSP then - playerFrame.infoTopCenterText:SetText("") - return - end - - local haste = GetUnitField("player", "modCastSpeed") - local modCastingTime = playerFrame.modCastingTime or 1 - local text = "" - - if isSpellCaster and haste then - local hasteHex = cfgColorToHex(cfg.display_haste_color) or "FFFFFF" - if hasteMode == "1" then - text = string.format("|cff%s%.1f%%|r", hasteHex, (1 / haste - 1) * 100) - elseif hasteMode == "2" then - text = string.format("|cff%s%.1f%%|r", hasteHex, (1 / (haste * modCastingTime) - 1) * 100) - end - end - - if showSP and isSpellCaster then - local schools = { GetSpellPower("net") } - local defSchool = spDefaultSchool[myclass] or 2 - local maxSP = schools[defSchool] or 0 - local maxColor = spColors[defSchool] - for i = 2, 7 do -- skip physical (1) - local v = schools[i] or 0 - if v > maxSP then - maxSP = v - maxColor = spColors[i] - end - end - if maxSP > 0 then - local spHex = (cfg.display_sp_color_override == "1" and cfgColorToHex(cfg.display_sp_color)) or maxColor - if text ~= "" then text = text .. " " end - text = text .. string.format("|cff%s+%d SP|r", spHex, maxSP) - end - end - - playerFrame.infoTopCenterText:SetText(text) - end - - function playerFrame:UpdateConfig() - UpdateInfoText() - end - -- Add throttle to player frame OnUpdate if pfUI.uf.player:GetScript("OnUpdate") then - local originalOnUpdate = pfUI.uf.player:GetScript("OnUpdate") - pfUI.uf.player:SetScript("OnUpdate", function() - if (this.throttleTick or 0) > GetTime() then - return - end - this.throttleTick = GetTime() + 0.05 -- Default: 20 FPS - originalOnUpdate() - if (this.infoTextTick or 0) <= GetTime() then - this.infoTextTick = GetTime() + 0.25 -- Don't need to update haste/SP text as often - UpdateInfoText() - end - end) + pfUI.uf.player:SetScript("OnUpdate", pfUI.uf.player:GetScript("OnUpdate")) end -- Replace default's RESET_INSTANCES button with an always working one @@ -174,4 +30,4 @@ pfUI:RegisterModule("player", "vanilla:tbc", function () StaticPopup_Show("CONFIRM_RESET_INSTANCES") end end) -end) +end) \ No newline at end of file