From 643be34b76ab053143143836c5941b63210fe219 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 13 Sep 2016 23:02:15 +0300 Subject: [PATCH 1/9] Some underlines --- ElvUI_SLE/skins/blizzard/objectiveTracker.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ElvUI_SLE/skins/blizzard/objectiveTracker.lua b/ElvUI_SLE/skins/blizzard/objectiveTracker.lua index 359cb8c..69a9081 100644 --- a/ElvUI_SLE/skins/blizzard/objectiveTracker.lua +++ b/ElvUI_SLE/skins/blizzard/objectiveTracker.lua @@ -241,11 +241,13 @@ local function ObjectiveReskin() _G["ObjectiveTrackerBlocksFrame"].AchievementHeader.SLE_Underline = Sk:CreateUnderline(_G["ObjectiveTrackerBlocksFrame"].AchievementHeader, flat, true, height) _G['BONUS_OBJECTIVE_TRACKER_MODULE'].Header.SLE_Underline = Sk:CreateUnderline(_G['BONUS_OBJECTIVE_TRACKER_MODULE'].Header, flat, true, height) _G["ObjectiveTrackerBlocksFrame"].ScenarioHeader.SLE_Underline = Sk:CreateUnderline(_G["ObjectiveTrackerBlocksFrame"].ScenarioHeader, flat, true, height) + _G["WORLD_QUEST_TRACKER_MODULE"].Header.SLE_Underline = Sk:CreateUnderline(_G["WORLD_QUEST_TRACKER_MODULE"].Header, flat, true, height) T.tinsert(underlines, _G["ObjectiveTrackerBlocksFrame"].QuestHeader.SLE_Underline) T.tinsert(underlines, _G["ObjectiveTrackerBlocksFrame"].AchievementHeader.SLE_Underline) T.tinsert(underlines, _G['BONUS_OBJECTIVE_TRACKER_MODULE'].Header.SLE_Underline) T.tinsert(underlines, _G["ObjectiveTrackerBlocksFrame"].ScenarioHeader.SLE_Underline) + T.tinsert(underlines, _G["WORLD_QUEST_TRACKER_MODULE"].Header.SLE_Underline) Sk:Update_ObjectiveTrackerUnderlinesVisibility() Sk:Update_ObjectiveTrackerUnderlinesColor() -- 1.7.9.5 From f86863e84160a1c1fa185a9417edb44cfc06bf7d Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 13 Sep 2016 23:02:40 +0300 Subject: [PATCH 2/9] Account for Blaze breaking my stuff again --- ElvUI_SLE/core/install.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/core/install.lua b/ElvUI_SLE/core/install.lua index 745cc0b..46a419b 100644 --- a/ElvUI_SLE/core/install.lua +++ b/ElvUI_SLE/core/install.lua @@ -579,8 +579,8 @@ function PI:DarthSetup() E.db["movers"]["DebuffsMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-187,-158" E.db["movers"]["ElvUF_TargetMover"] = "BOTTOM,ElvUIParent,BOTTOM,211,189" E.db["movers"]["PlayerNameplate"] = "BOTTOM,ElvUIParent,BOTTOM,0,426" - E.db["movers"]["ElvUIBankMover"] = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,153,199" - E.db["movers"]["ElvUIBagMover"] = "BOTTOMRIGHT,ElvUIParent,BOTTOMRIGHT,-152,199" + E.db["movers"]["ElvUIBankMover"] = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,0,199" + E.db["movers"]["ElvUIBagMover"] = "BOTTOMRIGHT,ElvUIParent,BOTTOMRIGHT,0,199" end if T.IsAddOnLoaded("ElvUI_AuraBarsMovers") then @@ -628,6 +628,8 @@ function PI:DarthSetup() E.global["sle"]["advanced"]["optionsLimits"] = true E.global["sle"]["advanced"]["cyrillics"]["commands"] = true E.global["general"]["animateConfig"] = false + E.global["general"]["commandBarSetting"] = "DISABLED" + E.global["general"]["fadeMapWhenMoving"] = false if layout then if layout == 'tank' then -- 1.7.9.5 From 93a881808c4c9264085cb21fc3b20d5b4b7c72b9 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 13 Sep 2016 23:03:30 +0300 Subject: [PATCH 3/9] Fix "script ran too long" by unhooking shit while in combat. Lesser of 2 evils. --- ElvUI_SLE/modules/chat/chat.lua | 7 ++++++ ElvUI_SLE/modules/chat/links.lua | 44 ++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/ElvUI_SLE/modules/chat/chat.lua b/ElvUI_SLE/modules/chat/chat.lua index 4ebe4e2..36991c0 100644 --- a/ElvUI_SLE/modules/chat/chat.lua +++ b/ElvUI_SLE/modules/chat/chat.lua @@ -130,6 +130,12 @@ function C:GMIconUpdate() end function C:Combat(event) + --To get rid of "script ran too long" in links + if event == "PLAYER_REGEN_DISABLED" then + C:Unhook("SetItemRef") + elseif event == "PLAYER_REGEN_ENABLED" then + C:RawHook("SetItemRef", true) + end if C.db.combathide == "NONE" or not C.db.combathide then return end if event == "PLAYER_REGEN_DISABLED" then if C.db.combathide == "BOTH" or C.db.combathide == "RIGHT" then @@ -140,6 +146,7 @@ function C:Combat(event) LeftChatPanel:Hide() LeftChatToggleButton:Hide() end + elseif event == "PLAYER_REGEN_ENABLED" then if not RightChatPanel:IsShown() then RightChatPanel:Show() diff --git a/ElvUI_SLE/modules/chat/links.lua b/ElvUI_SLE/modules/chat/links.lua index 7fdd779..6ce418d 100644 --- a/ElvUI_SLE/modules/chat/links.lua +++ b/ElvUI_SLE/modules/chat/links.lua @@ -164,32 +164,30 @@ function C:ParseChatEventInv(event, msg, sender, ...) end function C:SetItemRef(link, text, button, chatframe) - if not T.InCombatLockdown() then - local linktype, id = T.split(":", link) - if C.db.dpsSpam then - if linktype == "SLD" then - local meterID = T.tonumber(id) - -- put stuff in the ItemRefTooltip from FrameXML - ShowUIPanel(ItemRefTooltip); - if ( not ItemRefTooltip:IsShown() ) then - ItemRefTooltip:SetOwner(UIParent, "ANCHOR_PRESERVE"); - end - ItemRefTooltip:ClearLines() - ItemRefTooltip:AddLine(C.Meters[meterID].title) - ItemRefTooltip:AddLine(T.format(L["Reported by %s"],C.Meters[meterID].src)) - for _,message in T.ipairs(C.Meters[meterID].data) do ItemRefTooltip:AddLine(message,1,1,1) end - ItemRefTooltip:Show() - return nil + local linktype, id = T.split(":", link) + if C.db.dpsSpam then + if linktype == "SLD" then + local meterID = T.tonumber(id) + -- put stuff in the ItemRefTooltip from FrameXML + ShowUIPanel(ItemRefTooltip); + if ( not ItemRefTooltip:IsShown() ) then + ItemRefTooltip:SetOwner(UIParent, "ANCHOR_PRESERVE"); end - end - if IsAltKeyDown() and linktype == "player" and E.db.sle.chat.invite.altInv then - InviteUnit(id) - return nil - elseif linktype == "invite" then - InviteUnit(id) + ItemRefTooltip:ClearLines() + ItemRefTooltip:AddLine(C.Meters[meterID].title) + ItemRefTooltip:AddLine(T.format(L["Reported by %s"],C.Meters[meterID].src)) + for _,message in T.ipairs(C.Meters[meterID].data) do ItemRefTooltip:AddLine(message,1,1,1) end + ItemRefTooltip:Show() return nil end end + if IsAltKeyDown() and linktype == "player" and E.db.sle.chat.invite.altInv then + InviteUnit(id) + return nil + elseif linktype == "invite" then + InviteUnit(id) + return nil + end return self.hooks.SetItemRef(link, text, button) end @@ -225,7 +223,7 @@ end function C:InitLinks() C:SpamFilter() C:CreateInvKeys() - C:RawHook(nil, "SetItemRef", true) + C:RawHook("SetItemRef", true) -- Borrowed from Deadly Boss Mods do local old = ItemRefTooltip.SetHyperlink -- we have to hook this function since the default ChatFrame code assumes that all links except for player and channel links are valid arguments for this function -- 1.7.9.5 From 095a1f9d12e733ef98fe332c3c5c72036360cb90 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 13 Sep 2016 23:03:54 +0300 Subject: [PATCH 4/9] Apparently this ID is wrong as per #336 --- ElvUI_SLE/modules/minimap/locationbar.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/modules/minimap/locationbar.lua b/ElvUI_SLE/modules/minimap/locationbar.lua index 4060b6b..578179d 100644 --- a/ElvUI_SLE/modules/minimap/locationbar.lua +++ b/ElvUI_SLE/modules/minimap/locationbar.lua @@ -113,7 +113,7 @@ LP.Spells = { [9] = {text = T.GetSpellInfo(132627),icon = SLE:GetIconFromID("spell", 132627),secure = {buttonType = "spell",ID = 132627}, UseTooltip = true},-- TP:Vale of Eternal Blossoms [10] = {text = T.GetSpellInfo(120145),icon = SLE:GetIconFromID("spell", 120145),secure = {buttonType = "spell",ID = 120145}, UseTooltip = true},-- TP:Ancient Dalaran [11] = {text = T.GetSpellInfo(176242),icon = SLE:GetIconFromID("spell", 176242),secure = {buttonType = "spell",ID = 176242}, UseTooltip = true},-- TP:Warspear - [12] = {text = T.GetSpellInfo(224873),icon = SLE:GetIconFromID("spell", 224873),secure = {buttonType = "spell",ID = 224873}, UseTooltip = true},-- TP:Dalaran - BI + [12] = {text = T.GetSpellInfo(224869),icon = SLE:GetIconFromID("spell", 224869),secure = {buttonType = "spell",ID = 224869}, UseTooltip = true},-- TP:Dalaran - BI }, ["Alliance"] = { [1] = {text = T.GetSpellInfo(3561),icon = SLE:GetIconFromID("spell", 3561),secure = {buttonType = "spell",ID = 3561}, UseTooltip = true},-- TP:Stormwind @@ -127,7 +127,7 @@ LP.Spells = { [9] = {text = T.GetSpellInfo(132621),icon = SLE:GetIconFromID("spell", 132621),secure = {buttonType = "spell",ID = 132621}, UseTooltip = true},-- TP:Vale of Eternal Blossoms [10] = {text = T.GetSpellInfo(120145),icon = SLE:GetIconFromID("spell", 120145),secure = {buttonType = "spell",ID = 120145}, UseTooltip = true},-- TP:Ancient Dalaran [11] = {text = T.GetSpellInfo(176248),icon = SLE:GetIconFromID("spell", 176248),secure = {buttonType = "spell",ID = 176248}, UseTooltip = true},-- TP:StormShield - [12] = {text = T.GetSpellInfo(224873),icon = SLE:GetIconFromID("spell", 224873),secure = {buttonType = "spell",ID = 224873}, UseTooltip = true},-- TP:Dalaran - BI + [12] = {text = T.GetSpellInfo(224869),icon = SLE:GetIconFromID("spell", 224869),secure = {buttonType = "spell",ID = 224869}, UseTooltip = true},-- TP:Dalaran - BI }, }, ["portals"] = { -- 1.7.9.5 From 87fe387b5cbb3ada5fc633f555870ac1cb361be7 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 16 Sep 2016 18:51:13 +0300 Subject: [PATCH 5/9] This should make currency that was just unhidden appear in tooltip without reloading --- ElvUI_SLE/modules/sledatatexts/currency.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ElvUI_SLE/modules/sledatatexts/currency.lua b/ElvUI_SLE/modules/sledatatexts/currency.lua index 7f574eb..4a60b04 100644 --- a/ElvUI_SLE/modules/sledatatexts/currency.lua +++ b/ElvUI_SLE/modules/sledatatexts/currency.lua @@ -116,7 +116,8 @@ end local HiddenCurrency = {} local function UnusedCheck() - if GetOption('Unused') then HiddenCurrency = {}; return end + -- if GetOption('Unused') then HiddenCurrency = {}; return end + T.twipe(HiddenCurrency) for i = 1, T.GetCurrencyListSize() do local name, _, _, isUnused = GetCurrencyListInfo(i) if isUnused then -- 1.7.9.5 From 29cf60cff92fac3d709ad048fdb4209ee897f569 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 16 Sep 2016 18:53:08 +0300 Subject: [PATCH 6/9] Fix text issues with quest log --- ElvUI_SLE/modules/quests/quests.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ElvUI_SLE/modules/quests/quests.lua b/ElvUI_SLE/modules/quests/quests.lua index fd1d512..8605820 100644 --- a/ElvUI_SLE/modules/quests/quests.lua +++ b/ElvUI_SLE/modules/quests/quests.lua @@ -7,10 +7,14 @@ local IsResting = IsResting local statedriver = { ["FULL"] = function(frame) ObjectiveTracker_Expand() + -- TextFix(minimizeButton, "full") + minimizeButton.text:SetText("-") frame:Show() end, ["COLLAPSED"] = function(frame) ObjectiveTracker_Collapse() + minimizeButton.text:SetText("+") + -- TextFix(minimizeButton, "collaped") frame:Show() end, ["HIDE"] = function(frame) @@ -98,7 +102,7 @@ function Q:QUEST_COMPLETE() for index = 1, num do local link = GetQuestItemLink("choice", index); if link then - local price = select(11, GetItemInfo(link)) + local price = T.select(11, GetItemInfo(link)) if price and price > highest then highest = price choice = index -- 1.7.9.5 From 730c27128ebd198538f31a32d98c7f04bf9dc061 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 16 Sep 2016 18:53:45 +0300 Subject: [PATCH 7/9] Short format on regen dt now also shorens the value (cause fuck those 7 digit values) --- ElvUI_SLE/modules/sledatatexts/regen.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/modules/sledatatexts/regen.lua b/ElvUI_SLE/modules/sledatatexts/regen.lua index 87f803b..0c03627 100644 --- a/ElvUI_SLE/modules/sledatatexts/regen.lua +++ b/ElvUI_SLE/modules/sledatatexts/regen.lua @@ -2,15 +2,16 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local DT = E:GetModule('DataTexts') local MANA_REGEN = MANA_REGEN local displayNumberString = '' +local displayNumberStringShort = '' local lastPanel; local GetManaRegen = GetManaRegen local function OnEvent(self, event, unit) local baseMR, castingMR = GetManaRegen() if T.InCombatLockdown() then - self.text:SetFormattedText(displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, castingMR*5) + self.text:SetFormattedText(E.db.sle.dt.regen.short and displayNumberStringShort or displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, E.db.sle.dt.regen.short and E:ShortValue(castingMR*5) or castingMR*5) else - self.text:SetFormattedText(displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, baseMR*5) + self.text:SetFormattedText(E.db.sle.dt.regen.short and displayNumberStringShort or displayNumberString, E.db.sle.dt.regen.short and "Mp5" or MANA_REGEN, E.db.sle.dt.regen.short and E:ShortValue(baseMR*5) or baseMR*5) end lastPanel = self @@ -18,6 +19,7 @@ end local function ValueColorUpdate(hex, r, g, b) displayNumberString = T.join("", "%s: ", hex, "%.2f|r") + displayNumberStringShort = T.join("", "%s: ", hex, "%s|r") if lastPanel ~= nil then OnEvent(lastPanel) -- 1.7.9.5 From 27747bd7003274f4d0e7651b345b231f95b75ff8 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Fri, 16 Sep 2016 18:54:04 +0300 Subject: [PATCH 8/9] Nice stuff for artifact --- ElvUI_SLE/core/install.lua | 1 + ElvUI_SLE/defaults/private.lua | 3 ++- ElvUI_SLE/modules/orderhall.lua | 40 +++++++++++++++++++++++++++++++++++++ ElvUI_SLE/options/orderhall_c.lua | 8 ++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/ElvUI_SLE/core/install.lua b/ElvUI_SLE/core/install.lua index 46a419b..859a829 100644 --- a/ElvUI_SLE/core/install.lua +++ b/ElvUI_SLE/core/install.lua @@ -627,6 +627,7 @@ function PI:DarthSetup() E.global["sle"]["advanced"]["optionsLimits"] = true E.global["sle"]["advanced"]["cyrillics"]["commands"] = true + E.global["sle"]["LinkArtifactTrait"] = true E.global["general"]["animateConfig"] = false E.global["general"]["commandBarSetting"] = "DISABLED" E.global["general"]["fadeMapWhenMoving"] = false diff --git a/ElvUI_SLE/defaults/private.lua b/ElvUI_SLE/defaults/private.lua index b28a9b2..e29daf1 100644 --- a/ElvUI_SLE/defaults/private.lua +++ b/ElvUI_SLE/defaults/private.lua @@ -203,6 +203,7 @@ G["sle"] = { ["Blacklist"] = "", ["TradeOpen"] = false, }, + ["LinkArtifactTrait"] = false, ["advanced"] = { ["general"] = false, ["optionsLimits"] = false, @@ -216,4 +217,4 @@ G["sle"] = { ["devCommands"] = false, }, }, -} \ No newline at end of file + } \ No newline at end of file diff --git a/ElvUI_SLE/modules/orderhall.lua b/ElvUI_SLE/modules/orderhall.lua index 3740841..383bce2 100644 --- a/ElvUI_SLE/modules/orderhall.lua +++ b/ElvUI_SLE/modules/orderhall.lua @@ -2,6 +2,7 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local OH = SLE:NewModule("OrderHall", 'AceEvent-3.0') local _G = _G local C_Garrison = C_Garrison +local PowerButton_OnClick, OnRelicSlotClicked function OH:SHIPMENT_CRAFTER_INFO(event, success, _, maxShipments, plotID) if not _G["GarrisonCapacitiveDisplayFrame"] then return end --Just in case @@ -23,6 +24,41 @@ function OH:SHIPMENT_CRAFTER_CLOSED() OH.clicked = false end +--Based on ArtifactTraitLink by Ketho +function OH:ArtClickHook(event, addon) + if addon == "Blizzard_ArtifactUI" then + PowerButton_OnClick = ArtifactPowerButtonMixin.OnClick + -- rather prehook than posthook to prevent purchasing traits + function ArtifactPowerButtonMixin:OnClick(button) + if IsModifiedClick("CHATLINK") then + ChatEdit_InsertLink(GetSpellLink(self.spellID)) + else + PowerButton_OnClick(self, button) + end + end + + OnRelicSlotClicked = ArtifactTitleTemplateMixin.OnRelicSlotClicked + -- ArtifactTitleTemplateMixin.OnRelicSlotClicked + function ArtifactFrame.PerksTab.TitleContainer:OnRelicSlotClicked(relicSlot) + if IsModifiedClick("CHATLINK") then + for i = 1, #self.RelicSlots do + if self.RelicSlots[i] == relicSlot then + ChatEdit_InsertLink( select(4, C_ArtifactUI.GetRelicInfo(i)) ) + break + end + end + else + OnRelicSlotClicked(self, relicSlot) + end + end + OH:UnregisterEvent(event) + end +end + +function OH:CreateArtifactButton() + OH.ArtifactButton = CreateFrame("Button", "SLE_ArtifactButton", E.UIParent) +end + function OH:Initialize() if not SLE.initialized then return end OH.db = E.db.sle.orderhall @@ -32,6 +68,10 @@ function OH:Initialize() OH.db = E.db.sle.orderhall end + if E.global.sle.LinkArtifactTrait then + self:RegisterEvent("ADDON_LOADED", "ArtClickHook") + end + self:RegisterEvent("SHIPMENT_CRAFTER_INFO"); self:RegisterEvent("SHIPMENT_CRAFTER_CLOSED"); end diff --git a/ElvUI_SLE/options/orderhall_c.lua b/ElvUI_SLE/options/orderhall_c.lua index 7ee7bcc..0e2b8d2 100644 --- a/ElvUI_SLE/options/orderhall_c.lua +++ b/ElvUI_SLE/options/orderhall_c.lua @@ -36,6 +36,14 @@ local function configTable() }, }, }, + LinkArtifactTrait = { + order = 3, + type = "toggle", + name = L["Link Artifact Traits"], + desc = L["Allows you to link artifact traits and relics in chat by shift+click."], + get = function(info) return E.global.sle.LinkArtifactTrait end, + set = function(info, value) E.global.sle.LinkArtifactTrait = value; E:StaticPopup_Show("GLOBAL_RL") end, + }, }, } end -- 1.7.9.5 From 4f81eb0816a7c30118c6a158a181f37641af26fb Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sun, 18 Sep 2016 14:25:45 +0300 Subject: [PATCH 9/9] Reverting commit 27747b Apparently 7.1 will introduce the ability to link those without messing with the code --- ElvUI_SLE/core/install.lua | 1 - ElvUI_SLE/defaults/private.lua | 3 +-- ElvUI_SLE/modules/orderhall.lua | 40 ------------------------------------- ElvUI_SLE/options/orderhall_c.lua | 8 -------- 4 files changed, 1 insertion(+), 51 deletions(-) diff --git a/ElvUI_SLE/core/install.lua b/ElvUI_SLE/core/install.lua index 859a829..46a419b 100644 --- a/ElvUI_SLE/core/install.lua +++ b/ElvUI_SLE/core/install.lua @@ -627,7 +627,6 @@ function PI:DarthSetup() E.global["sle"]["advanced"]["optionsLimits"] = true E.global["sle"]["advanced"]["cyrillics"]["commands"] = true - E.global["sle"]["LinkArtifactTrait"] = true E.global["general"]["animateConfig"] = false E.global["general"]["commandBarSetting"] = "DISABLED" E.global["general"]["fadeMapWhenMoving"] = false diff --git a/ElvUI_SLE/defaults/private.lua b/ElvUI_SLE/defaults/private.lua index e29daf1..b28a9b2 100644 --- a/ElvUI_SLE/defaults/private.lua +++ b/ElvUI_SLE/defaults/private.lua @@ -203,7 +203,6 @@ G["sle"] = { ["Blacklist"] = "", ["TradeOpen"] = false, }, - ["LinkArtifactTrait"] = false, ["advanced"] = { ["general"] = false, ["optionsLimits"] = false, @@ -217,4 +216,4 @@ G["sle"] = { ["devCommands"] = false, }, }, - } \ No newline at end of file +} \ No newline at end of file diff --git a/ElvUI_SLE/modules/orderhall.lua b/ElvUI_SLE/modules/orderhall.lua index 383bce2..3740841 100644 --- a/ElvUI_SLE/modules/orderhall.lua +++ b/ElvUI_SLE/modules/orderhall.lua @@ -2,7 +2,6 @@ local SLE, T, E, L, V, P, G = unpack(select(2, ...)) local OH = SLE:NewModule("OrderHall", 'AceEvent-3.0') local _G = _G local C_Garrison = C_Garrison -local PowerButton_OnClick, OnRelicSlotClicked function OH:SHIPMENT_CRAFTER_INFO(event, success, _, maxShipments, plotID) if not _G["GarrisonCapacitiveDisplayFrame"] then return end --Just in case @@ -24,41 +23,6 @@ function OH:SHIPMENT_CRAFTER_CLOSED() OH.clicked = false end ---Based on ArtifactTraitLink by Ketho -function OH:ArtClickHook(event, addon) - if addon == "Blizzard_ArtifactUI" then - PowerButton_OnClick = ArtifactPowerButtonMixin.OnClick - -- rather prehook than posthook to prevent purchasing traits - function ArtifactPowerButtonMixin:OnClick(button) - if IsModifiedClick("CHATLINK") then - ChatEdit_InsertLink(GetSpellLink(self.spellID)) - else - PowerButton_OnClick(self, button) - end - end - - OnRelicSlotClicked = ArtifactTitleTemplateMixin.OnRelicSlotClicked - -- ArtifactTitleTemplateMixin.OnRelicSlotClicked - function ArtifactFrame.PerksTab.TitleContainer:OnRelicSlotClicked(relicSlot) - if IsModifiedClick("CHATLINK") then - for i = 1, #self.RelicSlots do - if self.RelicSlots[i] == relicSlot then - ChatEdit_InsertLink( select(4, C_ArtifactUI.GetRelicInfo(i)) ) - break - end - end - else - OnRelicSlotClicked(self, relicSlot) - end - end - OH:UnregisterEvent(event) - end -end - -function OH:CreateArtifactButton() - OH.ArtifactButton = CreateFrame("Button", "SLE_ArtifactButton", E.UIParent) -end - function OH:Initialize() if not SLE.initialized then return end OH.db = E.db.sle.orderhall @@ -68,10 +32,6 @@ function OH:Initialize() OH.db = E.db.sle.orderhall end - if E.global.sle.LinkArtifactTrait then - self:RegisterEvent("ADDON_LOADED", "ArtClickHook") - end - self:RegisterEvent("SHIPMENT_CRAFTER_INFO"); self:RegisterEvent("SHIPMENT_CRAFTER_CLOSED"); end diff --git a/ElvUI_SLE/options/orderhall_c.lua b/ElvUI_SLE/options/orderhall_c.lua index 0e2b8d2..7ee7bcc 100644 --- a/ElvUI_SLE/options/orderhall_c.lua +++ b/ElvUI_SLE/options/orderhall_c.lua @@ -36,14 +36,6 @@ local function configTable() }, }, }, - LinkArtifactTrait = { - order = 3, - type = "toggle", - name = L["Link Artifact Traits"], - desc = L["Allows you to link artifact traits and relics in chat by shift+click."], - get = function(info) return E.global.sle.LinkArtifactTrait end, - set = function(info, value) E.global.sle.LinkArtifactTrait = value; E:StaticPopup_Show("GLOBAL_RL") end, - }, }, } end -- 1.7.9.5