Hello!
I'm writing a mod to manage DKP bids for my guild. The guild does bids with whispers - everyone whispers a player (the one with the mod) and then the mod calculates who is the winner, according to our rules. What I would like to to make it notice the players who have already bid for the item. So far I have this:
Code:
ProphDKP_bidders = {}
if (event == "CHAT_MSG_WHISPER") then
if not ProphDKP_bidders[arg2] then
ProphDKP_bidders[arg2] = 1
else
ProphDKP_bidders[arg2] = ProphDKP_bidders[arg2] + 1
end
for name,amount in pairs(ProphDKP_bidders) do
if (amount > 1 and name == arg2) then
ProphDKP_duplicatebid = 1
end
end
end
This is obviously a part of a longer piece of code, but this should be enough for you to help me.
Problem is that after someone has bid two times, it will also treat all bid coming after that persons second bid as duplicates, even if they aren't.
Any help appreciated