dandruff / xCT

A light weight scrolling combat text implementation.
53 stars 22 forks source link

Filtering spells even when they're misses #189

Closed oBusk closed 3 years ago

oBusk commented 3 years ago

Filtering a spell because it's too spammy is kind of ruined by the fact that if that spell is resisted/immuned/absorbed etc. it still shows.

The idea of this PR is to check if the spell is filtered before showing any miss information.

fixes #186, fixes #177

oBusk commented 3 years ago

Making sure to filter spells on outgoing misses was pretty simple and works great!

I tried (https://github.com/dandruff/xCT/pull/189/commits/bea3bac7347d563c8fac8da037d8969b2328201f) to filter incoming absorbs also, but as far as I could find, when we get an absorb, we don't actually get a spell ID. I'm not sure if this is a combatparser thing or a wow combat thing...

dandruff commented 3 years ago

I think I just added support for _ABSORBED if you wanted to try with that. (47dd8c4)

oBusk commented 3 years ago

I got it to work! 😄 It turns out every damage tick was triggering both SPELL_ABSORBED and a _MISSED event, so adding special code for _ABSORBED to see which spell triggered turned out to be unecessary, since the absorbed message that was shown came from the _MISSED event, which we already had spell information.

I had been fooled by the code in IncomingMiss attempting to use extraSpelId to show the icon for the spell that missed. So as a bonus I fixed the bug where incoming misses would not have the spell icon next to them.