+ Reply to Thread
Results 1 to 3 of 3

Thread: Event.Unit.Detail.Role

  1. #1
    Plane Touched
    Join Date
    Aug 2010
    Posts
    248

    Default Event.Unit.Detail.Role

    Not sure how to utilize this event Event.Unit.Detail.Role..

    Seebs Documenation appears to be wrong as the parameters in his documentation

    Event.Unit.Detail.Role(units)

    vs

    Event.Unit.Detail.Role(handle, units)

    Also, I don't really understand how to relate a Role change event to a role from Event.Unit.Detail.Role(units)

    My expectation is that a role change event would indicate to me that my role changed to a role found in Event.Unit.Detail.Role(units)

    Event.Unit.Detail.Role(units)

    returns a list of roles Key,Name

    while Event.Unit.Detail.Role(units) returns a list of "Role Type" (dps/heal/support/tank), and an ID that I don't know what to do with..

    How to I tell what Role I am currently in (1-20 or by name) Was hoping the event would give me that ID.

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

    Default

    It's unfortunate that role refers to both the role a character plays (tank,dps,heal,support) and to a specific saved set of souls + points.

    However, this is what I do in EZRebuff for the soul aspect part of it:

    Code:
    function EZ.Event_TEMPORARY_Role(h, r)
    	if r > 0 and r ~= _ezROLEID then
    		_ezROLEID = r
    		if EZRebuff_Settings.roles[_ezROLEID] == nil then
    			EZRebuff_Settings.roles[_ezROLEID] = {}
    		end		
    		EZ.ClearBuffs()
    	end
    end
    
    function EZ.Event_Unit_Availability_Full(h,t)
    	for k,v in pairs(t) do
    		if v == "player" then
    			EZ.Event_TEMPORARY_Role(h, Inspect.TEMPORARY.Role())
    			Command.Event.Detach(Event.Unit.Availability.Full, nil, nil, nil, addon.identifier)
    		end
    	end
    end
    
    Command.Event.Attach(Event.TEMPORARY.Role, EZ.Event_TEMPORARY_Role, "Event.TEMPORARY.Role")
    Command.Event.Attach(Event.Unit.Availability.Full, EZ.Event_Unit_Availability_Full, "Event.Unit.Availability.Full")
    The use of Event.Unit.Availability.Full lets you use Inspect.TEMPORARY.Role() at a point where it should return a valid result.

    Then the function that handles Event.TEMPORARY.Role gets as a parameter a number corresponding to the role that has become active.

    Note: * Added Inspect.Role.List(). This lets you list the role names that the player has. Eventually, Inspect.Role.Detail() will join this, but that hasn't happened yet. You can find out which role the player *currently* uses with Inspect.TEMPORARY.Role(). Note that their ID schemas are off-by-one compared to each other.
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  3. #3
    Plane Touched
    Join Date
    Aug 2010
    Posts
    248

    Default

    Thanks! That worked like a charm.

+ 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