Going mad.... [Strange AceDB-2.0 data updates]
As I said in the title...I'm going mad. You may know I've written SkillsPlusFu, and have been happy with it, but recently (or rather for the past couple months) it's been behaving strangely. The behaviour concerns the Alchemy skill cooldowns.
I've got the following setup: -- declare the database on account level Code:
SkillsPlusFu:RegisterDefaults("account", { Code:
function SkillsPlusFu:OnEnable() -- loops spells and if it finds a transmute, write it and consider things done Code:
function SkillsPlusFu:TRADE_SKILL_CLOSE() Code:
function SkillsPlusFu:WriteCooldownInfo(itemName,cooldown) I have a transmuter and every time I do a transmute, the timer gets reset. I get the Printed debugger. I can see the timer is reset in the FuBar tooltip and from the menu (showing something like Alchemy (0/1)). Now the strange thing happens. When I logoff and swap toons. The cooldown says it's ready in the FuBar tooltip and from the menu (showing something like Alchemy (1/1)). Swaping again, I run a chance (doesn't always seem to happen which drives me even crazier) to see the previous character to have acquired a ready Transmute cooldown (even with Alchemy not part of their skills) This shows both in the FuBar tooltip and from the menu (showing something like Alchemy (2/2)). If I go back to the Alchemist and open and close the Tradeskill-window the timer gets reset again. With a proper debugger messages. Shutting down after a clean start, will show the SavedVariables file to have saved the cooldown as ready (but I still see no messages of the counter being reset to zero). The tailor stuff in the second bit of code seems to work fine and each piece of cloth-cooldown is properly saved (although my tailor just acquired a Transmute cooldown). Frankly, I can't see what's going on and it's driving me round the bend. Help would be much appreciated. |
Strangely it seems to work the first time the data is saved, but not after it's used a second time. I've also streamlined stuff a little and moved all the GetSpellInfo's to a table (thanks to Elkano for the hint), so all cooldown tradeskill spells now use the same function.
The really strange thing is that it seems to do a final update of the cooldown data after I close the the character by logging out. Debugger statements (on the save function) don't show up. When I log on to the next toon, I see that the Alchemy cooldown is reset. Again, without any debuggers showing up, and even without opening a trade window. |
The problem hasn't gone away yet. Is there anyone with a suggestion why data erratically doesn't get saved to the SavedVariables file?
|
All times are GMT -6. The time now is 02:59 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI