diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 1466ae96..d6a68509 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -666,6 +666,10 @@ static void on_login_d_e_dc_pc_v3(shared_ptr s, shared_ptr // the client to crash. if (base_cmd->unused1 == 0x5F5CA297) { c->flags &= ~(Client::Flag::USE_OVERFLOW_FOR_SEND_FUNCTION_CALL | Client::Flag::NO_SEND_FUNCTION_CALL); + } else if (!s->episode_3_send_function_call_enabled && + (c->flags & Client::Flag::USE_OVERFLOW_FOR_SEND_FUNCTION_CALL)) { + c->flags &= ~Client::Flag::USE_OVERFLOW_FOR_SEND_FUNCTION_CALL; + c->flags |= Client::Flag::NO_SEND_FUNCTION_CALL; } uint32_t serial_number = stoul(base_cmd->serial_number, nullptr, 16); diff --git a/tests/GC-Episode3GameSmokeTest.test.txt b/tests/GC-Episode3GameSmokeTest.test.txt index bd227fad..c1ef0d4f 100644 --- a/tests/GC-Episode3GameSmokeTest.test.txt +++ b/tests/GC-Episode3GameSmokeTest.test.txt @@ -1926,6 +1926,10 @@ I 94711 2022-07-26 00:24:59 - [Commands] Received from C-7 (version=GC command=9 0000 | 99 00 04 00 | I 94711 2022-07-26 00:24:59 - [Commands] Received from C-7 (version=GC command=D6 flag=00) 0000 | D6 00 04 00 | +I 94711 2022-07-26 00:24:59 - [Commands] Sending to C-7 (version=GC command=04 flag=00) +0000 | 04 00 2C 00 00 00 01 00 78 62 F8 10 39 98 AC 82 | , xb 9 +0010 | 0E 89 2A 49 0A 42 00 00 00 00 00 00 FF FF FF FF | *I +0020 | FF FF FF FF FF FF FF FF FF FF FF FF | I 94711 2022-07-26 00:24:59 - [Commands] Sending to C-7 (version=GC command=07 flag=06) 0000 | 07 06 C8 00 11 00 00 11 FF FF FF FF 04 00 41 6C | Al 0010 | 65 78 61 6E 64 72 69 61 00 00 00 00 00 00 00 00 | exandria @@ -1940,10 +1944,6 @@ I 94711 2022-07-26 00:24:59 - [Commands] Sending to C-7 (version=GC command=07 f 00A0 | 6E 65 63 74 00 00 00 00 00 00 00 00 11 00 00 11 | nect 00B0 | 11 99 99 11 04 0F 43 6C 65 61 72 20 6C 69 63 65 | Clear lice 00C0 | 6E 73 65 00 00 00 00 00 | nse -I 94711 2022-07-26 00:24:59 - [Commands] Sending to C-7 (version=GC command=04 flag=00) -0000 | 04 00 2C 00 00 00 01 00 78 62 F8 10 39 98 AC 82 | , xb 9 -0010 | 0E 89 2A 49 0A 42 00 00 00 00 00 00 FF FF FF FF | *I -0020 | FF FF FF FF FF FF FF FF FF FF FF FF | I 94711 2022-07-26 00:25:06 - [Commands] Received from C-7 (version=GC command=10 flag=00) 0000 | 10 00 0C 00 11 00 00 11 11 33 33 11 | 33 I 94711 2022-07-26 00:25:06 - [Commands] Sending to C-7 (version=GC command=07 flag=11) diff --git a/tests/GC-ForestGame.test.txt b/tests/GC-ForestGame.test.txt index 95ff6cc2..d0eecbbf 100644 --- a/tests/GC-ForestGame.test.txt +++ b/tests/GC-ForestGame.test.txt @@ -92,6 +92,10 @@ I 26579 2022-07-01 10:22:13 - [Commands] Received from C-5C (version=GC command= 0000 | 99 00 04 00 | I 26579 2022-07-01 10:22:14 - [Commands] Received from C-5C (version=GC command=00D6 flag=00000000) 0000 | D6 00 04 00 | +I 26579 2022-07-01 10:22:14 - [Commands] Sending to C-5C (version=GC command=0004 flag=00000000) +0000 | 04 00 2C 00 00 00 01 00 78 62 F8 10 39 98 AC 82 | , xb 9 +0010 | 0E 89 2A 49 00 00 00 00 00 00 00 00 FF FF FF FF | *I +0020 | FF FF FF FF FF FF FF FF FF FF FF FF | I 26579 2022-07-01 10:22:14 - [Commands] Sending to C-5C (version=GC command=0007 flag=00000008) 0000 | 07 06 C8 00 11 00 00 11 FF FF FF FF 04 00 41 6C | Al 0010 | 65 78 61 6E 64 72 69 61 00 00 00 00 00 00 00 00 | exandria @@ -106,10 +110,6 @@ I 26579 2022-07-01 10:22:14 - [Commands] Sending to C-5C (version=GC command=000 00A0 | 6E 65 63 74 00 00 00 00 00 00 00 00 11 00 00 11 | nect 00B0 | 11 99 99 11 04 0F 43 6C 65 61 72 20 6C 69 63 65 | Clear lice 00C0 | 6E 73 65 00 00 00 00 00 | nse -I 26579 2022-07-01 10:22:14 - [Commands] Sending to C-5C (version=GC command=0004 flag=00000000) -0000 | 04 00 2C 00 00 00 01 00 78 62 F8 10 39 98 AC 82 | , xb 9 -0010 | 0E 89 2A 49 00 00 00 00 00 00 00 00 FF FF FF FF | *I -0020 | FF FF FF FF FF FF FF FF FF FF FF FF | I 26579 2022-07-01 10:22:15 - [Commands] Received from C-5C (version=GC command=0010 flag=00000000) 0000 | 10 00 0C 00 11 00 00 11 11 22 22 11 | "" I 26579 2022-07-01 10:22:15 - [Commands] Sending to C-5C (version=GC command=0097 flag=00000001) diff --git a/tests/GC-LoginSmokeTest.test.txt b/tests/GC-LoginSmokeTest.test.txt index 8ad47f58..0832542f 100755 --- a/tests/GC-LoginSmokeTest.test.txt +++ b/tests/GC-LoginSmokeTest.test.txt @@ -92,6 +92,10 @@ I 22913 2022-06-30 23:45:39 - [Commands] Received from C-2 (version=GC command=0 0000 | 99 00 04 00 | I 22913 2022-06-30 23:45:40 - [Commands] Received from C-2 (version=GC command=00D6 flag=00000000) 0000 | D6 00 04 00 | +I 22913 2022-06-30 23:45:40 - [Commands] Sending to C-2 (version=GC command=0004 flag=00000000) +0000 | 04 00 2C 00 00 00 01 00 78 62 F8 10 39 98 AC 82 | , xb 9 +0010 | 0E 89 2A 49 00 00 00 00 00 00 00 00 FF FF FF FF | *I +0020 | FF FF FF FF FF FF FF FF FF FF FF FF | I 22913 2022-06-30 23:45:40 - [Commands] Sending to C-2 (version=GC command=0007 flag=00000008) 0000 | 07 06 C8 00 11 00 00 11 FF FF FF FF 04 00 41 6C | Al 0010 | 65 78 61 6E 64 72 69 61 00 00 00 00 00 00 00 00 | exandria @@ -106,11 +110,6 @@ I 22913 2022-06-30 23:45:40 - [Commands] Sending to C-2 (version=GC command=0007 00A0 | 6E 65 63 74 00 00 00 00 00 00 00 00 11 00 00 11 | nect 00B0 | 11 99 99 11 04 0F 43 6C 65 61 72 20 6C 69 63 65 | Clear lice 00C0 | 6E 73 65 00 00 00 00 00 | nse - -I 22913 2022-06-30 23:45:40 - [Commands] Sending to C-2 (version=GC command=0004 flag=00000000) -0000 | 04 00 2C 00 00 00 01 00 78 62 F8 10 39 98 AC 82 | , xb 9 -0010 | 0E 89 2A 49 00 00 00 00 00 00 00 00 FF FF FF FF | *I -0020 | FF FF FF FF FF FF FF FF FF FF FF FF | I 22913 2022-06-30 23:45:41 - [Commands] Received from C-2 (version=GC command=0010 flag=00000000) 0000 | 10 00 0C 00 11 00 00 11 11 88 88 11 | I 22913 2022-06-30 23:45:41 - [Server] Client disconnected: C-2 on virtual connection 0x103704560