From 4a1936028ed578a0f3a1b6ce9563b575b7cf39a0 Mon Sep 17 00:00:00 2001 From: BanditTech Date: Wed, 9 Nov 2022 22:23:47 -0800 Subject: [PATCH] Correct Lockout Datatext abbreviations (#11) * show wintergrasp when WotLK expact active * Add middle click function to show raid info panel --- ElvUI/Locales/deDE.lua | 6 ++++- ElvUI/Locales/enUS.lua | 6 ++++- ElvUI/Locales/esMX.lua | 6 ++++- ElvUI/Locales/frFR.lua | 6 ++++- ElvUI/Locales/koKR.lua | 6 ++++- ElvUI/Locales/ptBR.lua | 6 ++++- ElvUI/Locales/ruRU.lua | 6 ++++- ElvUI/Locales/zhCN.lua | 6 ++++- ElvUI/Locales/zhTW.lua | 6 ++++- ElvUI/Modules/DataTexts/Time.lua | 40 +++++++++++++++++++------------- 10 files changed, 69 insertions(+), 25 deletions(-) diff --git a/ElvUI/Locales/deDE.lua b/ElvUI/Locales/deDE.lua index 12bd1e5..3147faf 100644 --- a/ElvUI/Locales/deDE.lua +++ b/ElvUI/Locales/deDE.lua @@ -317,6 +317,10 @@ L["silverabbrev"] = "|cffc7c7cfs|r" L["whispers"] = "flüstern" L["yells"] = "schreien" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "|cFFE30000Lua Fehler erhalten. Du kannst die Fehlermeldung ansehen, wenn du den Kampf verlässt." +L["PLAYER_DIFFICULTY1"] = "Normal" +L["PLAYER_DIFFICULTY2"] = "Heroisch" +L["PLAYER_DIFFICULTY3"] = "Mythisch" +L["PLAYER_DIFFICULTY4"] = "Aufgestiegen" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333Eingeschaltet|r" @@ -328,4 +332,4 @@ Options: Rechtsklick - Öffnet Konfigurationsbereich. Shift + Rechtsklick - Blendet den Anker vorübergehend aus. Strg + Rechtsklick - Setzt den Anker auf Ursprungsposition zurück. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/enUS.lua b/ElvUI/Locales/enUS.lua index 0b55763..edf94ca 100644 --- a/ElvUI/Locales/enUS.lua +++ b/ElvUI/Locales/enUS.lua @@ -319,6 +319,10 @@ L["silverabbrev"] = "|cffc7c7cfs|r" L["whispers"] = true L["yells"] = true L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = true +L["PLAYER_DIFFICULTY1"] = "Normal" +L["PLAYER_DIFFICULTY2"] = "Heroic" +L["PLAYER_DIFFICULTY3"] = "Mythic" +L["PLAYER_DIFFICULTY4"] = "Ascended" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333Enable|r" @@ -330,4 +334,4 @@ Options: RightClick - Open Config Section. Shift + RightClick - Hides mover temporarily. Ctrl + RightClick - Resets mover position to default. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/esMX.lua b/ElvUI/Locales/esMX.lua index 7343041..5681963 100644 --- a/ElvUI/Locales/esMX.lua +++ b/ElvUI/Locales/esMX.lua @@ -317,6 +317,10 @@ L["silverabbrev"] = "|cffc7c7cfs|r" L["whispers"] = "susurra" L["yells"] = "grita" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "|cFFE30000Error de Lua recibido. Podrás ver el error cuando salgas de combate." +L["PLAYER_DIFFICULTY1"] = "Normal" +L["PLAYER_DIFFICULTY2"] = "Heroic" +L["PLAYER_DIFFICULTY3"] = "Mythic" +L["PLAYER_DIFFICULTY4"] = "Ascended" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333Habilitar|r" @@ -327,4 +331,4 @@ Opciones: Clic Derecho - Abrir la sección de configuración. Shift + Clic Derecho - Ocultar los fijadores temporalmente. Ctrl + Clic Derecho - Restablece la posición de los fijadores a los valores por defecto. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/frFR.lua b/ElvUI/Locales/frFR.lua index 946bdb8..0823026 100644 --- a/ElvUI/Locales/frFR.lua +++ b/ElvUI/Locales/frFR.lua @@ -317,6 +317,10 @@ L["silverabbrev"] = "|cffc7c7cfs|r" L["whispers"] = "chuchote" L["yells"] = "crie" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "|cFFE30000Erreur Lua reçue. Vous pouvez voir ce message d'erreur quand vous sortirez de combat." +L["PLAYER_DIFFICULTY1"] = "Normal" +L["PLAYER_DIFFICULTY2"] = "Héroïque" +L["PLAYER_DIFFICULTY3"] = "Mythique" +L["PLAYER_DIFFICULTY4"] = "Ascensionné" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333Activer|r" @@ -328,4 +332,4 @@ Options: Clic Droit - Open Config Section. Shift + clic droit - Cacher temporairement. Ctrl + clic droit - Réinitialiser la position par défaut. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/koKR.lua b/ElvUI/Locales/koKR.lua index b71bf9b..57b34ba 100644 --- a/ElvUI/Locales/koKR.lua +++ b/ElvUI/Locales/koKR.lua @@ -317,6 +317,10 @@ L["silverabbrev"] = "|TInterface\\MoneyFrame\\UI-MoneyIcons:0:0:1:0:64:16:17:32: L["whispers"] = "귓" L["yells"] = "외침" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "Lua 에러가 발생하였습니다. 전투가 끝난 후에 내역을 표시하겠습니다." +L["PLAYER_DIFFICULTY1"] = "일반" +L["PLAYER_DIFFICULTY2"] = "영웅" +L["PLAYER_DIFFICULTY3"] = "신화" +L["PLAYER_DIFFICULTY4"] = "승천" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333사용|r" @@ -328,4 +332,4 @@ L["DESC_MOVERCONFIG"] = [=[프레임을 드래그로 원하는 위치로 이동 우클릭 - Open Config Section. Shift + 우클릭 - 조정자를 일시적으로 숨깁니다. Ctrl + 우클릭 - 조정자의 위치를 기본값으로 초기화합니다. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/ptBR.lua b/ElvUI/Locales/ptBR.lua index a5c122d..fce964e 100644 --- a/ElvUI/Locales/ptBR.lua +++ b/ElvUI/Locales/ptBR.lua @@ -318,6 +318,10 @@ L["silverabbrev"] = "|cffc7c7cfs|r" L["whispers"] = "sussurra" L["yells"] = "grita" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "|cFFE30000Erro Lua recebido. Pode ver a mensagem de erro quando sair de combate" +L["PLAYER_DIFFICULTY1"] = "Normal" +L["PLAYER_DIFFICULTY2"] = "Heroico" +L["PLAYER_DIFFICULTY3"] = "Mítico" +L["PLAYER_DIFFICULTY4"] = "Ascensionado" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333Ativar|r" @@ -328,4 +332,4 @@ Options: RightClick - Open Config Section. Shift + RightClick - Hides mover temporarily. Ctrl + RightClick - Resets mover position to default. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/ruRU.lua b/ElvUI/Locales/ruRU.lua index cc4949c..96cffe8 100644 --- a/ElvUI/Locales/ruRU.lua +++ b/ElvUI/Locales/ruRU.lua @@ -317,6 +317,10 @@ L["silverabbrev"] = "|cffc7c7cfс|r" L["whispers"] = "шепчет" L["yells"] = "кричит" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "|cFFE30000Обнаружена ошибка lua. Вы получите отчет о ней после завершения боя." +L["PLAYER_DIFFICULTY1"] = "Обычный" +L["PLAYER_DIFFICULTY2"] = "Героический" +L["PLAYER_DIFFICULTY3"] = "мифик" +L["PLAYER_DIFFICULTY4"] = "Вознесенный" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333Включить|r" @@ -327,4 +331,4 @@ Options: RightClick - Open Config Section. Shift + RightClick - Hides mover temporarily. Ctrl + RightClick - Resets mover position to default. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/zhCN.lua b/ElvUI/Locales/zhCN.lua index ef505d4..d2cbe8a 100644 --- a/ElvUI/Locales/zhCN.lua +++ b/ElvUI/Locales/zhCN.lua @@ -317,6 +317,10 @@ L["silverabbrev"] = "|cffc7c7cf银|r" L["whispers"] = "密语" L["yells"] = "大喊" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "|cFFE30000LUA错误已接收, 你可以在脱离战斗后检查.|r" +L["PLAYER_DIFFICULTY1"] = "普通" +L["PLAYER_DIFFICULTY2"] = "英雄" +L["PLAYER_DIFFICULTY3"] = "神话" +L["PLAYER_DIFFICULTY4"] = "扬升" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333启用|r" @@ -328,4 +332,4 @@ L["DESC_MOVERCONFIG"] = [=[解除框架移动锁定. 现在可以移动它们, 右键 - 打开配置窗口. Shift + 右键 - 暂时隐藏定位开关 Ctrl + 右键 - 重置定位开关位置 -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Locales/zhTW.lua b/ElvUI/Locales/zhTW.lua index 2aee1ac..4c738d4 100644 --- a/ElvUI/Locales/zhTW.lua +++ b/ElvUI/Locales/zhTW.lua @@ -317,6 +317,10 @@ L["silverabbrev"] = "|cffc7c7cf銀|r" L["whispers"] = "密語" L["yells"] = "大喊" L["|cFFE30000Lua error recieved. You can view the error message when you exit combat."] = "|cFFE30000接收到了Lua錯誤, 你可以在脫離戰鬥後檢查.|r" +L["PLAYER_DIFFICULTY1"] = "普通模式" +L["PLAYER_DIFFICULTY2"] = "英雄模式" +L["PLAYER_DIFFICULTY3"] = "神話模式" +L["PLAYER_DIFFICULTY4"] = "揚升模式" ---------------------------------- L["RED_ENABLE"] = "|cFFff3333啟用|r" @@ -327,4 +331,4 @@ L["DESC_MOVERCONFIG"] = [=[解除框架移動鎖定. 現在可以移動它們, 右鍵 - 開啟對應設定. Shift + 右鍵 - 暫時隱藏定位器. Ctrl + 右鍵 - 重置定位器位置到預設值. -]=] \ No newline at end of file +]=] diff --git a/ElvUI/Modules/DataTexts/Time.lua b/ElvUI/Modules/DataTexts/Time.lua index 01074d0..8854b9c 100644 --- a/ElvUI/Modules/DataTexts/Time.lua +++ b/ElvUI/Modules/DataTexts/Time.lua @@ -39,10 +39,10 @@ local numSavedInstances = 0 local locale = GetLocale() local krcntw = locale == "koKR" or locale == "zhCN" or locale == "zhTW" local difficultyTag = { -- Normal, Normal, Heroic, Heroic - (krcntw and PLAYER_DIFFICULTY1) or utf8sub(PLAYER_DIFFICULTY1, 1, 1), -- N - (krcntw and PLAYER_DIFFICULTY1) or utf8sub(PLAYER_DIFFICULTY1, 1, 1), -- N - (krcntw and PLAYER_DIFFICULTY2) or utf8sub(PLAYER_DIFFICULTY2, 1, 1), -- H - (krcntw and PLAYER_DIFFICULTY2) or utf8sub(PLAYER_DIFFICULTY2, 1, 1), -- H + (krcntw and L["PLAYER_DIFFICULTY1"]) or utf8sub(L["PLAYER_DIFFICULTY1"], 1, 1), -- N + (krcntw and L["PLAYER_DIFFICULTY2"]) or utf8sub(L["PLAYER_DIFFICULTY2"], 1, 1), -- H + (krcntw and L["PLAYER_DIFFICULTY3"]) or utf8sub(L["PLAYER_DIFFICULTY3"], 1, 1), -- M + (krcntw and L["PLAYER_DIFFICULTY4"]) or utf8sub(L["PLAYER_DIFFICULTY4"], 1, 1), -- A } local function getRealmTimeDiff() @@ -119,6 +119,12 @@ local function OnClick(_, btn) LoadAddOn("Blizzard_TimeManager") end TimeManagerClockButton_OnClick(TimeManagerClockButton) + elseif btn == "MiddleButton" then + if not RaidInfoFrame:IsVisible() then + FriendsFrame:Show() + FriendsFrameTab5:Click() + RaidInfoFrame:Show() + end else GameTimeFrame:Click() end @@ -137,17 +143,19 @@ local function OnEnter(self, skipRequest) GetInstanceImages(CalendarEventGetTextures(2)) end - local wgtime = GetWintergraspWaitTime() - local _, instanceType = IsInInstance() - if instanceType ~= "none" then - wgtime = QUEUE_TIME_UNAVAILABLE - elseif wgtime == nil then - wgtime = WINTERGRASP_IN_PROGRESS - else - wgtime = SecondsToTime(wgtime, false, nil, 3) - end + if GetExpansionLevel() >= 2 then -- Check for WOTLK active + local wgtime = GetWintergraspWaitTime() + local _, instanceType = IsInInstance() + if instanceType ~= "none" then + wgtime = QUEUE_TIME_UNAVAILABLE + elseif wgtime == nil then + wgtime = WINTERGRASP_IN_PROGRESS + else + wgtime = SecondsToTime(wgtime, false, nil, 3) + end - DT.tooltip:AddDoubleLine(L["Wintergrasp"], wgtime, 1, 1, 1, lockoutColorNormal.r, lockoutColorNormal.g, lockoutColorNormal.b) + DT.tooltip:AddDoubleLine(L["Wintergrasp"], wgtime, 1, 1, 1, lockoutColorNormal.r, lockoutColorNormal.g, lockoutColorNormal.b) + end if numSavedInstances > 0 then wipe(lockedInstances.raids) @@ -159,7 +167,7 @@ local function OnEnter(self, skipRequest) name, _, reset, difficulty, locked, extended, _, isRaid, maxPlayers = GetSavedInstanceInfo(i) if name and (locked or extended) then - difficultyLetter = difficultyTag[not isRaid and (difficulty == 2 and 3 or 1) or difficulty] + difficultyLetter = difficultyTag[difficulty and difficulty or 1] buttonImg = format("|T%s%s:22:22:0:0:96:96:0:64:0:64|t ", "Interface\\LFGFrame\\LFGIcon-", instanceIconByName[name] or "Raid") if isRaid then @@ -272,4 +280,4 @@ local function ValueColorUpdate(hex) end E.valueColorUpdateFuncs[ValueColorUpdate] = true -DT:RegisterDatatext("Time", {"UPDATE_INSTANCE_INFO"}, OnEvent, OnUpdate, OnClick, OnEnter, OnLeave) \ No newline at end of file +DT:RegisterDatatext("Time", {"UPDATE_INSTANCE_INFO"}, OnEvent, OnUpdate, OnClick, OnEnter, OnLeave)