ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Logging in vs /reloadui (https://www.esoui.com/forums/showthread.php?t=1346)

stjobe 05/03/14 03:15 PM

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.

Seerah 05/03/14 06:18 PM

I don't think so...

GetBackYouPansy 05/04/14 08:39 AM

Is it not just a case of only reacting to the first player activation event you see after your addon was loaded?

stjobe 05/04/14 09:31 AM

Quote:

Originally Posted by GetBackYouPansy (Post 6901)
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? :)

GetBackYouPansy 05/04/14 09:59 AM

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.

stjobe 05/04/14 10:14 AM

Quote:

Originally Posted by GetBackYouPansy (Post 6911)
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!


All times are GMT -6. The time now is 07:43 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI