Quantcast

Reverting commit 27747b

Darthpred [09-18-16 - 11:25]
Reverting commit 27747b
Apparently 7.1 will introduce the ability to link those without messing with the code
Filename
ElvUI_SLE/core/install.lua
ElvUI_SLE/defaults/private.lua
ElvUI_SLE/modules/orderhall.lua
ElvUI_SLE/options/orderhall_c.lua
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