diff --git a/api/config.lua b/api/config.lua index eb8178a2..d8139017 100644 --- a/api/config.lua +++ b/api/config.lua @@ -827,7 +827,6 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("chat", "text", "detecturl", "1") pfUI:UpdateConfig("chat", "text", "classcolor", "1") pfUI:UpdateConfig("chat", "text", "playericons", "0") - pfUI:UpdateConfig("chat", "text", "whosearchunknown", "0") pfUI:UpdateConfig("chat", "text", "playerlevel", "0") pfUI:UpdateConfig("chat", "left", "width", "380") pfUI:UpdateConfig("chat", "left", "height", "180") diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index 04a88d6e..a54f253c 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -872,7 +872,6 @@ pfUI_translation["deDE"] = { ["Website"] = nil, ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = nil, ["Whitelist"] = nil, - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = nil, ["Wobble Zoom"] = nil, ["Won"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index c9e86221..d184fc9b 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -900,7 +900,6 @@ pfUI_translation["enUS"] = { ["Website"] = nil, ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = nil, ["Whitelist"] = nil, - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = nil, ["Wobble Zoom"] = nil, ["Won"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index 8aa37e7f..9075afa5 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -872,7 +872,6 @@ pfUI_translation["esES"] = { ["Website"] = "Sitio de web", ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = "¡Bienvenido a |cff33ffccpf|cffffffffUI|r!\n\nSoy el asistente de instalación que te guiará con la configuración básica. Si prefieres, puedes hacer clic el botón \"Predeterminado\" para cargar la configuración por defecto. Si quieres abrir este diálogo de nuevo, ve a la configuración y haz clic en el botón \"Reiniciar Primera vez\".\n\nVisita |cff33ffcc%s|r para descargar la última versión.", ["Whitelist"] = "Lista blanca", - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = "Ancho", ["Wobble Zoom"] = "Acerca tambalea", ["Won"] = "Ganado", diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index ec535916..a4b9b542 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -872,7 +872,6 @@ pfUI_translation["frFR"] = { ["Website"] = "Site web", ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = "Bienvenue sur l'assistant d'installation de l'interface |cff33ffccpf|cffffffffUI|r!\n\nNous allons effectuer quelques configurations de base. Si vous n'avez pas la patience, cliquer sur le bouton \"Paramètres par défaut\". Si vous souhaitez relancer cette fenêtre de dialogue, allez dans les options et cliquez sur le bouton\"Réinitialiser l'assistant d'installation\" .\n\nAllez sur |cff33ffcc%s|r pour télécharger la dernière version.", ["Whitelist"] = "List blanche", - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = "Largeur", ["Wobble Zoom"] = "Zoom oscillant", ["Won"] = "A gagné", diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index a7cfc6fa..48d9f09b 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -872,7 +872,6 @@ pfUI_translation["koKR"] = { ["Website"] = nil, ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = "|cff33ffccpf|cffffffffUI|r에 |cff33ffcc오신걸 환영합니다.|r \n\n저는 몇 가지 기본 구성을 안내 할 첫 번째 실행 위자드입니다. 모든 단계를 건너 뛰고 싶으시면 \"기본값 사용\" 버튼을 누르십시오. 이 대화 상자를 다시 실행하려면 추후 설정으로 이동하여 \"첫단계로 재설정\" 버튼을 누르십시오.\n\n최신버전 다운로드 사이트: |cff33ffcc%s|r", ["Whitelist"] = nil, - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = nil, ["Wobble Zoom"] = nil, ["Won"] = nil, diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index 71b59b2d..d7f43ec6 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -872,7 +872,6 @@ pfUI_translation["ruRU"] = { ["Website"] = "Веб-сайт", ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = "Добро пожаловать в |cff33ffccpf|cffffffffUI|r!\n\nЯ мастер первого запуска, который проведет вас через некоторую базовую конфигурацию. Если вы ленитесь, не стесняйтесь нажать кнопку \"По умолчанию\". Если вы хотите снова запустить этот диалог, перейдите к настройкам и нажмите кнопку \"Первый запуск\".\n\nПосетите |cff33ffcc%s|r, чтобы проверить последнюю версию.", ["Whitelist"] = "\"Белый\" список", - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = "Ширина", ["Wobble Zoom"] = "Подпрыгивание", ["Won"] = "Победа", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index 03afa2aa..76fed560 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -873,7 +873,6 @@ pfUI_translation["zhCN"] = { ["Website"] = "网站", ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = "欢迎使用 |cff33ffccpf|cffffffffUI|r! \n\n这是第一次运行向导,将引导您完成一些基本配置。 如果你想跳过所有步骤\"使用默认\"按钮。 如果您再次运行此对话框,请转到设置并点击 \"Reset Firstrun\" 按钮。\n\n访问 |cff33ffcc%s|r 检查最新版本。", ["Whitelist"] = "白名单", - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = "宽度", ["Wobble Zoom"] = "摆动变焦", ["Won"] = "获胜", diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index 361abd11..9bf304ff 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -872,7 +872,6 @@ pfUI_translation["zhTW"] = { ["Website"] = nil, ["Welcome to |cff33ffccpf|cffffffffUI|r!\n\nI'm the first run wizard that will guide you through some basic configuration. If you're lazy, feel free to hit the \"Defaults\" button. If you wish to run this dialog again, go to the settings and hit the \"Reset Firstrun\" button.\n\nVisit |cff33ffcc%s|r to check for the latest version."] = "歡迎使用 |cff33ffccpf|cffffffffUI|r! \n\n這是第一次運行嚮導,將引導您完成一些基本配置。 如果你想跳過所有步驟\"使用預設\"按鈕。 如果您再次運行此對話方塊,請轉到設置並點擊 \"Reset Firstrun\" 按鈕。\n\n訪問 |cff33ffcc%s|r 檢查最新版本。", ["Whitelist"] = "白名單", - ["Who Search Unknown Classes (|cffffaaaaExperimental|r)"] = nil, ["Width"] = nil, ["Wobble Zoom"] = nil, ["Won"] = nil, diff --git a/modules/chat.lua b/modules/chat.lua index 19493cd6..2af13638 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -782,16 +782,6 @@ pfUI:RegisterModule("chat", function () local r,g,b = GetStringColor(C.chat.text.unknowncolor) local unknowncolorhex = rgbhex(r,g,b) - -- Suppress FriendsFrame's WHO_LIST_UPDATE handling for our DLL-issued - -- name lookups so they don't pop the friends panel. User-issued /who - -- still works because IsWhoQueryPending only reports true for queries - -- issued via C_FriendList.SendWhoQueryByName. - local original_FriendsFrame_OnEvent = FriendsFrame_OnEvent - _G.FriendsFrame_OnEvent = function() - if _G.event == "WHO_LIST_UPDATE" and C_FriendList.IsWhoQueryPending() then return end - return original_FriendsFrame_OnEvent() - end - local function GetPlayerLevel(name) if not pfUI_playerDB then return nil end if not pfUI_playerDB[name] then return nil end @@ -823,25 +813,31 @@ pfUI:RegisterModule("chat", function () -- display class colors if already indexed if C.chat.text.classcolor == "1" then + -- the engine name-queries a chat sender before the event fires, + -- so the sender's GUID always resolves; other names in the text + -- fall back to the name-keyed lookups + local guid = GetCurrentChatGUID() + local _, senderClass, _, senderRace, senderSex, senderName + if guid then + _, senderClass, _, senderRace, senderSex, senderName = GetPlayerInfoByGUID(guid) + end + for name in gfind(text, "|Hplayer:(.-)|h") do local real, _ = strsplit(":", name) local color = unknowncolorhex local match = false - local _, class, _, raceKey, sex = C_PlayerCache.GetPlayerInfoByName(real) - -- local guid = GetCurrentChatGUID() - -- if guid then - -- _, class = GetPlayerInfoByGUID(guid) - -- end + local class, raceKey, sex + if real == senderName then + class, raceKey, sex = senderClass, senderRace, senderSex + else + _, class, _, raceKey, sex = C_PlayerCache.GetPlayerInfoByName(real) + end if not class then class = GetUnitInfo(real) end - if class then - if class ~= UNKNOWN then - color = "|c" .. PFUI_CLASS_COLORS[class].colorStr - match = true - end - elseif C.chat.text.whosearchunknown == "1" then - C_FriendList.SendWhoQueryByName(name) -- cooldown + state managed by DLL + if class and class ~= UNKNOWN then + color = "|c" .. PFUI_CLASS_COLORS[class].colorStr + match = true end if C.chat.text.tintunknown == "1" or match then diff --git a/modules/gui.lua b/modules/gui.lua index 915c2388..29e1a60d 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2881,7 +2881,6 @@ pfUI:RegisterModule("gui", function () CreateConfig(nil, T["Enable Class Colors"], C.chat.text, "classcolor", "checkbox") CreateConfig(nil, T["Show Faction & Race Icons"] .. " " .. GetPlayerRaceIcons(), C.chat.text, "playericons", "checkbox") CreateConfig(nil, T["Enable Player Levels"], C.chat.text, "playerlevel", "checkbox") - CreateConfig(nil, T["Who Search Unknown Classes (|cffffaaaaExperimental|r)"], C.chat.text, "whosearchunknown", "checkbox") CreateConfig(nil, T["Colorize Unknown Classes"], C.chat.text, "tintunknown", "checkbox") CreateConfig(nil, T["Unknown Class Color"], C.chat.text, "unknowncolor", "color") CreateConfig(nil, T["Left Chat Width"], C.chat.left, "width")