Sellorio / mega-macro

A World of Warcraft AddOn that replaces the built in macro functionality allowing more and bigger macros.
18 stars 13 forks source link

Potential 'fix' for the ElvUI icon range checking coloration #148

Open SwordaDev opened 2 years ago

SwordaDev commented 2 years ago

Hello there !

I'm not really familiar with Lua, but I tried fixing the range coloration issue on the icons while not in range using ElvUI. After tweaking around I found that commenting the two following lines:

https://github.com/Sellorio/mega-macro/blob/86764cfa09c09c296a80b1e7445ed2a78442cdbf/src/engine/mega-macro-action-bar-engine.lua#L56-L57

Seem to have the desired behaviour. I do not have extensive knowledge as to why it works though, and hope it does not breaks anything - though I didn't see anything wild or any Lua error.

Example with a simple macro: image

In the bar while not in range: image

In the bar while in range: image

I don't know if that's going to be useful at all, but I thought I might share. :)

Sellorio commented 2 years ago

I suspect it will break under some conditions, maybe out of mana or similar cases where the icon is shaded. I haven't looked at this stuff or played WoW for many many months. I guess keep using your version and if you don't notice any issues for a while make a PR and I'll approve :)

SwordaDev commented 2 years ago

I will test it on other classes as well, so far it seems to work fine on my warrior and the shaded state is working when out of rage.

SwordaDev commented 2 years ago

So it's been a while and I didn't get any issues, though it might not be ideal for everyone (it's fine for me as I use ElvUI). I would not really recommend to merge this change as it might have other impact (and I'm not fully knowledgeable in LUA). We could maybe leave this as a potential fix for people facing the same issue.

Sellorio commented 2 years ago

I'm back on WoW (at least for a bit) so I'll make the change locally and see how it goes too. I'll do some quick tests and then give it the all clear if that all checks out.

Sellorio commented 2 years ago

There are issues when using conditionals in macros. If the macro switches from an unusable ability to a usable one the button stays dark.