Stop auto summoning while remote-controlling toys
Closed this issue · 4 comments
This was originally posted by Legolando as comment #6679511 at https://www.curseforge.com/wow/addons/angleur/comments :
In reply to 6mot:
Well, actually there is one thing! But it's about a very niche aspect of the game most probably don't care about.
When you summon a remote-controlled toy like the Darkmoon Tonk with PetWalker enabled, the game's Event system recognizes that as you yourself moving so it tries to resummon the previous pet - and since remote toys are technically considered pets, they immediately break down after moving an inch.
As a band-aid fix to this I have added an if statement to the first line of the function like this:
function ns:PLAYER_STARTED_MOVING()
if IsPossessBarVisible() then return end
ns.debugprint 'Event: PLAYER_STARTED_MOVING -->autoaction
'
ns.autoaction()
end
It works nicely from my experience but perhaps there is a better way to do it :DMaybe this doesn't call for a patch on its own but perhaps you could include it alongside another change in the future!
Thanks for the report and suggestion!
PetWalker already has some exclusions for similar things (see the stop_auto_summon
function, around line 150 in main.lua).
However, I currently exclude them by their aura ID, so the IsPossessBarVisible
test seems like a smart idea to me, since it has the potential to cover a whole bunch of similar auras, including some already excluded. (At least Jerry the Snail (142372), possibly the Eye of Kilrogg aura (212754), and, yes, most likely all or many of the controller-style toys, that have been on my to-do list (for quite some time ;) ).
I will add the IsPossessBarVisible
test, see which of the excluded auras can be replaced by it, and release an update soon.
(Funny thing is, I stumbled across the IsPossessBarVisible
not too long ago, but had no idea what a possess bar exactly was. I came to the conclusion that it must be something combat-related, and therefore not interesting for PW, since it stops its activity during combat anyway. It didn't occur to me that it is this little toy vehicle GUI ;)
Version 2.2.1 with additional IsPossessBarVisible()
test should be on CF shortly.
- I don’t have the Darkmoon Tonk, but a dozen similar toys, and they seem to be covered all.
- I removed 2 aura checks, since they are now covered by
IsPossessBarVisible
(tested):- 212754: Eye of Kilrogg aura in the context of the Eye See You quest (Azsuna)
- 142372: Jerry the Snail (Gastropod Shell toy)
- I removed 1 aura check, untested (too cumbersome to test), but I think to remember that it also has the PossessBar:
- 290460: Battlebot Champion (Forbidden Reach: Zskera Vault)
3 similar ones remain in place:
- 312993: Carrying Forbidden Tomes (Scrivener Lenua event, Revendreth); no PossessBar or any other special UI, tested
- 2 quest auras from the Brewfest; unable to test, but IIRC they don’t have a PossessBar (but possibly a VehicleActionBar)
BTW, in all my tests – except for the Eye of Kilrogg from the quest – the PossessBar coincided with the VehicleActionBar (HasVehicleActionBar()
).
@Legolando:
So that was a great suggestion you made there. It simplifies the tests a bit, and most importantly, covers a whole bunch more toys :)
If you come across other auras/situations that should be excluded, let me know.
This was originally posted by Legolando as comment #6679511 at https://www.curseforge.com/wow/addons/angleur/comments :
In reply to 6mot:
Well, actually there is one thing! But it's about a very niche aspect of the game most probably don't care about.
When you summon a remote-controlled toy like the Darkmoon Tonk with PetWalker enabled, the game's Event system recognizes that as you yourself moving so it tries to resummon the previous pet - and since remote toys are technically considered pets, they immediately break down after moving an inch.
As a band-aid fix to this I have added an if statement to the first line of the function like this:
function ns:PLAYER_STARTED_MOVING()
if IsPossessBarVisible() then return end
ns.debugprint 'Event: PLAYER_STARTED_MOVING -->autoaction
'
ns.autoaction()
endIt works nicely from my experience but perhaps there is a better way to do it :D
Maybe this doesn't call for a patch on its own but perhaps you could include it alongside another change in the future!
Hey, thank you for the quick response! I agree, CF comments is a mess. Perhaps I should make an issues page like this for my addons on github as well. If you put out a test/beta version let me know, I'd be a good tester for this since I use PetWalker and remote controlled toys very often
If you put out a test/beta version
v2.2.1 is already on CF. See my post above, where you find also details of the changes (and my tests).