Twintop / TwintopInsanityBar

Twintop's Resource Bar (formerly Twintop's Insanity Bar), a multi-class resource addon for World of Warcraft
MIT License
12 stars 7 forks source link

Refactor Combat Log Detection #401

Open Twintop opened 3 months ago

Twintop commented 3 months ago

The core of the bar's capabilities is driven by monitoring the combat log for events that match things the bar can consume. Currently, this is a glorified if/elseif/.../elseif/else block and is pretty inefficient.

Change this to be a data-generated hashtable of spell IDs to reduce the amount of comparisons required every cycle. These should be as generic as possible but have the option for some sort of a custom matching/lookup function for cases where e.g. a non-standard ID is needed, there is additional validation/variable updating, etc. For 95% of the things the bar does, the generic calls will be just fine.

Will need to roll this out by individual class modules. Priest will probably be the guinea pig.

Twintop commented 3 months ago

342 helps with a path forward on this. I may be able to remove some of the buff detection from here entirely now. Wait to see.

Twintop commented 1 week ago

Can confirm, #342 allows for a lot of these to be cleaned up.

Twintop commented 1 week ago

Initial pass done. I've left a few specific cases alone for now, plus everything related to healing buffs (to be addressed later).