Closed stophman1 closed 1 year ago
Do you know how I could implement this in my own LUA versions for testing? I tried to replace the IsMounted() with C_PlayerInfo.GetGlidingInfo() in all instances, but maybe I'm not going about it the right away - I'm still kind of a novice at LUA coding/editing and learning as I go. I did go ahead and do that, however I noticed that when dragonriding, it's still auto-enabling the module and citing missing spells (due to the action bar paging).
C_PlayerInfo.GetGlidingInfo() returns 3 variables so it's not a drag and drop replacement. See https://wowpedia.fandom.com/wiki/API_C_PlayerInfo.GetGlidingInfo. You can do something like local isDragonriding = select(2,C_PlayerInfo.GetGlidingInfo())
to get the state of the boolean you want.
I chose mounted because it applies to both and rotation code does not need to run in either case.
I thought the errors were from the dragon riding hotbar. Can you explain the reasoning to apply it to regular mounts too?
The errors come from any change in action bars yes. So no it does not need to be done in order to stop the errors but, again why I added that is it stops the rotation so that the code is not constantly running in a situation where it is not needed. (As little resources it might be) As I said before "rotation code does not need to run in either case". You are correct though it is not needed to stop the error it is imo a optimization.
Could PLAYER_MOUNT_DISPLAY_CHANGED be used to reenable the rotation code when a player dismounts?
possible but why? I mean im not the author im just a contributor so its not up to me but just wondering.
One of the returns for C_PlayerInfo.GetGlidingInfo() returns if a player is on a dragon riding mount and fires PLAYER_CAN_GLIDE_CHANGED when it changes. Unless if there is another reason why IsMounted() is used than dragon riding changing the hotbar, it would be better to check if a player is using a dragon riding mount and reenable the rotation when they dismount.