Raid Tracker

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

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.

User When Change
paladyin Feb 12, 2010 at 01:31 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Reported
Feb 12, 2010
Status
New - Issue has not had initial review yet.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees