+ Reply to Thread
Results 1 to 7 of 7

Thread: Event.Buff.Add only target and self?

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

    Default Event.Buff.Add only target and self?

    I receive no events for my focus target, and I suspect all the other unit identifiers ( i do receive them for player and player.target )

    player.target.target,
    focus,
    focus.target,
    player.pet,
    player.pet.target

    is there an alternative way to register a handler for the event that includes all the unit identifiers?
    Last edited by Firieth; 08-24-2013 at 03:02 PM.

  2. #2
    RIFT Guide Writer Noshei's Avatar
    Join Date
    Feb 2011
    Posts
    1,886

    Default

    Quote Originally Posted by Firieth View Post
    I receive no events for my focus target, and I suspect all the other unit identifiers ( i do receive them for player and player.target )

    player.target.target,
    focus,
    focus.target,
    player.pet,
    player.pet.target

    is there an alternative way to register a handler for the event that includes all the unit identifiers?
    I believe the identifier for focus is actually player.focus, but I may be wrong.

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

    Default

    Well focus identifier correct or not, when printing out the unit, I never see the focus Add event occur.. boo

    BuffAdd(handle, unitId, buffs)
    local unit = Inspect.Unit.Lookup(unitId)
    print(unit )

  4. #4
    RIFT Guide Writer Noshei's Avatar
    Join Date
    Feb 2011
    Posts
    1,886

    Default

    and you are doing this with something focused, correct?

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

    Default

    yes.. My test was simple, Target boss Dummy, Set focus Boss Dummy, Apply Radiant Spores.

    I receive the add notification for target but not focus.

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

    Default

    You wont get them for the same unit ID twice.

    If you focus one dummy, target another, and then have someone else put buffs/debuffs on your focus target, you should get them (or do a /cast @focus spellname)

    If you think about it, this makes sense - since in a raid of 20 ppl all targetting the same boss, you dont want to receive Event.Buff.Add events for the boss for all 20 players in the raid.
    Last edited by Adelea; 08-24-2013 at 11:26 PM.
    http://forums.riftgame.com/image.php?type=sigpic&userid=125779&dateline=13553  38065

  7. #7
    Rift Chaser Ferather's Avatar
    Join Date
    Jun 2011
    Posts
    341

    Default

    Adelea is correct. Cant have two lookups in one table if they have the same unit ID. However you can still use it.

    lets say your incoming table is called "params" : MyEvent(params)

    you can do:

    local focusTarget = Inspect.Unit.Lookup("focus.target") ---- Turns it into an id to compare

    if params and params[focusTarget] then ---- Validates the ID you request is in the table no matter its lookup
    ---- do stuff here
    end

    All events like this use the Unit.Inspect.List() and in this case need a little more details.

    Code:
    function MyEvent(params)
    	local focusTarget = Inspect.Unit.Lookup("focus.target")
    
    	if params and params[focusTarget] then
    		--- Do Stuff Here
    	end
    end
    Enjoy
    Last edited by Ferather; 08-25-2013 at 03:34 PM.

+ 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