Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 437a4ef561 |
+9
-3
@@ -203,17 +203,23 @@ function CharacterSelect_OnEvent()
|
||||
elseif ( event == "CHARACTER_LIST_UPDATE" ) then
|
||||
CharacterSelect_RebuildTranslationTable();
|
||||
CharacterOrder_Apply();
|
||||
if ( this.pendingSelectedCharID ) then
|
||||
this.selectedIndex = GetIndexFromCharID(this.pendingSelectedCharID);
|
||||
this.pendingSelectedCharID = nil;
|
||||
end
|
||||
UpdateCharacterList();
|
||||
CharSelectCharacterName:SetText(GetCharacterInfo(GetCharIDFromIndex(this.selectedIndex)));
|
||||
Autologin_OnCharactersLoad();
|
||||
elseif ( event == "UPDATE_SELECTED_CHARACTER" ) then
|
||||
-- arg1 is a server-assigned charID; translate to a display index
|
||||
-- so `selectedIndex` always means "position in the displayed list".
|
||||
if ( arg1 == 0 ) then
|
||||
CharSelectCharacterName:SetText("");
|
||||
else
|
||||
CharSelectCharacterName:SetText(GetCharacterInfo(arg1));
|
||||
this.selectedIndex = GetIndexFromCharID(arg1);
|
||||
if ( table.getn(this.translationTable) == 0 ) then
|
||||
this.pendingSelectedCharID = arg1;
|
||||
else
|
||||
this.selectedIndex = GetIndexFromCharID(arg1);
|
||||
end
|
||||
end
|
||||
UpdateCharacterSelection();
|
||||
elseif ( event == "SELECT_LAST_CHARACTER" ) then
|
||||
|
||||
Reference in New Issue
Block a user