Client::SendRewards (client.cpp) handles all the loading from the DB and pushing it to the client through OP_VetRewardsAvaliable. As-is we load a DB ID for each claim from the database. This is passed between client and server so the DB ID's need to be unique.
query ran:
SELECT reward_id, amount FROM account_rewards WHERE account_id=%i ORDER by reward_id;
you could check for existing and insert new entries
SQL in perl:
http://eqemulator.org/forums/showthread.php?t=35216