ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   [open] Return CURRENT order with GetCharacterInfo(i) (https://www.esoui.com/forums/showthread.php?t=9872)

Phinix 08/16/21 02:28 PM

[open] Return CURRENT order with GetCharacterInfo(i)
 
This function currently returns character CREATED order. However, it has not been updated since the ability to manually re-order characters was added to the game, rendering it largely useless (for getting character order anyway; getting the ID for each current character name is still handy).

EDIT: It should be clarified that the function itself does not actually return ANY order as one of the return values. Instead it is used in a for loop to iterate through the table it returns, which is ordered by creation date.

For example: esoui/pregameandingame/zo_addonmanager/zo_addonmanager.lua

Code:

for i=1, self:GetNumCharacters() do
            local name = self:GetCharacterInfo(i)


Irniben 08/17/21 01:44 AM

Quote:

Originally Posted by Phinix (Post 44575)
This function currently returns character CREATED order. However, it has not been updated since the ability to manually re-order characters was added to the game, rendering it largely useless (for getting character order anyway; getting the ID for each current character name is still handy).

EDIT: It should be clarified that the function itself does not actually return ANY order as one of the return values. Instead it is used in a for loop to iterate through the table it returns, which is ordered by creation date.

For example: esoui/pregameandingame/zo_addonmanager/zo_addonmanager.lua

Code:

for i=1, self:GetNumCharacters() do
            local name = self:GetCharacterInfo(i)


I didn't check, but doesn't "order" as a return value work? It's not yet documented in the wiki but used in the character selection screen.

local name, gender, level, championPoints, class, race, alliance, id, locationId, order, needsRename = GetCharacterInfo(characterIndex)

Sharlikran 08/17/21 02:39 AM

Probably only on the PTS though

https://github.com/ESOUIMods/esoui/b...nager.lua#L303

Irniben 08/17/21 03:36 AM

Ok, nevermind - I think the function just behaves differently when called pre-game...

Baertram 08/17/21 03:42 AM

Quote:

Originally Posted by Irniben (Post 44578)
Ok, nevermind - I think the function just behaves differently when called pre-game...

Yep, you are right. This was answered by ZOs in the past. After pre-game the param is either not returned or not correct somehow.

And no: It does not differ on live or PTS but is just a pre-game vs. in-game thing.


All times are GMT -6. The time now is 08:03 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI