mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 02:43:44 +00:00
fix(login): select the last played character in a stable list
The character list selected index 0 and was ordered by last login, so the characters swapped places on the selection screen after each session. Live kept them in the order they were made and selected the one with the latest last login (a new character counts as logged in when it is made): 2014 captures show e.g. a new fourth character appended and selected (index 3), and after the next login the list in the same order with index 0 for the character played last. Characters are now sorted by ID (creation order) and the one with the latest last login is selected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,7 +113,7 @@ namespace ClientPackets {
|
||||
};
|
||||
|
||||
// Written as a u8 count first
|
||||
uint8_t selectedCharacterIndex{}; // TODO: Pick the most recent played index. DLU always sends 0
|
||||
uint8_t selectedCharacterIndex{}; // The character with the latest last login
|
||||
std::vector<Character> characters{};
|
||||
|
||||
CharacterListResponse() : LUBitStream(ServiceType::CLIENT, MessageType::Client::CHARACTER_LIST_RESPONSE) {}
|
||||
|
||||
Reference in New Issue
Block a user