|
|
#11 | |
|
Hero Member
Join Date: Dec 2006
Posts: 662
|
Quote:
|
|
|
|
|
|
|
#12 |
|
Seal Cub Clubbing Club
Join Date: May 2005
Location: California, US
Posts: 7,755
|
Profile resetting doesn't affect the "global" section of your DB.
If you do: Code:
self.db = LibStub("AceDB-3.0"):New("MyAddonDB")
Code:
self.db = {
char = { },
realm = { },
class = { },
race = { },
faction = { },
factionrealm = { },
global = { },
profile = { },
}
The only section of the database that is affected by a profile change (including creating a new profile, switching to a different profile, resetting a profile, or deleting a profile) is the "profile" section. As for the mysterious resetting, there may be an actual cause for it in your code, but since you didn't post all of your code, there's no way for anyone but you to look into that. It's also possible that the people reporting "halp my settingz is gone" are failing to mention that WoW crashed or they quit WoW by pressing Alt-F4. If the game client doesn't quit normally, it doesn't go through the "shutdown" process that includes writing saved variables to disk.
__________________
& Author/maintainer of Grid, PhanxChat, and many more. | PM me on CurseForge Troubleshoot an addon | Turn any code into an addon | More addon resources Need help with your code? Attach or paste your whole, real files. Please don't PM me about addon bugs, requests, or code help. Post a comment, ticket, or thread instead! |
|
|
|
|
|
#13 | |
|
Newbie
Join Date: Nov 2010
Posts: 8
|
Quote:
Could it be a timing issue with WoW and Ace3 where somethings maybe aren't entirely loaded by the time Mod:OnInitialize() is called, so dumping it down to OnEnable would be beneficial? Or more to the point, is there anything that will go wrong if the db is setup in Enable instead of Init (of course, assuming I don't look at anything til OnEnable which is currently the case anyhow). |
|
|
|
|
|
|
#14 | ||
|
Legendary Member
Join Date: Dec 2006
Posts: 2,321
|
Quote:
Quote:
__________________
Author of Inline Aura, AdiBags, Squire2 and several other addons. Each time you hit your "copy" command with a block of code, think about a way to refactor it so it did what you want without using the "paste" command. |
||
|
|
|
|
|
#15 |
|
Super Moderator
Join Date: Aug 2005
Location: Germany/Hamburg
Posts: 1,782
|
One thing that can and will break it is calling LoadAddon in your main chunk, that is outside of any functions. If you must load some other addon, just put up a dependency, or load it in OnInit or even later.
__________________
Author/Maintainer of Ace3, Bartender, Mapster, Quartz, HotCandy, and various small and helpful addons WoWAce Administrator and AddOn Moderator You can Donate if you want, any help is appreciated! |
|
|
|
|
|
#16 |
|
Legendary Member
Join Date: Dec 2006
Posts: 2,321
|
You shouldn't be able to load any addon with LoadAddOn before PLAYER_LOGIN (e.g. OnEnable) anyway.
__________________
Author of Inline Aura, AdiBags, Squire2 and several other addons. Each time you hit your "copy" command with a block of code, think about a way to refactor it so it did what you want without using the "paste" command. |
|
|
|
|
|
#17 |
|
Super Moderator
Join Date: Aug 2005
Location: Germany/Hamburg
Posts: 1,782
|
Where did you get that wisdom?
You can LoadAddOn whenever you wish, and it will load that addon just fine. It will just break the AceAddon initialization logic if too many ADDON_LOADED fire in a weird order.
__________________
Author/Maintainer of Ace3, Bartender, Mapster, Quartz, HotCandy, and various small and helpful addons WoWAce Administrator and AddOn Moderator You can Donate if you want, any help is appreciated! |
|
|
|
|
|
#18 |
|
Hero Member
Join Date: Nov 2005
Posts: 803
|
If you mean a user created addon then it should "mostly" be fine.
It's definitely a bad idea to force load Blizzard_* load on demand addons too early blindly. If you want a specific example look at addons that were force loading Blizzard_GuildUI too early and in the process breaking the in-game Calendar. So no.. it's not a good idea to just load whenever you want whenever you want with no qualification. That's probably not what you meant but last post came out as "LoadAddOn() whenever you wish it's fine"
|
|
|
|
|
|
#19 |
|
Asian Sheep Lover
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
|
If you want a Blizzard_* addon to load before yours, you either
A) RequiredDeps it Or B) Make your addon LoadOnDemand, and put that Blizzard_* addon as a LoadWith entry.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others. |
|
|
|
|
|
#20 |
|
Hero Member
Join Date: Nov 2005
Posts: 803
|
(B) is good, (A) is bad.
A is exactly what broke guild events in calendar for a bunch of people. C. register ADDON_LOADED, watch for "Blizzard_*" as arg and do whatever you needed from the Blizz LoD addon after it loads. |
|
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
All times are GMT. The time now is 01:55 PM.
WowAce Forums





