PantheonDKP

PantheonDKP

17k Downloads

Feat: DecayTracker

Bengejd opened this issue ยท 0 comments

commented

Added new database called "decayTracker".

Whenever a decay entry is being sent out, the addon should check to see if decay for that week, with those membets has already occurred. If it has, it should disregard the entry export, and fail.

Whenever an entry is imported into the addon, it should check to see if the entry ID (timestamp) is less than the current week's decay entry ID. If it is, it should reverse the decay entry's previous values, apply the new imported entries to the database (updating values), and then when finished, it should re-apply the decayed entry's amount.

This should prevent a scenario where one officer adds a few entries, and then logs off. Afterwhich, a second officer logs on, submits a few entries, and then submits a decay entry.

Currently, if they do not receive OfficerOne's entries via another officer, prior to submitting the decay entry, they will submit the decay for an "incorrect" amount, meaning that the true total will not match what it should be, and everyone will receive that sync-decay entry with the incorrect totals.

With the new method, it would ensure that all decayed entries for that week, are re-applied, if an older entry than the decay entry, is being imported.