From bd1254abe31951dce22a30a2dd89d0836f48eb39 Mon Sep 17 00:00:00 2001 From: Darth Predator Date: Thu, 3 Nov 2016 22:58:16 +0300 Subject: [PATCH] Trial of Valor LFR --- ElvUI_SLE/defaults/profile.lua | 1 + ElvUI_SLE/modules/lfr.lua | 69 +++++++++++++++++++++++++++++++- ElvUI_SLE/options/datatexts/time_c.lua | 3 +- 3 files changed, 70 insertions(+), 3 deletions(-) diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua index 543320a..9d6f89a 100644 --- a/ElvUI_SLE/defaults/profile.lua +++ b/ElvUI_SLE/defaults/profile.lua @@ -358,6 +358,7 @@ P["sle"] = { }, ["legion"] = { ["nightmare"] = false, + ["trial"] = false, ["palace"] = false, }, }, diff --git a/ElvUI_SLE/modules/lfr.lua b/ElvUI_SLE/modules/lfr.lua index 18971d4..527c0b7 100644 --- a/ElvUI_SLE/modules/lfr.lua +++ b/ElvUI_SLE/modules/lfr.lua @@ -16,6 +16,24 @@ local IsShiftKeyDown = IsShiftKeyDown local bossName, _, isKilled, isIneligible local ExpackColor = "|cff9482c9" +--For 3 boss raid +local function ThreeKill(id) + local killNum = 0 + for i =1,3 do + _, _, isKilled = T.GetLFGDungeonEncounterInfo(id, i); + if (isKilled) then killNum = killNum + 1 end + end + + LFR:BossCount(killNum, 3) +end + +local function ThreeShift(id) + for i =1,3 do --1st part + bossName, _, isKilled, isIneligible = T.GetLFGDungeonEncounterInfo(id, i); + LFR:BossStatus(bossName, isKilled, isIneligible) + end +end + --For 4 boss raid local function FourKill(id) local killNum = 0 @@ -93,6 +111,39 @@ local function SevenShift(id1, id2, id3) LFR:BossStatus(bossName, isKilled, isIneligible) end +-- For Emarald Nightmare +-- What the actual fuck, Blizz? What the fuck is this shit? You can't fucking make all your LFR following the same fucking pattern? +-- Do I need to make an exclusive function or every raid in existance now? +local function NightmareKill(id1, id2, id3) + local killNum = 0 + for i =1,3 do --1st part + _, _, isKilled = T.GetLFGDungeonEncounterInfo(id1, i); + if (isKilled) then killNum = killNum + 1 end + end + for i =1,3 do --2nd part + _, _, isKilled = T.GetLFGDungeonEncounterInfo(id2, i); + if (isKilled) then killNum = killNum + 1 end + end + -- 3rd part + _, _, isKilled = T.GetLFGDungeonEncounterInfo(id3, 1); + if (isKilled) then killNum = killNum + 1 end + LFR:BossCount(killNum, 7) +end + +local function NightmareShift(id1, id2, id3) + for i =1,3 do --1st part + bossName, _, isKilled, isIneligible = T.GetLFGDungeonEncounterInfo(id1, i); + LFR:BossStatus(bossName, isKilled, isIneligible) + end + for i =1,3 do --2nd part + bossName, _, isKilled, isIneligible = T.GetLFGDungeonEncounterInfo(id2, i); + LFR:BossStatus(bossName, isKilled, isIneligible) + end + -- 3rd part + bossName, _, isKilled, isIneligible = T.GetLFGDungeonEncounterInfo(id3, 1); + LFR:BossStatus(bossName, isKilled, isIneligible) +end + --For 8 boss raid local function EightKill(id1, id2) local killNum = 0 @@ -382,9 +433,9 @@ end local function Nightmare() if IsShiftKeyDown() then - SevenShift(1287,1288,1289); + NightmareShift(1287,1288,1289); else - SevenKill(1287,1288,1289); + NightmareKill(1287,1288,1289); end end @@ -396,6 +447,14 @@ local function Suramar() end end +local function Trial() + if IsShiftKeyDown() then + ThreeShift(1411); + else + ThreeKill(1411); + end +end + LFR.Req = { ["Cata"] = {3, 85}, ["MoP"] = {4, 90}, @@ -470,6 +529,12 @@ LFR.Legion = { ["func"] = Nightmare, }, [2] = { + ["name"] = 'trial', + ["ilevel"] = 825, + ["map"] = 1114, + ["func"] = Trial, + }, + [3] = { ["name"] = 'palace', ["ilevel"] = 835, ["map"] = 1088, diff --git a/ElvUI_SLE/options/datatexts/time_c.lua b/ElvUI_SLE/options/datatexts/time_c.lua index 4add8f1..702b838 100644 --- a/ElvUI_SLE/options/datatexts/time_c.lua +++ b/ElvUI_SLE/options/datatexts/time_c.lua @@ -70,7 +70,8 @@ local function configTable() set = function(info, value) E.db.sle.lfr.legion[ info[#info] ] = value; end, args = { nightmare = { order = 1, type = "toggle", name = T.GetMapNameByID(1094) }, - palace = { order = 2, type = "toggle", name = T.GetMapNameByID(1088) }, + trial = { order = 2, type = "toggle", name = T.GetMapNameByID(1114) }, + palace = { order = 3, type = "toggle", name = T.GetMapNameByID(1088) }, }, }, }, -- 1.7.9.5