[open] GetGroupElectionInfo() doesn't update on EVENT_GROUP_ELECTION_REQUESTED
Code:
GetGroupElectionInfo() The event only has "descriptor" as a value though which is either "[ZO_NONE]" or "[ZO_READY_CHECK]." So in order to get the relevant information I needed to use GetGroupElectionInfo() to get the unitTag for the name of the player being votekicked. This is when I discovered that GetGroupElectionInfo() doesn't update when the local player makes an election request (we get an event for this through EVENT_GROUP_ELECTION_REQUESTED). The info returned by GetGroupElectionInfo() will only update once the group election has a result. This means the values returned by GetGroupElectionInfo() will be incorrect at the time of initiating an election for the local player before the election has been resolved. Other players in the group don't have the same issue as when the election request is submitted GetGroupElectionInfo() will immediately return proper values for the currently active election. The expected behavior of the result for GetGroupElectionInfo() would be to update on the backend simultaneously with EVENT_GROUP_ELECTION_REQUESTED so that we can pull accurate values for the local player requesting the election as well. |
Thank for pointing this out. It was built so that you only fill out that info when an election is successfully created on the backend, but it's also built to not notify the initiator because they don't need to actually vote. I can probably make it so I fill out the intended data so the initiator has access to it. Of note, just because that info is there doesn't mean a vote actually started. You still need to be prepared for a possible EVENT_GROUP_ELECTION_FAILED event immediately after EVENT_GROUP_ELECTION_REQUESTED.
|
Quote:
I think one of the election failure reasons already is NO_ELECTION probably so that would be fine. EDIT: Or hmm the only one I see possible related is GROUP_ELECTION_RESULT_NOT_APPLICABLE, I imagine that probably handles when there is no current election. |
All times are GMT -6. The time now is 01:24 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI