Net: reconnect to the new core on GC_WARP

RecvWarpPacket now matches Windows: DirectEnter for the selected slot
(warp flavour, SetNewLoadingPhase) and Connect(lAddr, wPort) through
LoginClient::warp, discarding what is left on the old socket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-13 13:20:47 +09:00
co-authored by Claude Opus 5.5
parent ce6d457808
commit 189da4c269
8 changed files with 63 additions and 11 deletions
+11
View File
@@ -59,5 +59,16 @@ int main() {
if(valid.state()!=ava2::LoginSession::State::Loading || valid.receive_space()!=ava2::LoginSession::kRecvBufferSize-14) return 8;
if(valid.take_game_input(0).size()!=0 || valid.take_game_input(5)!=ava2::wire::Bytes{0,1,2,3,4}) return 9;
if(valid.take_game_input()!=ava2::wire::Bytes{5,6,7,8,9,10,11,12,13} || valid.receive_space()!=ava2::LoginSession::kRecvBufferSize) return 10;
// GC_WARP (RecvWarpPacket -> DirectEnter + Connect): the entered session logs in again on the new
// core with the same login key, re-reads the roster and re-selects the character.
valid.reconnect_game();
if(valid.state()!=ava2::LoginSession::State::Handshake || valid.server_milliseconds(serverMS)) return 13;
valid.feed(handshake);valid.take_output();valid.feed(login_phase);sent=valid.take_output();
if(sent.size()!=1 || ava2::wire::decrypt(sent[0],ava2::wire::locale_key())[0]!=109 || ava2::wire::read32(ava2::wire::decrypt(sent[0],ava2::wire::locale_key()),32)!=123) return 14;
valid.feed(ava2::wire::encrypt(payload,rx));
if(valid.state()!=ava2::LoginSession::State::Selecting) return 15;
valid.select(0);valid.take_output();
ava2::wire::Bytes warped{253,5};valid.feed(ava2::wire::encrypt(warped,rx));
if(valid.state()!=ava2::LoginSession::State::Loading) return 16;
std::cout<<"Original AVA2 client/server layout, cipher and character selection oracle passed\n";
}