Wish: hookable event when someone's DKP changes #13


  • New
  • Enhancment
Open
Assigned to beeeeeaaaaar
  • _ForgeUser11763 created this issue Feb 11, 2010

    Already posted this as a comment, but that won't notify you by email, so opening a ticket in the hope that this will attract your attention:

    My guild is using RT, and we're also using in parallel an addon for DKP bidding (BidManiac, but with code modified by me) and another addon for assigning raidspots when the raid is oversubscribed (called RotateMeIn!, written by me, not published yet).

    Both BidManiac and RotateMeIn! should use raiders' current DKP for their inner workings. The problem I have is that I can import from our EQDKP+ site the DKP values at the start of the raid, but as the raid progresses and people buy loot, those values become out of date.

    I looked in Raid Tracker for something to hook safely in order to be notified whenever someone spends DKP (or an adjustment of any kind is made to their DKP). After 10 minutes investigation I found this in UI_Dialog.lua:
    <<code>> (line 128) function RT_Dialog:Edit_OnSave( frame, option ) (...) (line 207) elseif frame.type == "cost" then if frame.what == "item" then if value and (not tonumber(value) or not string.find(value, "^(%d+%.?%d*)$")) then rt:Print("Edit Cost: Invalid value") else item.cost = value if type(dkpp_ctra_sub) == "function" then dkpp_ctra_sub(frame.raidid, frame.itemid) end end if option == "bank" or option == "disenchanted" then item.player = option end end

    <</code>>
    The line "item.cost = value" seems to be what I'm looking for, but
    (a) it's buried deep into sensitive code, too sensitive to hook safely imo;
    (b) I'm not sure it's the only place where people's DKP is adjusted.

    Do you have any advice ? How could I safely accomplish what I'm trying to do?

    Thanks in advance.

  • _ForgeUser11763 added the tags New Enhancment Feb 11, 2010

To post a comment, please login or register a new account.