Quantcast

Heirloom changes for Garrosh stuff

Repooc [11-17-13 - 05:02]
Heirloom changes for Garrosh stuff
Filename
ElvUI_SLE/modules/characterframe/itemlevel.lua
diff --git a/ElvUI_SLE/modules/characterframe/itemlevel.lua b/ElvUI_SLE/modules/characterframe/itemlevel.lua
index a94dcd6..e293065 100755
--- a/ElvUI_SLE/modules/characterframe/itemlevel.lua
+++ b/ElvUI_SLE/modules/characterframe/itemlevel.lua
@@ -2,7 +2,8 @@ local E, L, V, P, G, _ = unpack(ElvUI);
 local CFO = E:GetModule('CharacterFrameOptions')
 local LSM = LibStub("LibSharedMedia-3.0")
 -- /dump GetInventoryItemLink("player",INVSLOT_HEAD) Leave in here for my notes
-
+-- /dump GetInventoryItemLink("player",GetInventorySlotInfo("MainHandSlot"))
+-- /run x=GetInventoryItemLink("player",GetInventorySlotInfo("MainHandSlot"));baseLevel = select(4,GetItemInfo(x)); print(baseLevel)
 local ilvlSlots = {
 	"HeadSlot","NeckSlot","ShoulderSlot","BackSlot","ChestSlot","WristSlot","MainHandSlot","SecondaryHandSlot",
 	"HandsSlot","WaistSlot","LegsSlot","FeetSlot","Finger0Slot","Finger1Slot","Trinket0Slot","Trinket1Slot"
@@ -15,6 +16,12 @@ local WOW_Heirlooms = {
 		42949,48687,42984,44100,44101,44092,48718,44091,42952,48689,
 		44099,42991,42985,48691,44094,44093,42945,48716
 	},
+	[90] = {
+		105683,105693,105691,105690,105689,105688,105687,105686,
+		105685,105684,105692,104402,104407,104405,104404,104403,
+		104409,104401,104400,104399,104406,104408,105678,105679,
+		105680,105676,105675,105677,105673,105672,105671,105670,105674
+	},
 }

 function CFO:UpdateItemLevel()
@@ -32,7 +39,17 @@ function CFO:UpdateItemLevel()
 		if itemLink then
 			local itemLevel = self:GetActualItemLevel(itemLink);
 			local rarity = select(3,GetItemInfo(itemLink))
-			if rarity == 7 then
+			local _, _, _, _, heirloomid = string.find(itemLink, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?");
+			heirloomid = tonumber(heirloomid);
+			local checkheirloom = true
+
+			for k,hID in pairs(WOW_Heirlooms[90]) do
+				if hID == heirloomid then
+					checkheirloom = false;
+				end
+			end
+
+			if (rarity == 7 and checkheirloom == true) then
 				actualItemLevel = self:Heirloom(itemLink);
 			else
 				actualItemLevel = itemLevel