Thread Tools Display Modes
05/03/14, 03:15 PM   #1
stjobe
 
stjobe's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Logging in vs /reloadui

Is there a way to distinguish between the character logging in and doing a /reloadui?

Currently I'm subscribing to EVENT_ADD_ON_LOADED for initialization and EVENT_PLAYER_ACTIVATED for some delayed initialization, but I could really use a way to tell whether the character has just logged in or has done a /reloadui.
  Reply With Quote
05/03/14, 06:18 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
I don't think so...
  Reply With Quote
05/04/14, 08:39 AM   #3
GetBackYouPansy
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Is it not just a case of only reacting to the first player activation event you see after your addon was loaded?
  Reply With Quote
05/04/14, 09:31 AM   #4
stjobe
 
stjobe's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Originally Posted by GetBackYouPansy View Post
Is it not just a case of only reacting to the first player activation event you see after your addon was loaded?
Perhaps.

I was thinking of setting a boolean once the initial load is done, but if there's no difference between the initial load and /reloadui I would have to store it in a SavedVar (or /reloadui would just set it to false when the addon loads), and then I would have to find out how to clear it on quit/logout.

So... Anyone knows how to catch a logout?
  Reply With Quote
05/04/14, 09:59 AM   #5
GetBackYouPansy
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 7
Oh I see what you mean, that does seem trickier

What's your requirement - why do you need the immunity to reloadi? Is that something you'd expect people to do? I wonder if there might be another way to achieve what you need.
  Reply With Quote
05/04/14, 10:14 AM   #6
stjobe
 
stjobe's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 60
Originally Posted by GetBackYouPansy View Post
Oh I see what you mean, that does seem trickier

What's your requirement - why do you need the immunity to reloadi? Is that something you'd expect people to do? I wonder if there might be another way to achieve what you need.
It's because of the way the API returns buffed stat values, especially long-term buffs like food or drink buffs; they need to persist through zoning, /reloadui, or logging in/out - but the API sees them as just another buff to your stat, no different than e.g. donning armour with higher armour value, so there's no way for me to differentiate this "new" base value from the actual base-value and show the stat as buffed.

Anyway, I think I solved the issue in another way (by storing the base stat values in a SavedVar)

Huge thanks for jolting me out of my mindset!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Logging in vs /reloadui

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off