Rogue: Rotation not showing, when target starts as friendly, but turns hostile
Irrelephanted opened this issue ยท 2 comments
Example would be the 4 guys before Odyn.
You have to talk to them, before they turn hostile.
If you select something else, and then back to them, once they are hostile, it works fine. :)
Same goes for tendrils by Helya, before the encounter starts.
this occurs because Target Cache is only refreshed on "PLAYER_TARGET_CHANGED" (https://github.com/herotc/hero-lib/blob/master/HeroLib/Events/Main.lua#L443) . The Cache from "UNIT_TARGETABLE_CHANGED" is commented to never fire (https://github.com/herotc/hero-lib/blob/master/HeroLib/Events/Main.lua#L511) . This cached value is then pulled here https://github.com/herotc/hero-lib/blob/master/HeroLib/Class/Unit/Main.lua#L125 . Best fix would probably be to try finding an event that fires on Target/Unit attackability change, if such an event exists, other options would probably add a bigger performance hit.
This should be fixed now as of herotc/hero-lib@4aa733b