Thread: Item Mixins
View Single Post
10-18-18, 09:25 AM   #1
Lolzen
An Aku'mai Servant
 
Lolzen's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 36
Item Mixins

So i'm just diving in to the whole Mixin stuff and am not sure if this is possible.

As GetDetailedItemLevelInfo() is still not returning the correct value all the time, i stumbled upon this thread which worked wonders for me.
Code:
local function getItemlvl(unit, slotIndex)
	if slotIndex == 18 then
		slotIndex = 19
	end
	if unit and UnitExists(unit) then
		local item = Item:CreateFromEquipmentSlot(slotIndex)

		if item then
			return item:GetCurrentItemLevel()
		end
	end
end
This will return the correct values on the PaperdollFrame, however i'm now hitting a wall to understand how i can do the exact same thing for the InspectFrame.
As CreateFromEquipmentSlot will only take the slotIndex, it somewhere hast to point to the player's inventory. If i could replicate that and point to the inspected unit's inventory this would open the door to the solution.

Is this even possible somewhow with using this/a Mixin?

EDIT: also using the CreateFromItemLink Mixin doesn't show the correct itemLevel else this wouldn't be an issue.

Last edited by Lolzen : 10-18-18 at 09:36 AM.
  Reply With Quote