Thread Tools Display Modes
Prev Previous Post   Next Post Next
02/11/20, 08:38 AM   #1
ArtOfShred
 
ArtOfShred's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 103
[open] GetGroupElectionInfo() doesn't update on EVENT_GROUP_ELECTION_REQUESTED

Code:
GetGroupElectionInfo()
    Returns: number GroupElectionType electionType, number timeRemainingSeconds, string electionDescriptor, string targetUnitTag
While writing a function for LUIE I discovered some odd behavior with this function. I hooked into the alert handler for EVENT_GROUP_ELECTION_REQUESTED in hopes of enhancing the message this function displays for initiating a votekick. ("You have initiated a vote..." into something listing the character name of the player.)

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.
  Reply With Quote
 

ESOUI » Developer Discussions » Bug Reports » [open] GetGroupElectionInfo() doesn't update on EVENT_GROUP_ELECTION_REQUESTED


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off