Download
(999 b)
Download
Updated: 08/15/18 05:47 PM
Compatibility:
Wolfhunter (4.1)
Summerset (4.0)
Updated:08/15/18 05:47 PM
Created:06/15/18 06:59 PM
Monthly downloads:25
Total downloads:2,458
Favorites:10
MD5:
Anti Market Popup
Version: 1.1
by: SDPhantom [More]
There are many addons that do this, but this one is mine. I cringed at how complex everyone else's code was compared to how simple the solution is. The challenge was to write an addon to get the job done better and more efficiently. Just how I like it.

As with the others, this addon was designed to block the obtrusive market announcement dialog that occasionally pops up when you log in. If you ever wish to view it on your own terms, it's still available in the game menu.
1.1
- Sacrificed a little simplicity for more vigilant code
- Fixes issue with the market announcement popping up if there's a store update while logged in
- Check for execution from the game menu is baked into the now single callback function
Optional Files (0)


Post A Reply Comment Options
Unread 08/18/18, 02:02 AM  
SDPhantom
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 47
File comments: 48
Uploads: 4
Re: Love it!

Originally Posted by Fonkin
could we have an option (even a command line option or ini setting) that we can toggle on/off for it to display the AdVert only once the first time the account logs wihtin a 24 hour period?
I'll think about it. I already have a few ideas I'd want to look at if I were to tweak its behavior.
Report comment to moderator  
Reply With Quote
Unread 08/16/18, 03:07 PM  
Fonkin
 
Fonkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 37
Uploads: 1
Love it!

Love it! Love it!! Love it!!! - With that said, could we have an option (even a command line option or ini setting) that we can toggle on/off for it to display the AdVert only once the first time the account logs wihtin a 24 hour period?

I know it's a simple request, but a big programming challenge by comparison. I can understand and appreciate how clean this already is and that would feature would add all sorts of fun little new functions.

Either way, I love it and thank you for taking the time to create this. I'll just have to remember to look for myself for now unless you add the feature.
Report comment to moderator  
Reply With Quote
Unread 07/07/18, 09:20 AM  
SDPhantom
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 47
File comments: 48
Uploads: 4
The code got a little more simplified, yet at the same time, a little more complex. I observed a rare issue where a store update was pushed while I was playing and caused the popup to show mid-session. I rewrote this addon using a scene state handler instead of a run-once callback.

The callback allowed this addon to virtually take up no memory as it would run on login, then effectively be unloaded by the API used. While the state handler always exists now, it's only one function, and a few tricks I developed digging around the SCENE_MANAGER code allowed me to simplify detecting execution from the game menu.



Edit: A last-minute update. Apparently, hooking the scene directly for a state change causes timing issues with canceling the transition animation. This doesn't appear to be the case hooking the same "event" from SCENE_MANAGER where the previously-used SCENE_MANAGER:CallWhen() triggered from. While the function will run more, at least working is better than breaking the UI.
Last edited by SDPhantom : 07/07/18 at 10:04 AM.
Report comment to moderator  
Reply With Quote
Unread 06/16/18, 06:36 PM  
Tonyleila
 
Tonyleila's Avatar
AddOn Author - Click to view AddOns

Forum posts: 288
File comments: 763
Uploads: 7
Cool thanks! I'll make shure to pass this around
Report comment to moderator  
Reply With Quote
Unread 06/16/18, 08:53 AM  
SDPhantom
 
SDPhantom's Avatar
AddOn Author - Click to view AddOns

Forum posts: 47
File comments: 48
Uploads: 4
Basically. HLA also has a bug where it procs the first time you try to open the announcement from the game menu after a /reloadui. Without that fix, my code would be a single line.

Anyway, it ties into existing API to hook the necessary scenes instead of writing event and scene state handlers.
Originally Posted by Tonyleila
Is this a better version of HideLoginAnnouncement?
Report comment to moderator  
Reply With Quote
Unread 06/16/18, 06:06 AM  
Tonyleila
 
Tonyleila's Avatar
AddOn Author - Click to view AddOns

Forum posts: 288
File comments: 763
Uploads: 7
Is this a better version of HideLoginAnnouncement?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: