+ Reply to Thread
Results 1 to 3 of 3

Thread: When is a players inventory available?

  1. #1
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default When is a players inventory available?

    I had hoped that Event.Unit.Available.Full would be it, but seems not.

    From the console, /script dump(Inspect.Item.Detail("si")), produces a big table with all the bag contents.

    From the Event handler:

    Code:
    function TP.PlayerAvailable(t)
    	for	k,v in pairs(t) do
    		if v == "player" then
    			local invdtl = Inspect.Item.Detail("si")
    			for k,v in pairs(invdtl) do
    				print(k)
    			end
    		end
    	end
    end
    
    
    table.insert(Event.Unit.Availability.Full, { TP.PlayerAvailable, addon.identifier, "Event.Unit.Availability.Full" })
    This just prints the keys

    sibg.001
    sibg.002
    sibg.003
    sibg.004
    sibg.005

    Do I need to also deal with Event.Item.Slot ?
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  2. #2
    Shield of Telara Adelea's Avatar
    Join Date
    Mar 2011
    Posts
    734

    Default

    Well it seems that Event.Item.Slot() doesnt get fired to allow the inventory to be queried.

    A fresh login DOES give the inventory contents as part of Event.Unit.Availability.Full, but a /reloadui does not.

    Is the lack of updates in /reloadui a bug? Is there a workaround?
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  3. #3
    Plane Walker Imhothar's Avatar
    Join Date
    Feb 2012
    Posts
    439

    Default

    Event.Item.Slot/Update are there only to notify about changes, not about soemthing being available. It doesn't get fired after /reloadui for technical reasons (allthough I would be very happy to have the exactly same chain of events fire after logon/reloadui). Either use Inspect.Item.List() after a UI load or store the player's inventory in saved variables and use that as reference.
    Author of the Imhothar's Bags addon.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts