From 85552b5db840fe50cb2d21d232ec25e75167a787 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Mon, 29 Oct 2012 21:21:17 +0400 Subject: [PATCH] Totally forgot about that function Now Show LFR save is working for lvl 90 stuff --- ElvUI_SLE/locales/english.lua | 1 + ElvUI_SLE/locales/russian.lua | 1 + ElvUI_SLE/modules/datatexts/time.lua | 82 ++++++++++++++++++++++++---------- 3 files changed, 61 insertions(+), 23 deletions(-) diff --git a/ElvUI_SLE/locales/english.lua b/ElvUI_SLE/locales/english.lua index 7dd61a8..672f3dd 100644 --- a/ElvUI_SLE/locales/english.lua +++ b/ElvUI_SLE/locales/english.lua @@ -74,6 +74,7 @@ L["Select if the editbox will be above or below chat."] = true --Datatexts-- L["LFR Dragon Soul"] = true +L["LFR Mogu'shan Vaults"] = true L["SLE_AUTHOR_INFO"] = "Shadow & Light Edit by Darth Predator & Repooc" L["SLE_CONTACTS"] = [=[Bug reports, suggestions and other stuff accepted via: - Private Massage on TukUI.org to Darth Predator or Repooc diff --git a/ElvUI_SLE/locales/russian.lua b/ElvUI_SLE/locales/russian.lua index fbb81f4..7b02ed1 100644 --- a/ElvUI_SLE/locales/russian.lua +++ b/ElvUI_SLE/locales/russian.lua @@ -74,6 +74,7 @@ L["Select if the editbox will be above or below chat."] = "Определяет --Datatexts-- L["LFR Dragon Soul"] = "Душа Дракона ЛФР" +L["LFR Mogu'shan Vaults"] = "Подземелья Могу'шан ЛФР" L["SLE_AUTHOR_INFO"] = "Редакция \"Тень и Свет\" от Darth Predator и Repooc" L["SLE_CONTACTS"] = [=[При возникновении вопросов, предложений и прочего обращаться: - Личное сообщение на форуме TukUI (tukui.org), ник Darth Predator или Repooc diff --git a/ElvUI_SLE/modules/datatexts/time.lua b/ElvUI_SLE/modules/datatexts/time.lua index 2896025..c39d6be 100644 --- a/ElvUI_SLE/modules/datatexts/time.lua +++ b/ElvUI_SLE/modules/datatexts/time.lua @@ -124,6 +124,60 @@ local function OnLeave(self) enteredFrame = false; end +local function DragonSoul() + local dungeonId1 = 416 + local dungeonId2 = 417 + GameTooltip:AddLine(" ") + GameTooltip:AddLine(L["LFR Dragon Soul"]) --Instance name + for i =1,4 do --1st part + bossName, texture, isKilled, isIneligible = GetLFGDungeonEncounterInfo(dungeonId1, i); + if ( isKilled ) then + GameTooltip:AddDoubleLine(bossName, BOSS_DEAD, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b); + elseif ( isIneligible ) then + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE_INELIGIBLE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + else + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + end + end + for i =5,8 do --2nd part + bossName, texture, isKilled, isIneligible = GetLFGDungeonEncounterInfo(dungeonId2, i); + if ( isKilled ) then + GameTooltip:AddDoubleLine(bossName, BOSS_DEAD, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b); + elseif ( isIneligible ) then + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE_INELIGIBLE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + else + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + end + end +end + +local function Mogushan() + local dungeonId1 = 527 + local dungeonId2 = 528 + GameTooltip:AddLine(" ") + GameTooltip:AddLine(L["LFR Mogu'shan Vaults"]) --Instance name + for i =1,3 do --1st part + bossName, texture, isKilled, isIneligible = GetLFGDungeonEncounterInfo(dungeonId1, i); + if ( isKilled ) then + GameTooltip:AddDoubleLine(bossName, BOSS_DEAD, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b); + elseif ( isIneligible ) then + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE_INELIGIBLE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + else + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + end + end + for i =4,6 do --2nd part + bossName, texture, isKilled, isIneligible = GetLFGDungeonEncounterInfo(dungeonId2, i); + if ( isKilled ) then + GameTooltip:AddDoubleLine(bossName, BOSS_DEAD, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b); + elseif ( isIneligible ) then + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE_INELIGIBLE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + else + GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); + end + end +end + local function OnEnter(self) DT:SetupTooltip(self) enteredFrame = true; @@ -161,29 +215,11 @@ local function OnEnter(self) if E.db.datatexts.lfrshow then --LFR lockout text - local dungeonId1 = 416 - local dungeonId2 = 417 - GameTooltip:AddLine(" ") - GameTooltip:AddLine(L["LFR Dragon Soul"]) --Instance name - for i =1,4 do --1st part - bossName, texture, isKilled, isIneligible = GetLFGDungeonEncounterInfo(dungeonId1, i); - if ( isKilled ) then - GameTooltip:AddDoubleLine(bossName, BOSS_DEAD, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b); - elseif ( isIneligible ) then - GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE_INELIGIBLE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); - else - GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); - end - end - for i =5,8 do --2nd part - bossName, texture, isKilled, isIneligible = GetLFGDungeonEncounterInfo(dungeonId2, i); - if ( isKilled ) then - GameTooltip:AddDoubleLine(bossName, BOSS_DEAD, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b); - elseif ( isIneligible ) then - GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE_INELIGIBLE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); - else - GameTooltip:AddDoubleLine(bossName, BOSS_ALIVE, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b, GREEN_FONT_COLOR.r, GREEN_FONT_COLOR.g, GREEN_FONT_COLOR.b); - end + local lvl = UnitLevel("player") + if lvl >= 80 and lvl < 86 then + DragonSoul() + elseif lvl >= 86 then + Mogushan() end --LFR lockout end end -- 1.7.9.5