Quantcast

Sneaky stealing shit

Darth Predator [05-12-17 - 08:43]
Sneaky stealing shit
Filename
ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
ElvUI_SLE/modules/bags/artifactpower.lua
diff --git a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
index a7fdf06..a935f36 100644
--- a/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
+++ b/ElvUI_SLE/modules/Armory/CharacterArmory/CharacterArmory.lua
@@ -1156,7 +1156,6 @@ do --<< Artifact Monitor >>
 		["zhCN"] = "(%d*[%p%s]?%d+)δΈ‡",
 	}
 	local apStringValueMillionLocal = apStringValueMillion[GetLocale()]
-	local empoweringSpellName = GetSpellInfo(227907)

 	function CA:LegionArtifactMonitor_UpdateLayout()
 		if Legion_ArtifactData.ItemID then
@@ -1339,8 +1338,7 @@ do --<< Artifact Monitor >>
 									end
 								end
 							else
-								local itemSpell = GetItemSpell(PowerItemLink)
-								if itemSpell and itemSpell == empoweringSpellName then
+								if IsArtifactPowerItem(PowerItemLink) then
 									self:ClearTooltip(self.ArtifactMonitor.ScanTT)
 									local success = pcall(self.ArtifactMonitor.ScanTT.SetHyperlink, self.ArtifactMonitor.ScanTT, PowerItemLink)
 									if success then
diff --git a/ElvUI_SLE/modules/bags/artifactpower.lua b/ElvUI_SLE/modules/bags/artifactpower.lua
index 48d6b46..33dafde 100644
--- a/ElvUI_SLE/modules/bags/artifactpower.lua
+++ b/ElvUI_SLE/modules/bags/artifactpower.lua
@@ -6,8 +6,6 @@ local B = E:GetModule('Bags')
 local _G = _G
 local tooltipScanner
 local tooltipName = "SLE_ArtifactPowerTooltipScanner"
-local EMPOWERING_SPELL_ID = 227907
-local empoweringSpellName
 local arcanePower
 local AP_NAME = format("%s|r", ARTIFACT_POWER)
 local pcall = pcall
@@ -33,8 +31,7 @@ local apStringValueMillionLocal = apStringValueMillion[GetLocale()]
 local function GetItemLinkArtifactPower(slotLink)
 	local apValue
 	if not slotLink then return nil end
-	local itemSpell = GetItemSpell(slotLink)
-	if itemSpell and itemSpell == empoweringSpellName then
+	if IsArtifactPowerItem(slotLink) then
 		tooltipScanner:ClearLines()
 		local success = pcall(tooltipScanner.SetHyperlink, tooltipScanner, slotLink)
 		if (not success) then
@@ -125,7 +122,6 @@ function AP:Initialize()

 	tooltipScanner = CreateFrame("GameTooltip", tooltipName, nil, "GameTooltipTemplate")
 	tooltipScanner:SetOwner(E.UIParent, "ANCHOR_NONE")
-	empoweringSpellName = T.GetSpellInfo(EMPOWERING_SPELL_ID)

 	hooksecurefunc(B,"UpdateSlot", SlotUpdate)
 	hooksecurefunc(_G["ElvUI_ContainerFrame"],"UpdateSlot", SlotUpdate)