Feature: Combat only
Rdyx opened this issue ยท 0 comments
Hello, very sorry that I can't make a pull request and push some code since I edited your lua code directly from my gaming machine (and I don't really want to get into installing everything just for 1 thing :))
So, what's in?
I wanted to have a "Combat only" option to trigger the add-on only when I enter combat (and disable when I exit combat ofc). This way I don't get spells from out of combat shown (since they are mostly useless imo).
My editions are adding a button to trigger Combat only mode, which is disabled by default. When triggered, TrGCDEnterEventHandler will now check if Combat only mode is enabled and if yes, will enable addon properly depending on zones activated. When getting out of combat and Combat only mode is enabled, addon will be hidden (whatever place is configured).
Ofc, when Combat only mode is disabled, it will do the proper checks as it's doing right now to know if it should be enabled or not.
Resetting to default settings disable Combat only mode.
Used events to trigger show/hide are PLAYER_REGEN_DISABLED & PLAYER_REGEN_ENABLED, based on https://wowwiki.fandom.com/wiki/Events/Combat#PLAYER_REGEN_DISABLED
Last but not least, the edited code (I just copy/pasted the whole file)
Hope this will help :) Ty for your job!
Edit: pull request in #14 , finally managed to install dev features on my gaming pc ;p