Item icons not displaying under ArkInventory #175

  • Other Addon
  • tw_vincent created this issue Jul 22, 2018

    Using the 8.x versions of ArkInventory, CanIMogIt's icons are not displayed unless the bank or guild bank is opened.


    CIMI_ArkInventoryAddFrame() is triggered from "PLAYER_LOGIN", "BANKFRAME_OPENED", and "GUILDBANKFRAME_OPENED" however ArkInventory's itemobjects do not seem to be built at PLAYER_LOGIN (except for the first item in each bag) until ArkInventory is first opened.


    I created a workaround to call CIMI_ArkInventoryAddFrame() when the ArkInventory frame is shown, it's excessive but it seems to work reliably in the interim.



  • joevt posted a comment Jul 23, 2018

    ArkInventory now has its own Transmog icons, but I prefer those used by Can I Mog It? and ALL THE THINGS.

    ArkInventory -> Config -> Settings -> Designs -> Default - Bag -> Items -> Status Icons -> Transmogrify -> Enabled.


    Maybe instead of the current method used by CanIMogIt's arkinventory plugin, it could modify functions in ArkInventory to do the drawing (if that were more efficient/performant).

  • Seclipse1999 posted a comment Jul 25, 2018

    same issue here, i prefers can i mog it icons to arks and even if i disable arks icons can i mog its will not show. this just ahppened recently as ive been using these two for months without issue

  • tw_vincent posted a comment Jul 26, 2018

    Here's my quick-and-dirty-solution should anyone want to try it before AmiYuy and company find a better solution


        function CIMI_ArkInventoryAddFrame(event)
            if event == "PLAYER_LOGIN" then -- MouseUI Workaround for lazyloading in ArkInventory
            	local frame = ArkInventory.Frame_Main_Get( ArkInventory.Const.Location.Bag )
            	hooksecurefunc(frame, "Show", function() 
            		if not frame.faux_CIMI_PLAYER_LOGIN_RUN then        		
            			frame.faux_CIMI_PLAYER_LOGIN_RUN = true


  • Arkayenro posted a comment Jul 27, 2018

    the reason its no longer working is probably because i no longer to pre-build 50 of the item frames for each bag to get around loading while in-combat issues, they get created as required now.  if youre in-combat then a temporary frame is created, and replaced once you leave combat.


    secure hook the ArkInventory.Frame_Item_OnLoad function


    its called when i need to create a new item frame, regardless of location so its the safest way to ensure whatever you need gets added to every item


    function args are ( frame, tainted )


    frame is the item frame


    tainted is a boolean.  if true dont do anything as the frame was created in combat (thus tainted) and is only temporary, it will get replaced when out of combat, if its false then do what you need to do


    note: when displaying the icons you should probably check if the location being displayed is offline or not in arkinventory as youre using bag/slot ids which wont work when AI is displaying another characters data.

    Edited Jul 27, 2018
  • Arkayenro posted a comment Jul 27, 2018

    i think this should work, but not sure as i dont use mogit


    replace existing lines with these where they overlap, the rest of the code underneath this probably doesnt need to be changed (its not the best way to do it but it works so im not touching it)


    the event functions section only has one change, the second line is commented out, thats it





    	-- UpdateIcon functions   --
    	function ArkInventoryItemButton_CIMIUpdateIcon(self)
    		if not self or not self:GetParent() then return end
    		local frame = self:GetParent( )
    		if not frame.ARK_Data then return end
    		if not CIMI_CheckOverlayIconEnabled(self) then
    			self:SetScript("OnUpdate", nil)
    		local h, sb, bag, slot
    		if ArkInventory.Global.Location[frame.ARK_Data.loc_id].isOffline then
    			local i = ArkInventory.Frame_Item_GetDB(frame)
    			h = i.h
    			bag = self.ARK_Data.blizzard_id
    			slot = self.ARK_Data.slot_id
    		CIMI_SetIcon(self, ArkInventoryItemButton_CIMIUpdateIcon, CanIMogIt:GetTooltipText(h, bag, slot))
        -- Begin adding to frames --
        function CIMI_ArkInventoryAddFrame(frame,tainted)
            if not tainted then
                -- Add to frames
                CIMI_AddToFrame(frame, ArkInventoryItemButton_CIMIUpdateIcon)
        hooksecurefunc(ArkInventory, "Frame_Item_OnLoad", CIMI_ArkInventoryAddFrame)
        -- Event functions    --
        function CIMI_ArkInventoryUpdate()
            -- Make sure all CIMI frames exist
            --CIMI_ArkInventoryAddFrame(nil, "BANKFRAME_OPENED")
            -- Bags
            for i=1,NUM_CONTAINER_FRAMES do
                for j=1,MAX_CONTAINER_ITEMS do


  • calesta_wow posted a comment Jul 27, 2018

    Thanks @Arkayenro for the reply! Hopefully the author or one of the maintainers will see it and update accordingly!

  • AmiYuy added a tag Other Addon Jul 28, 2018
  • AmiYuy closed issue Jul 30, 2018
  • AmiYuy posted a comment Jul 30, 2018

    Thank you all for the reports. This is fixed in 8.0.0v1.10.


    Also thank you Arkayenro for the help getting it working again and for the offline bags code.


    GitLab ticket:

To post a comment, please login or register a new account.