+ Reply to Thread
Results 1 to 4 of 4

  Click here to go to the first Rift Team post in this thread.   Thread: Inspect.Item.Detail(slot) return inconsistency is annoyingish

  1. #1
    RIFT Community Ambassador the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default Inspect.Item.Detail(slot) return inconsistency is annoyingish

    Here's the thing:

    If I know that a thing is some kind of valid slot specifier -- a thing that could have come from Utility.Item.Slot.*() -- I cannot predict what I will get from Inspect.Item.Detail(slot). I will either get a table of { slotspec = table, slotspec = table } results, or a single one of those tables.

    I think I might be happier if the return were { slotspec = table } even when there's only one table, just because it'd be more consistent. And yes, I had code explode on this recently. (Wait, why do I have a slot named "name" and the item in that slot isn't a valid table?)
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  2.   Click here to go to the next Rift Team post in this thread.   #2
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Actually, you can force it. Instead of Inspect.Item.Detail(thingThatCameFromSlot), do Inspect.Item.Detail({[thingThatCameFromSlot] = true}). You'll get the key/value table format no matter what.

  3. #3
    RIFT Community Ambassador the_real_seebs's Avatar
    Join Date
    Jan 2011
    Posts
    16,859

    Default

    Hmm.

    Does that work for something like { si01 = true }, where the slot spec actually specifies multiple slots?

    If so, that's good enough to let me fix things.
    You can play WoW in any MMO. You don't have to play WoW in RIFT. Oh, and no, RIFT is not a WoW clone. Not having fun any more? Learn to play, noob! I don't speak for Riftui, but I moderate stuff there. Just came back? Welcome back! Here's what's changed. (Updated for 2.5!)

  4.   This is the last Rift Team post in this thread.   #4
    Rift Team
    Join Date
    Oct 2010
    Posts
    927

    Default

    Quote Originally Posted by the_real_seebs View Post
    Does that work for something like { si01 = true }, where the slot spec actually specifies multiple slots?
    Sure does And note that you can use multiple grouped specifiers - for example, I've got a bit of code that does Inspect.Item.Detail({si01 = true, si02 = true, si03 = true, si04 = true}) to get a list of all the items in the first four bags.

    Note that it won't work if thingThatCameFromSlot is actually a table - it doesn't attempt to look into nested tables.

+ 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