diff --git a/ElvUI_SLE/modules/databars/artifact.lua b/ElvUI_SLE/modules/databars/artifact.lua index 2d6e960..289b029 100644 --- a/ElvUI_SLE/modules/databars/artifact.lua +++ b/ElvUI_SLE/modules/databars/artifact.lua @@ -1,6 +1,6 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DB = SLE:GetModule("DataBars") - +--GLOBALS: hooksecurefunc local HasArtifactEquipped = HasArtifactEquipped local MainMenuBar_GetNumArtifactTraitsPurchasableFromXP = MainMenuBar_GetNumArtifactTraitsPurchasableFromXP local C_ArtifactUIGetEquippedArtifactInfo = C_ArtifactUI.GetEquippedArtifactInfo diff --git a/ElvUI_SLE/modules/databars/databars.lua b/ElvUI_SLE/modules/databars/databars.lua index d962ba7..5658ea4 100644 --- a/ElvUI_SLE/modules/databars/databars.lua +++ b/ElvUI_SLE/modules/databars/databars.lua @@ -1,6 +1,6 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DB = SLE:NewModule("DataBars","AceHook-3.0", "AceEvent-3.0") - +--GLOBALS: ChatFrame_AddMessageEventFilter, ChatFrame_RemoveMessageEventFilter DB.Icons = { Rep = [[Interface\Icons\Achievement_Reputation_08]], XP = [[Interface\Icons\XP_ICON]], diff --git a/ElvUI_SLE/modules/databars/exp.lua b/ElvUI_SLE/modules/databars/exp.lua index 1a8a8e6..ebfc64d 100644 --- a/ElvUI_SLE/modules/databars/exp.lua +++ b/ElvUI_SLE/modules/databars/exp.lua @@ -1,6 +1,6 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DB = SLE:GetModule("DataBars") - +--GLOBALS: hooksecurefunc --strings and shit local COMBATLOG_XPGAIN_FIRSTPERSON, COMBATLOG_XPGAIN_FIRSTPERSON_UNNAMED = COMBATLOG_XPGAIN_FIRSTPERSON, COMBATLOG_XPGAIN_FIRSTPERSON_UNNAMED local COMBATLOG_XPGAIN_EXHAUSTION1, COMBATLOG_XPGAIN_EXHAUSTION2, COMBATLOG_XPGAIN_EXHAUSTION4, COMBATLOG_XPGAIN_EXHAUSTION5 = COMBATLOG_XPGAIN_EXHAUSTION1, COMBATLOG_XPGAIN_EXHAUSTION2, COMBATLOG_XPGAIN_EXHAUSTION4, COMBATLOG_XPGAIN_EXHAUSTION5 diff --git a/ElvUI_SLE/modules/databars/honor.lua b/ElvUI_SLE/modules/databars/honor.lua index 564db8f..b1b2500 100644 --- a/ElvUI_SLE/modules/databars/honor.lua +++ b/ElvUI_SLE/modules/databars/honor.lua @@ -1,9 +1,12 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DB = SLE:GetModule("DataBars") - +--GLOBALS: hooksecurefunc local MAX_PLAYER_LEVEL = MAX_PLAYER_LEVEL local PVP_HONOR_PRESTIGE_AVAILABLE = PVP_HONOR_PRESTIGE_AVAILABLE local MAX_HONOR_LEVEL = MAX_HONOR_LEVEL +local COMBATLOG_HONORGAIN, COMBATLOG_HONORGAIN_NO_RANK, COMBATLOG_HONORAWARD = COMBATLOG_HONORGAIN, COMBATLOG_HONORGAIN_NO_RANK, COMBATLOG_HONORAWARD +local PVP_RANK_0_0 = PVP_RANK_0_0 + local faction = UnitFactionGroup('player') DB.Honor ={ Styles = { diff --git a/ElvUI_SLE/modules/databars/rep.lua b/ElvUI_SLE/modules/databars/rep.lua index 44920d3..f4af848 100644 --- a/ElvUI_SLE/modules/databars/rep.lua +++ b/ElvUI_SLE/modules/databars/rep.lua @@ -1,6 +1,6 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DB = SLE:GetModule("DataBars") - +--GLOBALS: hooksecurefunc local _G = _G local strMatchCombat = {} local guildName diff --git a/ElvUI_SLE/modules/minimap/instance.lua b/ElvUI_SLE/modules/minimap/instance.lua index 062d5f9..0e3e452 100644 --- a/ElvUI_SLE/modules/minimap/instance.lua +++ b/ElvUI_SLE/modules/minimap/instance.lua @@ -2,6 +2,8 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local I = SLE:NewModule("InstDif",'AceHook-3.0', 'AceEvent-3.0') local sub = string.utf8sub local LSM = LibStub("LibSharedMedia-3.0") +--GLOBALS: CreateFrame +local _G = _G local Difficulties = { [1] = 'normal', --5ppl normal @@ -24,7 +26,7 @@ local Difficulties = { } function I:CreateText() - I.frame = CreateFrame("Frame", "MiniMapDifFrame", Minimap) + I.frame = CreateFrame("Frame", "MiniMapDifFrame", _G["Minimap"]) I.frame:Size(50, 20) -- I.frame:Point("CENTER", UIParent) I.frame.text = I.frame:CreateFontString(nil, 'OVERLAY') @@ -56,8 +58,8 @@ function I:GuildEmblem() -- table local char = {} -- check if Blizzard_GuildUI is loaded - if GuildFrameTabardEmblem then - char.guildTexCoord = {GuildFrameTabardEmblem:GetTexCoord()} + if _G["GuildFrameTabardEmblem"] then + char.guildTexCoord = {_G["GuildFrameTabardEmblem"]:GetTexCoord()} else char.guildTexCoord = false end @@ -72,12 +74,12 @@ function I:UpdateFrame() local db = I.db if T.IsInInstance() then if not db.flag then - MiniMapInstanceDifficulty:Hide() - elseif db.flag and not MiniMapInstanceDifficulty:IsShown() then - MiniMapInstanceDifficulty:Show() + _G["MiniMapInstanceDifficulty"]:Hide() + elseif db.flag and not _G["MiniMapInstanceDifficulty"]:IsShown() then + _G["MiniMapInstanceDifficulty"]:Show() end end - I.frame:Point("TOPLEFT", Minimap, "TOPLEFT", db.xoffset, db.yoffset) + I.frame:Point("TOPLEFT", _G["Minimap"], "TOPLEFT", db.xoffset, db.yoffset) I:SetFonts() if db.enable then I.frame.text:Show() @@ -123,7 +125,7 @@ function I:Initialize() if not SLE.initialized or not E.private.general.minimap.enable then return end I.db = E.db.sle.minimap.instance self:CreateText() - MiniMapInstanceDifficulty:HookScript("OnShow", function(self) if not I.db.flag then self:Hide() end end) + _G["MiniMapInstanceDifficulty"]:HookScript("OnShow", function(self) if not I.db.flag then self:Hide() end end) self:RegisterEvent("PLAYER_ENTERING_WORLD", "GenerateText") self:RegisterEvent("ZONE_CHANGED_NEW_AREA", "GenerateText") self:RegisterEvent("GUILD_PARTY_STATE_UPDATED", "GenerateText") diff --git a/ElvUI_SLE/modules/minimap/minimapcoords.lua b/ElvUI_SLE/modules/minimap/minimapcoords.lua index d2330b6..c064ceb 100644 --- a/ElvUI_SLE/modules/minimap/minimapcoords.lua +++ b/ElvUI_SLE/modules/minimap/minimapcoords.lua @@ -2,6 +2,7 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local M = E:GetModule('Minimap') local MM = SLE:NewModule("Minimap", 'AceHook-3.0', 'AceEvent-3.0') local LSM = LibStub("LibSharedMedia-3.0"); +--GLOBALS: CreateFrame, hooksecurefunc local _G = _G local cluster = _G["MinimapCluster"] local UIFrameFadeIn = UIFrameFadeIn @@ -60,26 +61,24 @@ end function MM:UpdateCoordinatesPosition() MM.coordspanel:ClearAllPoints() - MM.coordspanel:SetPoint(E.db.sle.minimap.coords.position, Minimap) + MM.coordspanel:SetPoint(E.db.sle.minimap.coords.position, _G["Minimap"]) end function MM:CreateCoordsFrame() MM.coordspanel = CreateFrame('Frame', "SLE_CoordsPanel", E.UIParent) - -- MM.coordspanel:SetFrameStrata("MEDIUM") - MM.coordspanel:Point("BOTTOM", Minimap, "BOTTOM", 0, 0) - -- MM.coordspanel:CreateBackdrop() + MM.coordspanel:Point("BOTTOM", _G["Minimap"], "BOTTOM", 0, 0) E.FrameLocks["SLE_CoordsPanel"] = true; MM.coordspanel.Text = MM.coordspanel:CreateFontString(nil, "OVERLAY") MM.coordspanel.Text:SetAllPoints(MM.coordspanel) MM.coordspanel.Text:SetWordWrap(false) - Minimap:HookScript('OnEnter', function(self) + _G["Minimap"]:HookScript('OnEnter', function(self) if E.db.sle.minimap.coords.display ~= 'MOUSEOVER' or not E.private.general.minimap.enable or not E.db.sle.minimap.coords.enable then return; end MM.coordspanel:Show() end) - Minimap:HookScript('OnLeave', function(self) + _G["Minimap"]:HookScript('OnLeave', function(self) if E.db.sle.minimap.coords.display ~= 'MOUSEOVER' or not E.private.general.minimap.enable or not E.db.sle.minimap.coords.enable then return; end MM.coordspanel:Hide() end) @@ -98,7 +97,7 @@ function MM:UpdateSettings() MM:CoordFont() MM:CoordsSize() - MM.coordspanel:SetPoint(E.db.sle.minimap.coords.position, Minimap) + MM.coordspanel:SetPoint(E.db.sle.minimap.coords.position, _G["Minimap"]) MM.coordspanel:SetScript('OnUpdate', MM.UpdateCoords) MM:UpdateCoordinatesPosition() diff --git a/ElvUI_SLE/modules/minimap/minimapicons.lua b/ElvUI_SLE/modules/minimap/minimapicons.lua index f706fea..32fa20c 100644 --- a/ElvUI_SLE/modules/minimap/minimapicons.lua +++ b/ElvUI_SLE/modules/minimap/minimapicons.lua @@ -1,6 +1,10 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local SMB = SLE:NewModule('SquareMinimapButtons','AceHook-3.0', 'AceEvent-3.0'); +--GLOBALS: CreateFrame, UIParent +local _G = _G +local RegisterStateDriver = RegisterStateDriver + local strsub, ceil = strsub, ceil local BorderColor = E["media"].bordercolor local TexCoords = { 0.1, 0.9, 0.1, 0.9 } @@ -138,7 +142,7 @@ local function SkinButton(Button) end end - Button:SetFrameLevel(Minimap:GetFrameLevel() + 5) + Button:SetFrameLevel(_G["Minimap"]:GetFrameLevel() + 5) Button:Size(E.db.sle.minimap.mapicons.iconsize) if Name == 'SmartBuff_MiniMapButton' then @@ -148,27 +152,27 @@ local function SkinButton(Button) Button:SetDisabledTexture("Interface\\Icons\\Spell_Nature_Purge") Button:GetDisabledTexture():SetTexCoord(T.unpack(TexCoords)) elseif Name == 'VendomaticButtonFrame' then - VendomaticButton:StripTextures() - VendomaticButton:SetInside() - VendomaticButtonIcon:SetTexture('Interface\\Icons\\INV_Misc_Rabbit_2') - VendomaticButtonIcon:SetTexCoord(T.unpack(TexCoords)) + _G["VendomaticButton"]:StripTextures() + _G["VendomaticButton"]:SetInside() + _G["VendomaticButtonIcon"]:SetTexture('Interface\\Icons\\INV_Misc_Rabbit_2') + _G["VendomaticButtonIcon"]:SetTexCoord(T.unpack(TexCoords)) end if Name == 'QueueStatusMinimapButton' then - QueueStatusMinimapButton:HookScript('OnUpdate', function(self) - QueueStatusMinimapButtonIcon:SetFrameLevel(QueueStatusMinimapButton:GetFrameLevel() + 1) + _G["QueueStatusMinimapButton"]:HookScript('OnUpdate', function(self) + _G["QueueStatusMinimapButtonIcon"]:SetFrameLevel(_G["QueueStatusMinimapButton"]:GetFrameLevel() + 1) end) - local Frame = CreateFrame('Frame', QueueDummyFrame, SMB.bar) + local Frame = CreateFrame('Frame', "QueueDummyFrame", SMB.bar) Frame:SetTemplate() Frame.Icon = Frame:CreateTexture(nil, 'ARTWORK') Frame.Icon:SetInside() Frame.Icon:SetTexture([[Interface\LFGFrame\LFG-Eye]]) Frame.Icon:SetTexCoord(0, 64 / 512, 0, 64 / 256) Frame:SetScript('OnMouseDown', function() - if PVEFrame:IsShown() then - HideUIPanel(PVEFrame) + if _G["PVEFrame"]:IsShown() then + HideUIPanel(_G["PVEFrame"]) else - ShowUIPanel(PVEFrame) + ShowUIPanel(_G["PVEFrame"]) GroupFinderFrame_ShowGroupFrame() end end) @@ -179,7 +183,7 @@ local function SkinButton(Button) Frame:Hide() end end) - QueueStatusMinimapButton:HookScript('OnShow', function() + _G["QueueStatusMinimapButton"]:HookScript('OnShow', function() if E.db.sle.minimap.mapicons.skindungeon then Frame:Show() else @@ -189,15 +193,15 @@ local function SkinButton(Button) Frame:HookScript('OnEnter', OnEnter) Frame:HookScript('OnLeave', OnLeave) Frame:SetScript('OnUpdate', function(self) - if QueueStatusMinimapButton:IsShown() then + if _G["QueueStatusMinimapButton"]:IsShown() then self:EnableMouse(false) else self:EnableMouse(true) end self:Size(E.db.sle.minimap.mapicons.iconsize) - self:SetFrameStrata(QueueStatusMinimapButton:GetFrameStrata()) - self:SetFrameLevel(QueueStatusMinimapButton:GetFrameLevel()) - self:SetPoint(QueueStatusMinimapButton:GetPoint()) + self:SetFrameStrata(_G["QueueStatusMinimapButton"]:GetFrameStrata()) + self:SetFrameLevel(_G["QueueStatusMinimapButton"]:GetFrameLevel()) + self:SetPoint(_G["QueueStatusMinimapButton"]:GetPoint()) end) elseif Name == 'MiniMapMailFrame' then local Frame = CreateFrame('Frame', 'MailDummyFrame', SMB.bar) @@ -206,23 +210,23 @@ local function SkinButton(Button) Frame.Icon = Frame:CreateTexture(nil, 'ARTWORK') Frame.Icon:SetPoint('CENTER') Frame.Icon:Size(18) - Frame.Icon:SetTexture(MiniMapMailIcon:GetTexture()) + Frame.Icon:SetTexture(_G["MiniMapMailIcon"]:GetTexture()) Frame:SetScript('OnEnter', OnEnter) Frame:SetScript('OnLeave', OnLeave) Frame:SetScript('OnUpdate', function(self) if E.db.sle.minimap.mapicons.skinmail then Frame:Show() - Frame:SetPoint(MiniMapMailFrame:GetPoint()) + Frame:SetPoint(_G["MiniMapMailFrame"]:GetPoint()) else Frame:Hide() end end) - MiniMapMailFrame:HookScript('OnShow', function(self) + _G["MiniMapMailFrame"]:HookScript('OnShow', function(self) if E.db.sle.minimap.mapicons.skinmail then - MiniMapMailIcon:SetVertexColor(0, 1, 0) + _G["MiniMapMailIcon"]:SetVertexColor(0, 1, 0) end end) - MiniMapMailFrame:HookScript('OnHide', function(self) MiniMapMailIcon:SetVertexColor(1, 1, 1) end) + _G["MiniMapMailFrame"]:HookScript('OnHide', function(self) _G["MiniMapMailIcon"]:SetVertexColor(1, 1, 1) end) else Button:SetTemplate() Button:SetBackdropColor(0, 0, 0, 0) @@ -234,8 +238,8 @@ local function SkinButton(Button) end function SMB:SkinMinimapButtons() - for i = 1, Minimap:GetNumChildren() do - local object = T.select(i, Minimap:GetChildren()) + for i = 1, _G["Minimap"]:GetNumChildren() do + local object = T.select(i, _G["Minimap"]:GetChildren()) if object then if object:IsObjectType('Button') and object:GetName() then SkinButton(object) @@ -276,8 +280,8 @@ function SMB:Update() end if not E.db.sle.minimap.mapicons.skindungeon and Name == 'QueueStatusMinimapButton' then Exception = false - QueueStatusMinimapButton:ClearAllPoints() - QueueStatusMinimapButton:Point("BOTTOMRIGHT", Minimap, -3, 3) + _G["QueueStatusMinimapButton"]:ClearAllPoints() + _G["QueueStatusMinimapButton"]:Point("BOTTOMRIGHT", _G["Minimap"], -3, 3) end if (not E.db.sle.minimap.mapicons.skinmail and Name == 'MiniMapMailFrame') then Exception = false @@ -321,7 +325,7 @@ end function SMB:Initialize() if not SLE.initialized or not E.private.general.minimap.enable then return end - QueueStatusMinimapButton:SetParent(Minimap) + _G["QueueStatusMinimapButton"]:SetParent(_G["Minimap"]) SMB.bar = CreateFrame('Frame', 'SLE_SquareMinimapButtonBar', E.UIParent) SMB.bar:Hide() diff --git a/ElvUI_SLE/modules/professions/enchant.lua b/ElvUI_SLE/modules/professions/enchant.lua index e54f18a..876c8d9 100644 --- a/ElvUI_SLE/modules/professions/enchant.lua +++ b/ElvUI_SLE/modules/professions/enchant.lua @@ -1,7 +1,7 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local Pr = SLE:GetModule("Professions") local S = E:GetModule("Skins") --- GLOBALS: CreateFrame +-- GLOBALS: CreateFrame, hooksecurefunc local _G = _G local UseItemByName = UseItemByName local C_TradeSkillUI = C_TradeSkillUI diff --git a/ElvUI_SLE/modules/professions/professions.lua b/ElvUI_SLE/modules/professions/professions.lua index 3868d5e..63f5dc5 100644 --- a/ElvUI_SLE/modules/professions/professions.lua +++ b/ElvUI_SLE/modules/professions/professions.lua @@ -31,15 +31,15 @@ function Pr:UpdateSkills(event) end end - local prof1, prof2 = GetProfessions() + local prof1, prof2 = T.GetProfessions() if prof1 then - local name, _, rank = GetProfessionInfo(prof1) + local name, _, rank = T.GetProfessionInfo(prof1) if name == T.GetSpell(7411) then Pr.DErank = rank end end if prof2 then - local name, _, rank = GetProfessionInfo(prof2) + local name, _, rank = T.GetProfessionInfo(prof2) if name == T.GetSpell(7411) then Pr.DErank = rank end diff --git a/ElvUI_SLE/modules/quests/quests.lua b/ElvUI_SLE/modules/quests/quests.lua index 06ac32c..b87ef67 100644 --- a/ElvUI_SLE/modules/quests/quests.lua +++ b/ElvUI_SLE/modules/quests/quests.lua @@ -3,6 +3,7 @@ local Q = SLE:NewModule("Quests", "AceEvent-3.0") local B = LibStub("LibBabble-SubZone-3.0") local BL = B:GetLookupTable() local ObjectiveTracker_Expand, ObjectiveTracker_Collapse = ObjectiveTracker_Expand, ObjectiveTracker_Collapse +local IsResting = IsResting local statedriver = { ["FULL"] = function(frame) ObjectiveTracker_Expand() @@ -25,6 +26,7 @@ function Q:ChangeState(event) if T.GetZoneText() == BL.Frostwall or T.GetZoneText() == BL.Lunarfall then statedriver[Q.db.visibility.garrison](Q.frame) + --here be order halls elseif IsResting() then statedriver[Q.db.visibility.rested](Q.frame) else diff --git a/ElvUI_SLE/modules/sledatatexts/currency.lua b/ElvUI_SLE/modules/sledatatexts/currency.lua index ea4b795..968503f 100644 --- a/ElvUI_SLE/modules/sledatatexts/currency.lua +++ b/ElvUI_SLE/modules/sledatatexts/currency.lua @@ -1,7 +1,7 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DT = E:GetModule('DataTexts') local DTP = SLE:GetModule('Datatexts') - +--GLOBALS: ElvDB local abs, mod = abs, mod local GetMoney, GetCurrencyInfo, GetNumWatchedTokens, GetBackpackCurrencyInfo, GetCurrencyListInfo = GetMoney, GetCurrencyInfo, GetNumWatchedTokens, GetBackpackCurrencyInfo, GetCurrencyListInfo diff --git a/ElvUI_SLE/modules/sledatatexts/friends.lua b/ElvUI_SLE/modules/sledatatexts/friends.lua index f6d8c6f..ec33d22 100644 --- a/ElvUI_SLE/modules/sledatatexts/friends.lua +++ b/ElvUI_SLE/modules/sledatatexts/friends.lua @@ -26,6 +26,7 @@ local ShowFriends = ShowFriends local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown local SetItemRef = SetItemRef local StaticPopup_Show = StaticPopup_Show +local ToggleFriendsFrame = ToggleFriendsFrame local realid_table = {} @@ -249,13 +250,13 @@ local function Entry_OnMouseUp(frame, info, button) if IsControlKeyDown() then if i_type == "friends" then - FriendsFrame.NotesID = nameIndex(toon_name) - StaticPopup_Show("SET_FRIENDNOTE", T.GetFriendInfo(FriendsFrame.NotesID)) + _G["FriendsFrame"].NotesID = nameIndex(toon_name) + StaticPopup_Show("SET_FRIENDNOTE", T.GetFriendInfo(_G["FriendsFrame"].NotesID)) return end if i_type == "realid" then - FriendsFrame.NotesID = presence_id + _G["FriendsFrame"].NotesID = presence_id StaticPopup_Show("SET_BNFRIENDNOTE", full_name) return end @@ -305,7 +306,7 @@ function LDB:OnClick(button) end if button == "RightButton" then - ElvConfigToggle:Click(); + _G["ElvConfigToggle"]:Click(); SLE.ACD:SelectGroup("ElvUI", "sle", "modules", "datatext", "sldatatext", "slfriends") end end diff --git a/ElvUI_SLE/modules/sledatatexts/guild.lua b/ElvUI_SLE/modules/sledatatexts/guild.lua index 3ee8fd9..331f2e3 100644 --- a/ElvUI_SLE/modules/sledatatexts/guild.lua +++ b/ElvUI_SLE/modules/sledatatexts/guild.lua @@ -234,7 +234,7 @@ function LDB:OnClick(button) end if button == "RightButton" then - ElvConfigToggle:Click(); + _G["ElvConfigToggle"]:Click(); SLE.ACD:SelectGroup("ElvUI", "sle", "modules", "datatext", "sldatatext", "slguild") end end diff --git a/ElvUI_SLE/modules/sledatatexts/itemlevel.lua b/ElvUI_SLE/modules/sledatatexts/itemlevel.lua index 19a419b..2cf26af 100644 --- a/ElvUI_SLE/modules/sledatatexts/itemlevel.lua +++ b/ElvUI_SLE/modules/sledatatexts/itemlevel.lua @@ -6,6 +6,8 @@ local lastPanel local ITEM_LEVEL_ABBR = ITEM_LEVEL_ABBR local GMSURVEYRATING3 = GMSURVEYRATING3 local TOTAL = TOTAL +local GetEquippedArtifactRelicInfo = C_ArtifactUI.GetEquippedArtifactRelicInfo +local GetItemLevelIncreaseProvidedByRelic = C_ArtifactUI.GetItemLevelIncreaseProvidedByRelic local slots = { [1] = { "HeadSlot", HEADSLOT }, @@ -196,7 +198,7 @@ local heirlooms = { local function HeirLoomLevel(itemLink) local ItemID, _, _, _, _, _, _, _, level = T.match(itemLink, '|Hitem:(%d+):(%d*):(%d*):(%d*):(%d*):(%d*):(%d*):(%d*):(%d*)') ItemID, level = T.tonumber(ItemID), T.tonumber(level) - for _, ID in pairs(heirlooms[100]) do + for _, ID in T.pairs(heirlooms[100]) do if ID == ItemID then return (715 + (10 * (level - 100))); end @@ -231,11 +233,11 @@ local function HeirLoomLevel(itemLink) end local function ArtifactLevel(itemLink) - local itemLevel = select(4, T.GetItemInfo(itemLink)); + local itemLevel = T.select(4, T.GetItemInfo(itemLink)); for i = 1, 3 do - local relicLink = select(4, C_ArtifactUI.GetEquippedArtifactRelicInfo(i)); + local relicLink = T.select(4, GetEquippedArtifactRelicInfo(i)); if (relicLink and T.match(relicLink, "item:")) then - itemLevel = itemLevel + C_ArtifactUI.GetItemLevelIncreaseProvidedByRelic(relicLink); + itemLevel = itemLevel + GetItemLevelIncreaseProvidedByRelic(relicLink); end end diff --git a/ElvUI_SLE/modules/tooltips/raidprogress.lua b/ElvUI_SLE/modules/tooltips/raidprogress.lua index 8894852..b34aa8e 100644 --- a/ElvUI_SLE/modules/tooltips/raidprogress.lua +++ b/ElvUI_SLE/modules/tooltips/raidprogress.lua @@ -1,15 +1,19 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local RP = SLE:NewModule("RaidProgress", "AceHook-3.0", "AceEvent-3.0") local TT = E:GetModule('Tooltip'); +--GLOBALS: hooksecurefunc local MAX_PLAYER_LEVEL = MAX_PLAYER_LEVEL local _G = _G local sub = string.sub +local ClearAchievementComparisonUnit = ClearAchievementComparisonUnit +local AchievementFrame_DisplayComparison = AchievementFrame_DisplayComparison +local SetAchievementComparisonUnit = SetAchievementComparisonUnit +local HideUIPanel = HideUIPanel RP.Cache = {} RP.playerGUID = UnitGUID("player") RP.highestKill = 0 -local ClearAchievementComparisonUnit = ClearAchievementComparisonUnit RP.bosses = { @@ -172,7 +176,7 @@ local function OnInspectInfo(self, tt, unit, level, r, g, b, numTries) ClearAchievementComparisonUnit() if not self.loadedComparison and T.select(2, T.IsAddOnLoaded("Blizzard_AchievementUI")) then AchievementFrame_DisplayComparison(unit) - HideUIPanel(AchievementFrame) + HideUIPanel(_G["AchievementFrame"]) ClearAchievementComparisonUnit() self.loadedComparison = true end diff --git a/ElvUI_SLE/modules/unitframes/unitframes.lua b/ElvUI_SLE/modules/unitframes/unitframes.lua index ce8524f..b9a4acf 100644 --- a/ElvUI_SLE/modules/unitframes/unitframes.lua +++ b/ElvUI_SLE/modules/unitframes/unitframes.lua @@ -4,6 +4,7 @@ local SUF = SLE:NewModule("UnitFrames") local RC = LibStub("LibRangeCheck-2.0") --GLOBALS: hooksecurefunc, CreateFrame local _G = _G +local UnitGetTotalAbsorbs = UnitGetTotalAbsorbs function SUF:NewTags() _G["ElvUF"].Tags.Methods["range:sl"] = function(unit) diff --git a/ElvUI_SLE/modules/unitframes/units/player.lua b/ElvUI_SLE/modules/unitframes/units/player.lua index 2c98e22..0bc8ec0 100644 --- a/ElvUI_SLE/modules/unitframes/units/player.lua +++ b/ElvUI_SLE/modules/unitframes/units/player.lua @@ -1,7 +1,7 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local SUF = SLE:GetModule("UnitFrames") local UF = E:GetModule('UnitFrames'); ---GLOBALS: CreateFrame, UIParent +--GLOBALS: CreateFrame, UIParent, hooksecurefunc local _G = _G local C_TimerNewTimer = C_Timer.NewTimer