From 13dfe649e9ad7a4e22cc9260115ee94dca6ac9cd Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 24 Sep 2013 02:54:12 +0400 Subject: [PATCH] SoO lfr/flex save info for time dt --- ElvUI_SLE/config/profile.lua | 2 + ElvUI_SLE/modules/datatexts/lfr.lua | 699 ++++++++++++++++++------------- ElvUI_SLE/modules/datatexts/options.lua | 17 +- 3 files changed, 415 insertions(+), 303 deletions(-) diff --git a/ElvUI_SLE/config/profile.lua b/ElvUI_SLE/config/profile.lua index 54e476a..328e9be 100755 --- a/ElvUI_SLE/config/profile.lua +++ b/ElvUI_SLE/config/profile.lua @@ -186,6 +186,8 @@ P['sle'] = { ['hof'] = false, ['toes'] = false, ['tot'] = false, + ['soo'] = false, + ['soof'] = false, ['leishen'] = false, }, diff --git a/ElvUI_SLE/modules/datatexts/lfr.lua b/ElvUI_SLE/modules/datatexts/lfr.lua index d97f86d..5d14857 100755 --- a/ElvUI_SLE/modules/datatexts/lfr.lua +++ b/ElvUI_SLE/modules/datatexts/lfr.lua @@ -1,297 +1,402 @@ ---LFR boss status calculations-- -local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore -local DT = E:GetModule('DataTexts') - ---For 4 boss raid -function DT:FourKill(id) - local killNum = 0 - for i =1,4 do - _, _, isKilled = GetLFGDungeonEncounterInfo(id, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - if killNum == 4 then - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/4", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) - else - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/4", 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 - -function DT:FourShift(id) - for i =1,4 do --1st part - bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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 - ---For 6 boss raid -function DT:SixKill(id1, id2) - local killNum = 0 - for i =1,3 do --1st part - _, _, isKilled = GetLFGDungeonEncounterInfo(id1, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - for i =4,6 do --2nd part - _, _, isKilled = GetLFGDungeonEncounterInfo(id2, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - if killNum == 6 then - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/6", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) - else - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/6", 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 - -function DT:SixShift(id1, id2) - for i =1,3 do --1st part - bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id1, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id2, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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 - ---For 8 boss raid -function DT:EightKill(id1, id2) - local killNum = 0 - for i =1,4 do --1st part - _, _, isKilled = GetLFGDungeonEncounterInfo(id1, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - for i =5,8 do --2nd part - _, _, isKilled = GetLFGDungeonEncounterInfo(id2, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - if killNum == 8 then - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/8", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) - else - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/8", 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 - -function DT:EightShift(id1, id2) - for i =1,4 do --1st part - bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id1, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id2, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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 - ---For 12 boss raid -function DT:TwelveKill(id1, id2, id3, id4) - local killNum = 0 - for i =1,3 do --1st part - _, _, isKilled = GetLFGDungeonEncounterInfo(id1, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - for i =4,6 do --2nd part - _, _, isKilled = GetLFGDungeonEncounterInfo(id2, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - for i =7,9 do --3rd part - _, _, isKilled = GetLFGDungeonEncounterInfo(id3, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - for i =10,12 do --4th part - _, _, isKilled = GetLFGDungeonEncounterInfo(id4, i); - if ( isKilled ) then - killNum = killNum + 1 - end - end - if killNum == 12 then - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/12", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) - else - DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/12", 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 - -function DT:TwelveShift(id1, id2, id3, id4) - for i =1,3 do --1st part - bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id1, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id2, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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 =7,9 do --3rd part - bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id3, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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 =10,12 do --4th part - bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id4, i); - if ( isKilled ) then - DT.tooltip: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 - DT.tooltip: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 - DT.tooltip: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 - -function DT:DragonSoul(id1, id2) - if IsShiftKeyDown() then - DT:EightShift(id1, id2) - else - DT:EightKill(id1, id2) - end -end - -function DT:Mogushan(id1, id2) - if IsShiftKeyDown() then - DT:SixShift(id1, id2) - else - DT:SixKill(id1, id2) - end -end - -function DT:HoF(id1, id2) - if IsShiftKeyDown() then - DT:SixShift(id1, id2) - else - DT:SixKill(id1, id2) - end -end - -function DT:ToES(id) - if IsShiftKeyDown() then - DT:FourShift(id) - else - DT:FourKill(id) - end -end - -function DT:ToT(id1, id2, id3, id4) - if IsShiftKeyDown() then - DT:TwelveShift(id1, id2, id3, id4) - else - DT:TwelveKill(id1, id2, id3, id4) - end -end - -function DT:LFRShow() - local lvl = UnitLevel("player") - local ilvl = GetAverageItemLevel() - DT.tooltip:AddLine(" ") - DT.tooltip:AddLine(RAID_FINDER) - if E.db.sle.lfrshow.ds then - DT.tooltip:AddLine(" "..GetMapNameByID(824)) - if lvl == 85 and ilvl >= 372 then - DT:DragonSoul(416, 417) - else - DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) - end - DT.tooltip:AddLine(" ") - end - if E.db.sle.lfrshow.mv then - DT.tooltip:AddLine(" "..GetMapNameByID(896)) - if lvl == 90 and ilvl >= 460 then - DT:Mogushan(527, 528) - else - DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) - end - DT.tooltip:AddLine(" ") - end - - if E.db.sle.lfrshow.hof then - DT.tooltip:AddLine(" "..GetMapNameByID(897)) - if lvl == 90 and ilvl >= 470 then - DT:HoF(529, 530) - else - DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) - end - DT.tooltip:AddLine(" ") - end - - if E.db.sle.lfrshow.toes then - DT.tooltip:AddLine(" "..GetMapNameByID(886)) - if lvl == 90 and ilvl >= 470 then - DT:ToES(526) - else - DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) - end - DT.tooltip:AddLine(" ") - end - - if E.db.sle.lfrshow.tot then - DT.tooltip:AddLine(" "..GetMapNameByID(930)) - if lvl == 90 and ilvl >= 480 then - DT:ToT(610, 611, 612, 613) - else - DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) - end - DT.tooltip:AddLine(" ") - end - if not E.db.sle.lfrshow.ds and not E.db.sle.lfrshow.mv and not E.db.sle.lfrshow.hof and not E.db.sle.lfrshow.toes and not E.db.sle.lfrshow.tot then - DT.tooltip:AddLine(" "..L["You didn't select any instance to track."]) - end -end +--LFR boss status calculations-- +local E, L, V, P, G, _ = unpack(ElvUI); --Inport: Engine, Locales, PrivateDB, ProfileDB, GlobalDB, Localize Underscore +local DT = E:GetModule('DataTexts') + +--For 4 boss raid +function DT:FourKill(id) + local killNum = 0 + for i =1,4 do + _, _, isKilled = GetLFGDungeonEncounterInfo(id, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + if killNum == 4 then + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/4", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) + else + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/4", 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 + +function DT:FourShift(id) + for i =1,4 do --1st part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 + +--For 6 boss raid +function DT:SixKill(id1, id2) + local killNum = 0 + for i =1,3 do --1st part + _, _, isKilled = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =4,6 do --2nd part + _, _, isKilled = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + if killNum == 6 then + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/6", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) + else + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/6", 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 + +function DT:SixShift(id1, id2) + for i =1,3 do --1st part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 + +--For 8 boss raid +function DT:EightKill(id1, id2) + local killNum = 0 + for i =1,4 do --1st part + _, _, isKilled = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =5,8 do --2nd part + _, _, isKilled = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + if killNum == 8 then + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/8", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) + else + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/8", 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 + +function DT:EightShift(id1, id2) + for i =1,4 do --1st part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 + +--For 12 boss raid +function DT:TwelveKill(id1, id2, id3, id4) + local killNum = 0 + for i =1,3 do --1st part + _, _, isKilled = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =4,6 do --2nd part + _, _, isKilled = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =7,9 do --3rd part + _, _, isKilled = GetLFGDungeonEncounterInfo(id3, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =10,12 do --4th part + _, _, isKilled = GetLFGDungeonEncounterInfo(id4, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + if killNum == 12 then + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/12", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) + else + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/12", 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 + +function DT:TwelveShift(id1, id2, id3, id4) + for i =1,3 do --1st part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 =7,9 do --3rd part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id3, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 =10,12 do --4th part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id4, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 + +--For 14 boss raid +function DT:FourteenKill(id1, id2, id3, id4) + local killNum = 0 + for i =1,4 do --1st part + _, _, isKilled = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =5,8 do --2nd part + _, _, isKilled = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =9,11 do --3rd part + _, _, isKilled = GetLFGDungeonEncounterInfo(id3, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + for i =12,14 do --4th part + _, _, isKilled = GetLFGDungeonEncounterInfo(id4, i); + if ( isKilled ) then + killNum = killNum + 1 + end + end + if killNum == 14 then + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/14", RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b, RED_FONT_COLOR.r, RED_FONT_COLOR.g, RED_FONT_COLOR.b) + else + DT.tooltip:AddLine(" "..L["Bosses killed: "]..killNum.."/14", 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 + +function DT:FourteenShift(id1, id2, id3, id4) + for i =1,4 do --1st part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id1, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id2, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 =9,11 do --3rd part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id3, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 =12,14 do --4th part + bossName, _, isKilled, isIneligible = GetLFGDungeonEncounterInfo(id4, i); + if ( isKilled ) then + DT.tooltip: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 + DT.tooltip: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 + DT.tooltip: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 + +function DT:DragonSoul(id1, id2) + if IsShiftKeyDown() then + DT:EightShift(id1, id2) + else + DT:EightKill(id1, id2) + end +end + +function DT:Mogushan(id1, id2) + if IsShiftKeyDown() then + DT:SixShift(id1, id2) + else + DT:SixKill(id1, id2) + end +end + +function DT:HoF(id1, id2) + if IsShiftKeyDown() then + DT:SixShift(id1, id2) + else + DT:SixKill(id1, id2) + end +end + +function DT:ToES(id) + if IsShiftKeyDown() then + DT:FourShift(id) + else + DT:FourKill(id) + end +end + +function DT:ToT(id1, id2, id3, id4) + if IsShiftKeyDown() then + DT:TwelveShift(id1, id2, id3, id4) + else + DT:TwelveKill(id1, id2, id3, id4) + end +end + +function DT:SoO(id1, id2, id3, id4) + if IsShiftKeyDown() then + DT:FourteenShift(id1, id2, id3, id4) + else + DT:FourteenKill(id1, id2, id3, id4) + end +end + +function DT:LFRShow() + local lvl = UnitLevel("player") + local ilvl = GetAverageItemLevel() + DT.tooltip:AddLine(" ") + DT.tooltip:AddLine(RAID_FINDER) + if E.db.sle.lfrshow.ds then + DT.tooltip:AddLine(" "..GetMapNameByID(824)) + if lvl == 85 and ilvl >= 372 then + DT:DragonSoul(416, 417) + else + DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) + end + DT.tooltip:AddLine(" ") + end + if E.db.sle.lfrshow.mv then + DT.tooltip:AddLine(" "..GetMapNameByID(896)) + if lvl == 90 and ilvl >= 460 then + DT:Mogushan(527, 528) + else + DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) + end + DT.tooltip:AddLine(" ") + end + + if E.db.sle.lfrshow.hof then + DT.tooltip:AddLine(" "..GetMapNameByID(897)) + if lvl == 90 and ilvl >= 470 then + DT:HoF(529, 530) + else + DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) + end + DT.tooltip:AddLine(" ") + end + + if E.db.sle.lfrshow.toes then + DT.tooltip:AddLine(" "..GetMapNameByID(886)) + if lvl == 90 and ilvl >= 470 then + DT:ToES(526) + else + DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) + end + DT.tooltip:AddLine(" ") + end + + if E.db.sle.lfrshow.tot then + DT.tooltip:AddLine(" "..GetMapNameByID(930)) + if lvl == 90 and ilvl >= 480 then + DT:ToT(610, 611, 612, 613) + else + DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) + end + DT.tooltip:AddLine(" ") + end + + if E.db.sle.lfrshow.soo then + DT.tooltip:AddLine(" "..GetMapNameByID(953)) + if lvl == 90 and ilvl >= 496 then + DT:SoO(716, 717, 724, 725) + else + DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) + end + DT.tooltip:AddLine(" ") + end + + if E.db.sle.lfrshow.soof then + DT.tooltip:AddLine(" "..FLEX_RAID.." "..GetMapNameByID(953)) + if lvl == 90 then + DT:SoO(726, 728, 729, 730) + else + DT.tooltip:AddLine(" "..L["This LFR isn't available for your level/gear."]) + end + DT.tooltip:AddLine(" ") + end + if not E.db.sle.lfrshow.ds and not E.db.sle.lfrshow.mv and not E.db.sle.lfrshow.hof and not E.db.sle.lfrshow.toes and not E.db.sle.lfrshow.tot and not E.db.sle.lfrshow.soo and not E.db.sle.lfrshow.soof then + DT.tooltip:AddLine(" "..L["You didn't select any instance to track."]) + end +end diff --git a/ElvUI_SLE/modules/datatexts/options.lua b/ElvUI_SLE/modules/datatexts/options.lua index 6bb325e..4991f8a 100755 --- a/ElvUI_SLE/modules/datatexts/options.lua +++ b/ElvUI_SLE/modules/datatexts/options.lua @@ -334,7 +334,7 @@ E.Options.args.sle.args.sldatatext = { order = 1, type = "toggle", name = L["LFR Lockout"], - desc = L["Show/Hide LFR lockdown info in time datatext's tooltip."], + desc = L["Show/Hide LFR lockout info in time datatext's tooltip."], get = function(info) return E.db.sle.lfrshow.enabled end, set = function(info, value) E.db.sle.lfrshow.enabled = value; end }, @@ -350,31 +350,36 @@ E.Options.args.sle.args.sldatatext = { order = 1, type = "toggle", name = GetMapNameByID(824), - desc = L["Show/Hide LFR lockdown info in time datatext's tooltip."], }, mv = { order = 2, type = "toggle", name = GetMapNameByID(896), - desc = L["Show/Hide LFR lockdown info in time datatext's tooltip."], }, hof = { order = 3, type = "toggle", name = GetMapNameByID(897), - desc = L["Show/Hide LFR lockdown info in time datatext's tooltip."], }, toes = { order = 4, type = "toggle", name = GetMapNameByID(886), - desc = L["Show/Hide LFR lockdown info in time datatext's tooltip."], }, tot = { order = 5, type = "toggle", name = GetMapNameByID(930), - desc = L["Show/Hide LFR lockdown info in time datatext's tooltip."], + }, + soo = { + order = 6, + type = "toggle", + name = GetMapNameByID(953), + }, + soof = { + order = 7, + type = "toggle", + name = FLEX_RAID.." "..GetMapNameByID(953), }, }, }, -- 1.7.9.5