+ Reply to Thread
Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By the_real_seebs

  Click here to go to the first Rift Team post in this thread.   Thread: What about Inspect.Unit.List()?

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

    Default What about Inspect.Unit.List()?

    It occurs to me:

    It might be awfully nice for Inspect.Unit.List() to exist. Inspect.Unit.List() returns
    {
    "player" = UNITID,
    "group02" = UNITID,
    ...
    }

    and includes all units for which Inspect.Unit.Detail will, as of this instant, return non-trivial results.

    This would simplify life for a lot of scanning addons, I think.
    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

    Quote Originally Posted by the_real_seebs View Post
    It occurs to me:

    It might be awfully nice for Inspect.Unit.List() to exist. Inspect.Unit.List() returns
    {
    "player" = UNITID,
    "group02" = UNITID,
    ...
    }

    and includes all units for which Inspect.Unit.Detail will, as of this instant, return non-trivial results.

    This would simplify life for a lot of scanning addons, I think.
    Code:
            Inspect.Unit.List
                    Function documentation:
                            Lists all the units that the client can see.
                                    list = Inspect.Unit.List()   -- table <- void
                    Return values:
                                    list:   Map of unit ID to unit specifier. Units with multiple valid specs will have one chosen at random.
    It, uh, does?

    Though it maps in the other direction.

    That said, it's a nice sign of API consistency that you can invent a function name and it already exists in almost the exact intended form
    Last edited by ZorbaTHut; 12-08-2011 at 08:53 PM.

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

    Default

    wtf

    How did I miss that? Did you add it sometime recently?
    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.   Click here to go to the next 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
    How did I miss that? Did you add it sometime recently?
    Nope, I'm pretty sure that's been there since addon alpha

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

    Default

    Ahh, wait! I actually wanted it backwards -- I wanted the list in the form specifier -> ID. The issue is that... say I have group02 targeted. Do I see that as "group02" or "target"? How do I determine whether or not "group02" exists, without querying it? So a list of all valid specifiers (or at least all reasonable ones) would be useful.

    Obviously in the case of, say, having yourself targeted, there's a limit to what you can do there.
    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!)

  6. #6
    Sword of Telara Semele's Avatar
    Join Date
    Mar 2011
    Posts
    872

    Default

    Quote Originally Posted by the_real_seebs View Post
    Ahh, wait! I actually wanted it backwards -- I wanted the list in the form specifier -> ID. The issue is that... say I have group02 targeted. Do I see that as "group02" or "target"? How do I determine whether or not "group02" exists, without querying it? So a list of all valid specifiers (or at least all reasonable ones) would be useful.

    Obviously in the case of, say, having yourself targeted, there's a limit to what you can do there.
    In essence this is exactly what my Raid Manager library does with some extra monitoring and managing with useful event firing. It tracks raid members, combat states, raid member pets etc, etc, but will fire meaningful events such as Event.Group.Join, Event.Group.Leave and Event.Group.Move.

    One of the commands is LibSRM.Group.Inspect(index) <-- Returns Specifier {string}, UnitID, which acts as an index to specifier translator and will return an ID for that slot if a player exists.
    Rank 76 Guardian Mage

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

    Default

    Quote Originally Posted by the_real_seebs View Post
    So a list of all valid specifiers (or at least all reasonable ones) would be useful.

    Obviously in the case of, say, having yourself targeted, there's a limit to what you can do there.
    This is sort of the problem - it's tough to define what a "reasonable specifier" is. I'd suggest just generating a list of what you believe is "reasonable", then using LibUnitChange or similar to monitor them.

    Or use someone else's library, if it does what you want

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

    Default

    Well, one trivial definition of "reasonable" would be "all unit specifiers with only one dot". Thus, "group02.target" or "player.pet", but not "player.target.target". (But "target.target", as I recall.) But I don't actually know the set of all possible top-level specifiers!
    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!)

+ 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