Using a "resting" talent with auto-use breaks the game
Posted: Mon Jan 12, 2015 3:11 am
"Resting talents" are talents that include waiting (i the example discovered, Dig, but there are also some more like Refit Golem.)
They can cause problems because they do not properly clean up stuff like getTarget repacements, which can doo odd stuff for other talents being either auto-used or otherwise used during a supposed rest.
Log of discovery on IRC:
They can cause problems because they do not properly clean up stuff like getTarget repacements, which can doo odd stuff for other talents being either auto-used or otherwise used during a supposed rest.
Log of discovery on IRC:
The solution is to move stub assignment out of coroutine to not have it relying on it not calling any talents during the rest, and to do away with stubs immediately.06:02 ElectronicRU ok so I'm not exactly sure what happened
06:02 ElectronicRU but the picture is as follows
06:02 Xan Has this error with getTarget ever turned up before?
06:02 ElectronicRU Dig gets used with force_target
06:02 ElectronicRU the getTarget is replaced, Dig talent is called
06:02 ElectronicRU due to how Dig works, it forces the coroutine out
06:02 ElectronicRU getTarget never gets replaced back
06:03 Xan Why is force_target ever set to self anyway?
06:03 ElectronicRU well, because your addon does so
06:03 Xan That's in the default Player.lua as well.
06:03 ElectronicRU because vanilla does so for talents to use when no enemies are in sight
06:04 ElectronicRU it makes sense for Healing Touch, I guess
06:04 ElectronicRU that's not the issue, the issue is lack of proper recovery
06:04 Xan Oh, I see.
06:04 Xan When whoever made the addon added more conditions, they didn't change how useTalent was called for those extra cases.
06:04 ElectronicRU so the solution is to move stub assignment and cancellation out of the coroutine
06:05 Xan But even so, calling useTalent like that really shouldn't break the game.
06:05 ElectronicRU because to have them hinge on an assumption that no one ever uses forceTarget with something that puts a rest is, well, fragiles
06:05 ElectronicRU yep, exactly