From: Aleksi Blinnikka Date: Thu, 3 May 2018 23:34:51 +0000 (+0300) Subject: Initial BfA compatibility X-Git-Url: https://www.aleksib.fi/git/wowui.git/commitdiff_plain/c82178bdfc108f95b41c3d0ed88ffe26b834482f?ds=sidebyside;hp=f92b14eeefa36413da849e95271c4180220d658c Initial BfA compatibility Some parts are still to be finished and all aura tables are to be filled. --- diff --git a/OmaAB/ActionBars.lua b/OmaAB/ActionBars.lua index 02bdcb9..4354399 100644 --- a/OmaAB/ActionBars.lua +++ b/OmaAB/ActionBars.lua @@ -67,7 +67,6 @@ local settings = { bar = 5, start = 49, length = 12, - columns = 3, x = 1000, y = 840, }, @@ -118,6 +117,9 @@ local usingBonusbars = { }; local chars = { + ["Sylvanas"] = { + ["Vildana"] = {1, 2, 3, 4,}, + }, ["Stormreaver"] = { ["Vildan"] = {1, 2, 3, 4,}, ["Gedren"] = {1, 2, 3, 4,}, @@ -673,7 +675,7 @@ local events = { end, }; events["LOSS_OF_CONTROL_ADDED"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; -events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; -- TODO might change once tooltips are in +events["LOSS_OF_CONTROL_UPDATE"] = events["ACTIONBAR_UPDATE_COOLDOWN"]; events["PLAYER_MOUNT_DISPLAY_CHANGED"] = events["ACTIONBAR_UPDATE_USABLE"]; events["TRADE_SKILL_SHOW"] = events["ACTIONBAR_UPDATE_STATE"]; events["TRADE_SKILL_CLOSE"] = events["ACTIONBAR_UPDATE_STATE"]; diff --git a/OmaAB/ExpBar.lua b/OmaAB/ExpBar.lua index ca2f5a0..01febef 100644 --- a/OmaAB/ExpBar.lua +++ b/OmaAB/ExpBar.lua @@ -1,4 +1,5 @@ -- ExpBar.lua +if true then return end local _; local min = math.min; local IsResting = IsResting; @@ -12,7 +13,7 @@ local running = false; local frame = CreateFrame("Frame", "OmaExpBar", UIParent); local function expBar() - frame:SetPoint("BOTTOM"); + frame:SetPoint("CENTER"); frame:SetWidth(width); frame:SetHeight(10); frame.base = frame:CreateTexture(nil, "BACKGROUND"); @@ -72,15 +73,15 @@ local function expBar() frame:RegisterEvent("PLAYER_UPDATE_RESTING"); frame:RegisterEvent("PLAYER_ENTERING_WORLD"); -- from FrameXML/MainMenuBar.lua - frame:SetScript("OnEnter", function(frame) frame.text:Show(); ExhaustionToolTipText(); end); - frame:SetScript("OnLeave", function(frame) frame.text:Hide(); GameTooltip:Hide(); end); + frame:SetScript("OnEnter", function(frame) frame.text:Show(); end); + frame:SetScript("OnLeave", function(frame) frame.text:Hide(); end); end frame:RegisterEvent("PLAYER_LOGIN"); frame:SetScript("OnEvent", function(self, event) if event == "PLAYER_LOGIN" then GameTooltip = _G["GameTooltip"]; - if UnitLevel("player") < 110 and not IsXPUserDisabled() then + if UnitLevel("player") < 120 and not IsXPUserDisabled() then return expBar(); end end diff --git a/OmaAB/HideBlizzard.lua b/OmaAB/HideBlizzard.lua index 00b3ab1..4b57e97 100644 --- a/OmaAB/HideBlizzard.lua +++ b/OmaAB/HideBlizzard.lua @@ -1,42 +1,43 @@ -- HideBlizzardAB.lua -local microbuttons = { - CharacterMicroButton, - SpellbookMicroButton, - TalentMicroButton, - AchievementMicroButton, - QuestLogMicroButton, - GuildMicroButton, - LFDMicroButton, - CollectionsMicroButton, - EJMicroButton, - StoreMicroButton, - MainMenuMicroButton, -}; - -local micromenu = nil; -local function moveMicroMenu() - for i, button in ipairs(microbuttons) do - -- TODO save original points to move back to override actionbar - button:SetParent(micromenu); - button:ClearAllPoints(); - if i == 1 then - button:SetPoint("TOPRIGHT"); - else - button:SetPoint("TOPRIGHT", microbuttons[i-1], "BOTTOMRIGHT", 0, 22); - end - end -end -- based on Bartender4 local function hide() -- Hidden parent frame local UIHider = CreateFrame("Frame"); UIHider:Hide(); + local barHolder = CreateFrame("Frame", "OmaStatusBarHolder", UIParent); + barHolder:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, 17); + barHolder:SetWidth(800); + barHolder:SetHeight(20); + function barHolder:OnStatusBarsUpdated() end; + local xpbars = _G["StatusTrackingBarManager"]; + xpbars:SetParent(barHolder); + + UpdateMicroButtonsParent(barHolder); + MoveMicroButtons("TOP", UIParent, "TOP", -120, 0); + MainMenuBar:HookScript("OnShow", function() + UpdateMicroButtonsParent(barHolder); + MoveMicroButtons("TOP", UIParent, "TOP", -120, 0); + end); + + local bags = CreateFrame("Frame", "OmaBags", UIParent); + bags:SetPoint("RIGHT", UIParent, "RIGHT", 0, -100); + bags:SetWidth(1); + bags:SetHeight(1); + bags:Hide(); -- Unhide if bag bar needed + MainMenuBarBackpackButton:SetParent(bags); + MainMenuBarBackpackButton:ClearAllPoints(); + MainMenuBarBackpackButton:SetPoint("RIGHT"); + CharacterBag0Slot:SetParent(bags); + CharacterBag1Slot:SetParent(bags); + CharacterBag2Slot:SetParent(bags); + CharacterBag3Slot:SetParent(bags); + MicroButtonAndBagsBar:Hide(); + MultiBarBottomLeft:SetParent(UIHider); MultiBarBottomRight:SetParent(UIHider); MultiBarLeft:SetParent(UIHider); MultiBarRight:SetParent(UIHider); - -- Hide MultiBar Buttons, but keep the bars alive for i=1,12 do _G["ActionButton" .. i]:Hide(); @@ -59,93 +60,25 @@ local function hide() _G["MultiBarLeftButton" .. i]:UnregisterAllEvents(); _G["MultiBarLeftButton" .. i]:SetAttribute("statehidden", true); end - - micromenu = CreateFrame("Frame", "OmaMicroMenu", UIParent); - micromenu:SetPoint("RIGHT"); - micromenu:SetWidth(1); - micromenu:SetHeight(11*58); - moveMicroMenu(); - hooksecurefunc("UpdateMicroButtons", moveMicroMenu); - OverrideActionBar:HookScript("OnShow", moveMicroMenu); -- TODO have in orig position - OverrideActionBar:HookScript("OnHide", moveMicroMenu); - PetBattleFrame.BottomFrame.MicroButtonFrame:HookScript("OnShow", moveMicroMenu); - PetBattleFrame.BottomFrame.MicroButtonFrame:HookScript("OnHide", moveMicroMenu); - --UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarRight"] = nil; - --UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarLeft"] = nil; - --UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomLeft"] = nil; - --UIPARENT_MANAGED_FRAME_POSITIONS["MultiBarBottomRight"] = nil; UIPARENT_MANAGED_FRAME_POSITIONS["MainMenuBar"] = nil; UIPARENT_MANAGED_FRAME_POSITIONS["StanceBarFrame"] = nil; - UIPARENT_MANAGED_FRAME_POSITIONS["ZoneAbilityFrame"] = nil; - UIPARENT_MANAGED_FRAME_POSITIONS["ExtraActionBarFrame"] = nil; UIPARENT_MANAGED_FRAME_POSITIONS["PossessBarFrame"] = nil; UIPARENT_MANAGED_FRAME_POSITIONS["PETACTIONBAR_YPOS"] = nil; - --MainMenuBar:UnregisterAllEvents(); - --MainMenuBar:Hide(); - --MainMenuBar:SetParent(UIHider); MainMenuBar:EnableMouse(false); - -- TODO vehicle controller handled overridebar and mainmenubar in Bartender, needed? - --local vehicleController = CreateFrame("Frame", nil, nil, "SecureHandlerStateTemplate"); - + MainMenuBar:UnregisterEvent("DISPLAY_SIZE_CHANGED"); + MainMenuBar:UnregisterEvent("UI_SCALE_CHANGED"); local animations = {MainMenuBar.slideOut:GetAnimations()}; animations[1]:SetOffset(0,0); - animations = {OverrideActionBar.slideOut:GetAnimations()}; animations[1]:SetOffset(0,0); - --MainMenuBarArtFrame:UnregisterEvent("PLAYER_ENTERING_WORLD"); - --MainMenuBarArtFrame:UnregisterEvent("BAG_UPDATE"); - --MainMenuBarArtFrame:UnregisterEvent("ACTIONBAR_PAGE_CHANGED"); - --MainMenuBarArtFrame:UnregisterEvent("KNOWN_CURRENCY_TYPES_UPDATE"); - --MainMenuBarArtFrame:UnregisterEvent("CURRENCY_DISPLAY_UPDATE"); - --MainMenuBarArtFrame:UnregisterEvent("ADDON_LOADED"); - --MainMenuBarArtFrame:UnregisterEvent("UNIT_ENTERING_VEHICLE"); - --MainMenuBarArtFrame:UnregisterEvent("UNIT_ENTERED_VEHICLE"); - --MainMenuBarArtFrame:UnregisterEvent("UNIT_EXITING_VEHICLE"); - --MainMenuBarArtFrame:UnregisterEvent("UNIT_EXITED_VEHICLE"); MainMenuBarArtFrame:Hide(); MainMenuBarArtFrame:SetParent(UIHider); - MainMenuExpBar:UnregisterAllEvents(); - MainMenuExpBar:Hide(); - MainMenuExpBar:SetParent(UIHider); - MainMenuExpBar:SetDeferAnimationCallback(nil); - - MainMenuBarMaxLevelBar:Hide(); - MainMenuBarMaxLevelBar:SetParent(UIHider); - - ReputationWatchBar:UnregisterAllEvents(); - ReputationWatchBar:Hide(); - ReputationWatchBar:SetParent(UIHider); - - -- TODO create artifact bar - ArtifactWatchBar:SetParent(UIHider); - ArtifactWatchBar.StatusBar:SetDeferAnimationCallback(nil); - - HonorWatchBar:SetParent(UIHider); - HonorWatchBar.StatusBar:SetDeferAnimationCallback(nil); - - --PossessBarFrame:UnregisterAllEvents(); PossessBarFrame:Hide(); PossessBarFrame:SetParent(UIHider); - ZoneAbilityFrame:ClearAllPoints(); - ZoneAbilityFrame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -450, 150); - ExtraActionBarFrame:ClearAllPoints(); - ExtraActionBarFrame:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -450, 120); - MainMenuBarVehicleLeaveButton:SetParent(UIParent); - MainMenuBarVehicleLeaveButton:ClearAllPoints(); - MainMenuBarVehicleLeaveButton:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -100, 5); - hooksecurefunc("MainMenuBarVehicleLeaveButton_Update", function() - if CanExitVehicle() then - -- TODO check if needed - --MainMenuBarVehicleLeaveButton:ClearAllPoints(); - --MainMenuBarVehicleLeaveButton:SetPoint("BOTTOMRIGHT", UIParent, "BOTTOMRIGHT", -100, 5); - MainMenuBarVehicleLeaveButton:Show(); - end - end); - if PlayerTalentFrame then PlayerTalentFrame:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); else diff --git a/OmaAB/OmaAB.toc b/OmaAB/OmaAB.toc index 9fd465c..ebd6451 100644 --- a/OmaAB/OmaAB.toc +++ b/OmaAB/OmaAB.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma Action Bar ## Version: 1.0 ## Author: schyrio diff --git a/OmaCD/Cooldowns.lua b/OmaCD/Cooldowns.lua index 6e3ce70..9d2f25f 100644 --- a/OmaCD/Cooldowns.lua +++ b/OmaCD/Cooldowns.lua @@ -48,15 +48,9 @@ local trackedcds = { [98008] = 180, -- Spirit Link Totem }, [270] = { -- Mistweaver Monk - [115310] = (180-40), -- Revival, already lowered by Artifact when lvl 75 + [115310] = 180, -- Revival }, }; -local monkRelics = { -- Tendrils of Revival - ["151012"] = -10, - ["151010"] = -10, - ["147112"] = -10, - ["152291"] = -10, -}; local cds = {}; -- CD durations currently available modified by passive cdfixes -- CD fixes active e.g. cdfixes[guid] = -60, no need for spellid as @@ -67,8 +61,6 @@ local runningcds = {}; -- CDs currently active local idToGuid = {}; local guidToId = {}; local guidToSpecid = {}; -local monks = {}; -local monksWithLegendary = {}; local dead = {}; local disconnected = {}; @@ -132,8 +124,6 @@ local function removeFrame(frame) frames[frame.guid][frame.spellid] = nil; if not next(frames[frame.guid]) then frames[frame.guid] = nil end cds[frame.guid][frame.spellid] = nil; - monks[frame.guid] = nil; - monksWithLegendary[frame.guid] = nil; dead[frame.guid] = nil; disconnected[frame.guid] = nil; if runningcds[frame.guid] then runningcds[frame.guid][frame.spellid] = nil end @@ -204,41 +194,6 @@ local function updateUnitCD(guid) end end -local function updateMonk(guid, _, _, weapon, wrist) - local id = guidToId[guid]; - if id then - local _, _, _, relic1, relic2, relic3 = strsplit(":", weapon); - local cdfix = 0; - if monkRelics[relic1] then cdfix = cdfix + monkRelics[relic1] end - if monkRelics[relic2] then cdfix = cdfix + monkRelics[relic2] end - if monkRelics[relic3] then cdfix = cdfix + monkRelics[relic3] end - if cdfix ~= 0 then - cdfixes[guid] = cdfix; - else - cdfixes[guid] = nil; - end - - if wrist == 137096 then -- Petrichor Lagniappe - monksWithLegendary[guid] = true; - else - monksWithLegendary[guid] = nil; - end - monks[guid] = true; - updateUnitCD(guid); - end -end - --- a secondary tick for monks inventory check out of combat -local function monkTick() - if not InCombatLockdown() then - for guid, _ in pairs(monks) do - local id = guidToId[guid]; - if id then OmaInspect.Request(guid, id, updateMonk, true) end - end - end - CTimerAfter(10, monkTick); -end - local function updateDruid(guid, _, talent) local id = guidToId[guid]; if id then @@ -270,11 +225,7 @@ local function updatePlayer() if trackedcds[specid] then guidToId[guid] = "player"; guidToSpecid[guid] = specid; - if specid == 270 then -- Monk - local weapon = GetInventoryItemLink("player", INVSLOT_MAINHAND); - local wrist = GetInventoryItemID("player", INVSLOT_WRIST); - updateMonk(guid, nil, nil, weapon, wrist); - elseif specid == 105 then -- Druid + if specid == 105 then -- Druid local _, _, _, talent = GetTalentInfo(6, 2, 1); updateDruid(guid, nil, talent); else @@ -309,11 +260,6 @@ local function updateUnitid(id) end updateUnitCD(guid); OmaInspect.Request(guid, id, updatePriest); - elseif specs[class] == 270 then - -- Monk, have to check inventory for CD modifications - -- updateUnitCD (without having fixes yet) - updateUnitCD(guid); - OmaInspect.Request(guid, id, updateMonk, true); elseif specs[class] == 105 then -- Druid, have to inspect to get talents -- updateUnitCD (without having fixes yet) @@ -425,11 +371,6 @@ local events = { local frame = frames[guid][spellid]; if frame then CdDown(guid, spellid, GetTime()); - elseif monksWithLegendary[guid] and spellid == 115151 then - -- Renewing Mist with legendary affects Revival - if runningcds[guid] and runningcds[guid][115310] then - runningcds[guid][115310] = runningcds[guid][115310] - 2; - end elseif guidToSpecid[guid] == 257 and spellid == 62618 then -- assumed Holy priest cast Barrier, set to update to Disc guidToSpecid[guid] = 256; @@ -474,12 +415,9 @@ local function cdtracker() cdframe:RegisterEvent("PLAYER_ENTERING_WORLD"); -- initial tick CTimerAfter(0.5, tick); - CTimerAfter(10, monkTick); end -cdframe:RegisterEvent("PLAYER_LOGIN"); cdframe:SetScript("OnEvent", function(self, event) - if event == "PLAYER_LOGIN" then - return cdtracker(); - end + return cdtracker(); end); +cdframe:RegisterEvent("PLAYER_LOGIN"); diff --git a/OmaCD/Inspect.lua b/OmaCD/Inspect.lua index f1d2068..22ef5cb 100644 --- a/OmaCD/Inspect.lua +++ b/OmaCD/Inspect.lua @@ -172,9 +172,7 @@ local function create() tick(); end -frame:RegisterEvent("PLAYER_LOGIN"); frame:SetScript("OnEvent", function(self, event) - if event == "PLAYER_LOGIN" then - return create(); - end + return create(); end); +frame:RegisterEvent("PLAYER_LOGIN"); diff --git a/OmaCD/OmaCD.toc b/OmaCD/OmaCD.toc index 6182dd3..3e61266 100644 --- a/OmaCD/OmaCD.toc +++ b/OmaCD/OmaCD.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma Cooldown Tracker ## Version: 1.0 ## Author: schyrio diff --git a/OmaGtfo/Gtfo.lua b/OmaGtfo/Gtfo.lua index 539673a..10cd002 100644 --- a/OmaGtfo/Gtfo.lua +++ b/OmaGtfo/Gtfo.lua @@ -38,6 +38,19 @@ local function mobId(guid) return nil; end +local function checkDebuff(id) + local i = 1; + while true do + local _, _, _, _, _, _, _, _, _, spell = UnitAura("player", i, "HARMFUL"); + if not spell then + return false; + elseif spell == id then + return true; + end + i = i + 1; + end +end + -- negatingIgnoreTime-like functionality not implemented local events = { ["SPELL_DAMAGE"] = function(event, source, spellid, spellname, _, arg1, arg2) @@ -50,7 +63,7 @@ local events = { local sound = spell.sound; if spell.eventType and spell.eventType ~= event then return end --if (event == "SPELL_MISSED" or event == "SPELL_PERIODIC_MISSED") and not spell.always then return end - if spell.negatingDebuff and UnitDebuff("player", spell.negatingDebuff) then return end + if spell.negatingDebuff and checkDebuff(spell.negatingDebuff) then return end --if spell.negatingBuff and UnitBuff("player", spell.negatingBuff) then return end --if spell.affirmingDebuff and not UnitDebuff("player", spell.affirmingDebuff) then return end --if spell.mobs and source and not spell.mobs[mobId(source)] then return end @@ -140,7 +153,9 @@ local function updateRole() end local realEvents = { - ["COMBAT_LOG_EVENT_UNFILTERED"] = clog, + ["COMBAT_LOG_EVENT_UNFILTERED"] = function() + return clog(CombatLogGetCurrentEventInfo()); + end, ["GROUP_ROSTER_UPDATE"] = updateGuids, ["PLAYER_ROLES_ASSIGNED"] = updateRole, ["MIRROR_TIMER_START"] = function(timer, _, _, scale) diff --git a/OmaGtfo/GtfoSpells.lua b/OmaGtfo/GtfoSpells.lua index ffbea64..28e38f2 100644 --- a/OmaGtfo/GtfoSpells.lua +++ b/OmaGtfo/GtfoSpells.lua @@ -68,7 +68,7 @@ OmaGTFO.DmgTaken = { [199948] = { sound = 1 }, -- Tempest (Channeler Varisz) [195473] = { sound = 1, applicationOnly = true }, -- Abrasive Slime (Gritslime Snail) [191858] = { sound = 1 }, -- Toxic Puddle (Sepentrix) - [193055] = { sound = 1, negatingDebuff = "Gaseous Bubbles" }, -- Call of the Seas + [193055] = { sound = 1, negatingDebuff = 193018 }, -- Call of the Seas -- Neltharion's Lair [202089] = { sound = 3 }, -- Scorch (Burning Geode) [200338] = { sound = 3 }, -- Crystal Wall (Dargrul) @@ -91,7 +91,7 @@ OmaGTFO.DmgTaken = { [198903] = { sound = 1 }, -- Crackling Storm (Storm Drake) [193234] = { sound = 1 }, -- Dancing Blade (Hymdall) [199818] = { sound = 1 }, -- Crackle (Valarjar Thundercaller) - [200682] = { sound = 1, negatingDebuff = "Eye of the Storm" }, -- Eye of the Storm (Solsten) + [200682] = { sound = 1, negatingDebuff = 203963 }, -- Eye of the Storm (Solsten) [193702] = { sound = 1 }, -- Infernal Flames (God-King Skovald) [193827] = { sound = 1 }, -- Ragnarok (God-King Skovald) -- The Arcway @@ -154,7 +154,7 @@ OmaGTFO.DmgTaken = { [198781] = { sound = 3 }, -- Whirling Blade (Kur'talos Ravencrest) [200914] = { sound = 3, tankMechanic = true }, -- Indigestion (Wyrmtongue Scavenger) [200344] = { sound = 1 }, -- Arrow Barrage (Risen Archer) - [221131] = { sound = 1, negatingDebuff = "Arcane Overcharge" }, -- Arcane Overcharge (Archmage Galeorn) + [221131] = { sound = 1, negatingDebuff = 221132 }, -- Arcane Overcharge (Archmage Galeorn) [220922] = { sound = 1 }, -- Overwhelming Release (Archmage Galeorn) [197521] = { sound = 1 }, -- Blazing Trail (Illysanna Ravencrest) [197821] = { sound = 1 }, -- Felblazed Ground (Illysanna Ravencrest) @@ -185,7 +185,7 @@ OmaGTFO.DmgTaken = { [229161] = { sound = 3 }, -- Explosive Shadows (Viz'aduum the Watcher) [229151] = { sound = 3 }, -- Disintegrate (Viz'aduum the Watcher) [227465] = { sound = 1 }, -- Power Discharge (Curator) - [228808] = { sound = 1, negatingDebuff = "Ignite Soul" }, -- Charred Earth (Nightbane) + [228808] = { sound = 1, negatingDebuff = 228796 }, -- Charred Earth (Nightbane) [228001] = { sound = 1 }, -- Pennies From Heaven (Ghostly Philathropist) [227848] = { sound = 1, minStacks = 1, applicationOnly = true }, -- Sacred Ground (Maiden of Virtue) [227473] = { sound = 1 }, -- Whirling Edge (Lord Robin Daris) diff --git a/OmaGtfo/OmaGtfo.toc b/OmaGtfo/OmaGtfo.toc index 86ddffc..7afa23d 100644 --- a/OmaGtfo/OmaGtfo.toc +++ b/OmaGtfo/OmaGtfo.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma GTFO ## Version: 1.0 ## Author: schyrio diff --git a/OmaLog/Logging.lua b/OmaLog/Logging.lua index 093f456..ea0e63e 100644 --- a/OmaLog/Logging.lua +++ b/OmaLog/Logging.lua @@ -7,12 +7,14 @@ local CTimerAfter = C_Timer.After; local frame = CreateFrame("Frame", "OmaLogger"); frame:Hide(); -local minRaidMapID = 1520; +local raidIDs = { +}; --local minDungMapID = 1456; local function shouldLog() local _, zoneType, difficulty, _, _, _, _, mapID = GetInstanceInfo(); - if zoneType == "raid" and mapID >= minRaidMapID then + if zoneType == "raid" then print(mapID) end + if zoneType == "raid" and raidIDs[mapID] then if difficulty == 17 then -- LFR return false; elseif difficulty == 16 then -- Mythic diff --git a/OmaLog/OmaLog.toc b/OmaLog/OmaLog.toc index b3e957d..17ee212 100644 --- a/OmaLog/OmaLog.toc +++ b/OmaLog/OmaLog.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma Autolog ## Version: 1.0 ## Author: schyrio diff --git a/OmaMover/BlizzardMove.lua b/OmaMover/BlizzardMove.lua index fb48a26..5b28b7a 100644 --- a/OmaMover/BlizzardMove.lua +++ b/OmaMover/BlizzardMove.lua @@ -18,7 +18,7 @@ hooksecurefunc("TalkingHead_LoadUI", function() TalkingHeadFrame:SetUserPlaced(true); end); -UIPARENT_MANAGED_FRAME_POSITIONS["CONTAINER_OFFSET_X"] = nil; +--[[UIPARENT_MANAGED_FRAME_POSITIONS["CONTAINER_OFFSET_X"] = nil; UIPARENT_MANAGED_FRAME_POSITIONS["CONTAINER_OFFSET_Y"] = nil; CONTAINER_OFFSET_X = 90; -CONTAINER_OFFSET_Y = 15; +CONTAINER_OFFSET_Y = 15;--]] diff --git a/OmaMover/OmaMover.toc b/OmaMover/OmaMover.toc index 4262e05..30499ec 100644 --- a/OmaMover/OmaMover.toc +++ b/OmaMover/OmaMover.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma Blizzard Frame Mover ## Version: 1.0 ## Author: schyrio diff --git a/OmaPower/AltPower.lua b/OmaPower/AltPower.lua index eeb2c42..c13b368 100644 --- a/OmaPower/AltPower.lua +++ b/OmaPower/AltPower.lua @@ -21,21 +21,21 @@ function f:PLAYER_SPECIALIZATION_CHANGED() if class == "PALADIN" then if GetSpecialization() == 3 then -- ret f:Show(); - f:RegisterUnitEvent("UNIT_POWER", "player"); + f:RegisterUnitEvent("UNIT_POWER_UPDATE", "player"); updatehp[UnitPower("player", ptype)](); else - f:UnregisterEvent("UNIT_POWER"); + f:UnregisterEvent("UNIT_POWER_UPDATE"); f:Hide(); end elseif class == "WARLOCK" then f:Show(); - f:RegisterUnitEvent("UNIT_POWER", "player"); + f:RegisterUnitEvent("UNIT_POWER_UPDATE", "player"); updatehp[UnitPower("player", ptype)](); end end f.PLAYER_ENTERING_WORLD = f.PLAYER_SPECIALIZATION_CHANGED; -function f:UNIT_POWER(_, t) +function f:UNIT_POWER_UPDATE(_, t) if t == "HOLY_POWER" or t == "SOUL_SHARDS" then return updatehp[UnitPower("player", ptype)](); end @@ -73,7 +73,7 @@ function f:PLAYER_LOGIN() end end - f:RegisterUnitEvent("UNIT_POWER", "player"); + f:RegisterUnitEvent("UNIT_POWER_UPDATE", "player"); f:RegisterEvent("PLAYER_ENTERING_WORLD"); f:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED"); end diff --git a/OmaPower/OmaPower.toc b/OmaPower/OmaPower.toc index e9c55f0..2e93780 100644 --- a/OmaPower/OmaPower.toc +++ b/OmaPower/OmaPower.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma Power ## Version: 1.0 ## Author: schyrio diff --git a/OmaRF/Events.lua b/OmaRF/Events.lua index fa6b950..2ffe946 100644 --- a/OmaRF/Events.lua +++ b/OmaRF/Events.lua @@ -181,11 +181,16 @@ M.UpdateHealAbsorb = updateHealAbsorb; local function updateAuras(frame, unit) updateIndicatorAuras(frame, unit); -- this is throttled - if updateMajorAuras(frame, unit) then - if frame.overlay.color ~= overlayColorAlert then + local barColor = updateMajorAuras(frame, unit); + if barColor then + if barColor == true and frame.overlay.color ~= overlayColorAlert then frame.overlay:SetVertexColor(unpack(overlayColorAlert)); frame.overlay.color = overlayColorAlert; frame.overlay:Show(); + elseif barColor ~= true and frame.overlay.color ~= barColor then + frame.overlay:SetVertexColor(unpack(barColor)); + frame.overlay.color = barColor; + frame.overlay:Show(); end elseif UnitDebuff(unit, 1, "RAID") ~= nil then -- something dispellable diff --git a/OmaRF/Indicators.lua b/OmaRF/Indicators.lua index 77b4535..abd52ec 100644 --- a/OmaRF/Indicators.lua +++ b/OmaRF/Indicators.lua @@ -145,7 +145,7 @@ function M.UpdateAuras(frame, unit) local showInds, needUpdate = false, false; local i = 1; while true do - _, _, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "PLAYER HELPFUL"); + _, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "PLAYER HELPFUL"); if not id then break end local pos = watchedAuras[id]; if pos then @@ -177,19 +177,22 @@ function M.UpdateMajorAuras(frame, unit) for _, ind in pairs(frame.majors) do hideInd(ind); end - local icon, count, expires, id; + if UnitIsDeadOrGhost(unit) then return end + local name, icon, count, expires, id; local showMajors, needUpdate = false, false; local majorPos = 1; local alert = false; -- color the whole bar local current = GetTime(); local i = 1; while true do - _, _, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "HARMFUL"); + name, icon, count, _, _, expires, _, _, _, id = UnitAura(unit, i, "HARMFUL"); if not id or majorPos > 3 then break end - local major = majorAuras[id]; + local major = majorAuras[id] or majorAuras[name]; if major then - needUpdate = showInd(frame.majors[majorPos], expires, current, count, icon) or needUpdate; - if major.bar then alert = true end + if not major.noicon then + needUpdate = showInd(frame.majors[majorPos], expires, current, count, icon) or needUpdate; + end + if major.bar then alert = major.bar end showMajors = true; majorPos = majorPos + 1; end diff --git a/OmaRF/OmaRF.toc b/OmaRF/OmaRF.toc index ed7deb5..0227052 100644 --- a/OmaRF/OmaRF.toc +++ b/OmaRF/OmaRF.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma Raid Frame ## Version: 1.0 ## Author: schyrio diff --git a/OmaRF/Settings.lua b/OmaRF/Settings.lua index cdfcbcb..635cbf6 100644 --- a/OmaRF/Settings.lua +++ b/OmaRF/Settings.lua @@ -9,6 +9,30 @@ local charDefaults = { Clickheal = {}, }; local chars = { + ["Sylvanas"] = { + ["Vildana"] = { + AnchorX = 0, + AnchorY = -330, + Clickheal = { + ["type1"] = "spell", + ["type2"] = "spell", + ["shift-type1"] = "spell", + ["shift-type2"] = "spell", + ["ctrl-type1"] = "spell", + ["alt-type2"] = "spell", + ["alt-shift-type1"] = "spell", + ["alt-shift-type2"] = "spell", + ["spell1"] = "Holy Light", + ["spell2"] = "Bestow Faith", + ["shift-spell1"] = "Flash of Light", + ["shift-spell2"] = "Light of the Martyr", + ["ctrl-spell1"] = "Cleanse", + ["alt-spell2"] = "Lay on Hands", + ["alt-shift-spell1"] = "Beacon of Light", + ["alt-shift-spell2"] = "Beacon of Faith", + }, + }, + }, ["Stormreaver"] = { ["Vildan"] = { AnchorX = 0, @@ -93,6 +117,7 @@ local settings = { OverlayColorCharm = {0.8, 0, 1, 0.5}, OverlayColorAlert = {1, 0, 0, 0.5}, MajorAuras = { + -- LEGION -- -- Antorus ["Psychic Assault"] = {bar=false}, ["Everburning Flames"] = {bar=false}, @@ -124,6 +149,14 @@ local settings = { [240559] = {bar=false}, -- Grievous Wound --["Grievous Wound"] = {bar=false}, -- Grievous Wound [240443] = {bar=false}, -- Burst + -- BATTLE FOR AZEROTH -- + -- Uldir + ["Omega Vector"] = {bar={1, 0.5, 0.5, 0.5}, noicon=true}, + ["Gestate"] = {bar=false}, + ["Mutagenic Pathogen"] = {bar=false}, + ["Lingering Infection"] = {bar=false}, + ["Malodorous Miasma"] = {bar=false}, + ["Deadly Disease"] = {bar=false}, }, }; OmaRFSettings = settings; diff --git a/OmaTMW/OmaTMW.toc b/OmaTMW/OmaTMW.toc index f216802..54f668c 100644 --- a/OmaTMW/OmaTMW.toc +++ b/OmaTMW/OmaTMW.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma TellMeWhen ## Version: 1.0 ## Author: schyrio diff --git a/OmaTMW/TellMeWhen.lua b/OmaTMW/TellMeWhen.lua index 2deb9a3..dfea0d5 100644 --- a/OmaTMW/TellMeWhen.lua +++ b/OmaTMW/TellMeWhen.lua @@ -7,7 +7,88 @@ local UnitAura = UnitAura; local GetTotemInfo = GetTotemInfo; -- character specific frames +-- TODO try with auraFilter, remove characters, change to classes +--[[local classes = { + ["PALADIN"] = { + ["PLAYER HELPFUL"] = { + { + unit = "player", + auras = {["Divine Shield"]=1, ""}, + frames = { + [1] = { + x = 0, + y = 0, + width = 1, + height = 1, + }, + }, + }, + }, + }, +}; +local specs = { + [retSpecid] = { + ["PLAYER HELPFUL"] = { + { + unit = "player", + auras = {["Judgment"]=1}, + frames = { + [1] = { + }, + }, + }, + }, + ["PLAYER HARMFUL"] = { + { + }, + }, + }, +}; +--]] local chars = { + ["Sylvanas"] = { + ["Vildana"] = { + { + unit = "target", + spec = 3, -- Retribution + auras = {"Judgment"}, + auraFilter = "PLAYER HARMFUL", + x = 570, -- placed over Innervate frame + y = 440, + width = 80, + height = 80, + }, + { + unit = "player", + spec = 3, -- Retribution + auras = {"Divine Purpose"}, + auraFilter = "PLAYER HELPFUL", + x = 570, + y = 530, + width = 80, + height = 80, + }, + { + unit = "player", + spec = 2, -- Protection + auras = {"Shield of the Righteous"}, + auraFilter = "PLAYER HELPFUL", + x = 570, + y = 440, + width = 80, + height = 80, + }, + { + unit = "player", + auras = {"Divine Shield"}, + auraFilter = "PLAYER HELPFUL", + x = 660, + y = 440, + width = 80, + height = 80, + }, + }, + }, ["Stormreaver"] = { ["Vildan"] = { { @@ -86,7 +167,6 @@ local chars = { -- unit = unitID where to check auras, not required for totem checkers -- spec = player spec index to show frame, if nil show always -- auras = list of auras to track, in priority order --- iterateAuras = iterate over UnitAura() instead of auras list -- auraFilter = filter for UnitAura -- totems = list of totem slots to track, in priority order, only checked if auras is nil -- x = x position relative to UIParent bottom left @@ -112,7 +192,6 @@ local settings = { "Blazing Eruption", "Shattering Scream", "Consuming Hunger", "Unstable Soul", "Time Bomb", "Broken Shard", "Demolished", "Fetid Rot", }, - iterateAuras = true, -- typically fewer debuffs on player than this list auraFilter = "HARMFUL", x = 660, y = 530, @@ -137,52 +216,29 @@ local function updateAuraFrame(frame) if UnitExists(unit) and (not frame.spec or frame.spec == currentSpec) then local name, icon, count, duration, expires; local auraFilter = frame.auraFilter; - if frame.iterateAuras then - local i = 1; - while true do - name, _, icon, count, _, duration, expires = UnitAura(unit, i, auraFilter); - if not name then break end - -- possible improvement to add spellID as an option - if frame.auras[name] then - if count > 0 then - frame.stack:SetText(count); - frame.stack:Show(); - else - frame.stack:Hide(); - end - if expires > 0 then - frame.cd:SetCooldown(expires - duration, duration); - frame.cd:Show(); - else - frame.cd:Hide(); - end - frame.icon:SetTexture(icon); - frame:Show(); - return; + local i = 1; + while true do + name, icon, count, _, duration, expires = UnitAura(unit, i, auraFilter); + if not name then break end + -- possible improvement to add spellID as an option + if frame.auras[name] then + if count > 1 then + frame.stack:SetText(count); + frame.stack:Show(); + else + frame.stack:Hide(); end - i = i + 1; - end - else - for _, aura in pairs(frame.auras) do - name, _, icon, count, _, duration, expires = UnitAura(unit, aura, nil, auraFilter); - if name then - if count > 0 then - frame.stack:SetText(count); - frame.stack:Show(); - else - frame.stack:Hide(); - end - if expires > 0 then - frame.cd:SetCooldown(expires - duration, duration); - frame.cd:Show(); - else - frame.cd:Hide(); - end - frame.icon:SetTexture(icon); - frame:Show(); - return; + if expires > 0 then + frame.cd:SetCooldown(expires - duration, duration); + frame.cd:Show(); + else + frame.cd:Hide(); end + frame.icon:SetTexture(icon); + frame:Show(); + return; end + i = i + 1; end end frame:Hide(); @@ -222,14 +278,11 @@ local function createTMW(name, config, parent) frame:SetPoint("BOTTOMRIGHT", parent, "BOTTOMLEFT", config.x+config.width, config.y); frame.unit = config.unit; frame.spec = config.spec; - frame.iterateAuras = config.iterateAuras; - if frame.iterateAuras then + if config.auras then frame.auras = {}; for _, v in pairs(config.auras) do frame.auras[v] = true; end - else - frame.auras = config.auras; end frame.auraFilter = config.auraFilter; frame.totems = config.totems; diff --git a/OmaUF/Auras.lua b/OmaUF/Auras.lua index 0ca1e0a..f3da677 100644 --- a/OmaUF/Auras.lua +++ b/OmaUF/Auras.lua @@ -102,7 +102,7 @@ function M.UpdateAuras(frame, unit) for _, filter in ipairs(auraFilters) do local i = 1; while true do - _, _, icon, count, _, duration, expires, caster, _, _, id = UnitAura(unit, i, filter); + _, icon, count, _, duration, expires, caster, _, _, id = UnitAura(unit, i, filter); if not id or not auras[pos] then break end local aura = auras[pos]; aura.icon:SetTexture(icon); diff --git a/OmaUF/CastBar.lua b/OmaUF/CastBar.lua index a8382fd..6170513 100644 --- a/OmaUF/CastBar.lua +++ b/OmaUF/CastBar.lua @@ -66,12 +66,12 @@ end local function startCast(bar, unit, channeling) local name, icon, startTime, endTime, noInterrupt, id; if channeling then - name, _, _, icon, startTime, endTime, _, noInterrupt = UnitChannelInfo(unit); + name, _, icon, startTime, endTime, _, noInterrupt = UnitChannelInfo(unit); if not startTime or not endTime then return nil end bar.channeling = true; bar.cast.color = channelingColor; else - _, _, name, icon, startTime, endTime, _, _, noInterrupt, id = UnitCastingInfo(unit); + _, name, icon, startTime, endTime, _, _, noInterrupt, id = UnitCastingInfo(unit); if not startTime or not endTime then return nil end bar.channeling = nil; bar.cast.color = castingColor; diff --git a/OmaUF/Events.lua b/OmaUF/Events.lua index dc44905..03e790c 100644 --- a/OmaUF/Events.lua +++ b/OmaUF/Events.lua @@ -40,7 +40,7 @@ function M.RegisterUnitEvents(frame) frame:RegisterUnitEvent("UNIT_HEALTH_FREQUENT", frame.unit, displayed); frame:RegisterUnitEvent("UNIT_MAXHEALTH", frame.unit, displayed); if frame.mana then - frame:RegisterUnitEvent("UNIT_POWER", frame.unit, displayed); + frame:RegisterUnitEvent("UNIT_POWER_UPDATE", frame.unit, displayed); frame:RegisterUnitEvent("UNIT_MAXPOWER", frame.unit, displayed); frame:RegisterUnitEvent("UNIT_DISPLAYPOWER", frame.unit, displayed); frame:RegisterUnitEvent("UNIT_POWER_BAR_SHOW", frame.unit, displayed); @@ -330,7 +330,7 @@ local eventFuncs = { updateHealthText(frame, frame.displayed); if frame.shield then updateShield(frame, frame.displayed) end end, - ["UNIT_POWER"] = function(frame) + ["UNIT_POWER_UPDATE"] = function(frame) updatePower(frame, frame.displayed); updatePowerText(frame, frame.displayed); end, diff --git a/OmaUF/OmaUF.toc b/OmaUF/OmaUF.toc index 5b08047..de166dc 100644 --- a/OmaUF/OmaUF.toc +++ b/OmaUF/OmaUF.toc @@ -1,4 +1,4 @@ -## Interface: 70300 +## Interface: 80000 ## Title: Oma Unit Frame ## Version: 1.0 ## Author: schyrio diff --git a/OmaUF/Settings.lua b/OmaUF/Settings.lua index c25832a..50f31e2 100644 --- a/OmaUF/Settings.lua +++ b/OmaUF/Settings.lua @@ -12,6 +12,28 @@ local charDefaults = { Clickheal = {}, }; local chars = { + ["Sylvanas"] = { + ["Vildana"] = { + Clickheal = { + ["type1"] = "spell", + ["type2"] = "spell", + ["shift-type1"] = "spell", + ["shift-type2"] = "spell", + ["ctrl-type1"] = "spell", + ["alt-type2"] = "spell", + ["alt-shift-type1"] = "spell", + ["alt-shift-type2"] = "spell", + ["spell1"] = "Holy Light", + ["spell2"] = "Bestow Faith", + ["shift-spell1"] = "Flash of Light", + ["shift-spell2"] = "Light of the Martyr", + ["ctrl-spell1"] = "Cleanse", + ["alt-spell2"] = "Lay on Hands", + ["alt-shift-spell1"] = "Beacon of Light", + ["alt-shift-spell2"] = "Beacon of Faith", + }, + }, + }, ["Stormreaver"] = { ["Vildan"] = { Clickheal = {