use D5 on versions that support it

This commit is contained in:
Martin Michelsen
2022-08-24 00:04:35 -07:00
parent 4066f80407
commit e808a7b6a3
6 changed files with 23 additions and 9 deletions
-2
View File
@@ -693,13 +693,11 @@ static string create_download_quest_file(const string& compressed_data,
// Add temporary extra bytes if necessary so encryption won't fail - the data
// size must be a multiple of 4 for PSO V2 encryption.
size_t original_size = data.size();
data.resize((data.size() + 3) & (~3));
PSOV3Encryption encr(encryption_seed);
encr.encrypt(data.data() + sizeof(PSODownloadQuestHeader),
data.size() - sizeof(PSODownloadQuestHeader));
data.resize(original_size);
return data;
}
+17 -1
View File
@@ -521,7 +521,23 @@ void send_header_text(Channel& ch, uint16_t command,
}
void send_message_box(shared_ptr<Client> c, const u16string& text) {
uint16_t command = (c->version == GameVersion::PATCH) ? 0x13 : 0x1A;
uint16_t command;
switch (c->version) {
case GameVersion::PATCH:
command = 0x13;
break;
case GameVersion::DC:
case GameVersion::PC:
command = 0x1A;
break;
case GameVersion::GC:
case GameVersion::XB:
case GameVersion::BB:
command = 0xD5;
break;
default:
throw logic_error("invalid game version");
}
send_text(c->channel, command, text, true);
}
+2 -2
View File
@@ -31189,7 +31189,7 @@ I 80350 2022-07-07 23:27:19 - [Commands] Received from C-8 (NO DATA) (version=BB
I 80350 2022-07-07 23:27:19 - [Commands] Sending to C-8 (NO DATA) (version=BB command=0069 flag=00000000)
0000000000000000 | 0C 00 69 00 00 00 00 00 00 00 00 00 | i
I 80350 2022-07-07 23:27:19 - [Commands] Sending to C-8 (NO DATA) (version=BB command=001A flag=00000000)
0000000000000000 | 0C 00 1A 00 00 00 00 00 00 00 00 00 |
0000000000000000 | 0C 00 D5 00 00 00 00 00 00 00 00 00 |
I 80350 2022-07-07 23:27:19 - [Commands] Sending to C-8 (NO DATA) (version=BB command=0019 flag=00000000)
0000000000000000 | 10 00 19 00 00 00 00 00 0A 00 00 03 E0 2E 00 00 | .
I 80350 2022-07-07 23:27:19 - [Server] Client disconnected: C-8 on fd 29
@@ -33759,7 +33759,7 @@ I 80350 2022-07-07 23:29:17 - [Commands] Received from C-A (NO DATA) (version=BB
I 80350 2022-07-07 23:29:17 - [Commands] Sending to C-A (NO DATA) (version=BB command=0069 flag=00000000)
0000000000000000 | 0C 00 69 00 00 00 00 00 00 00 00 00 | i
I 80350 2022-07-07 23:29:17 - [Commands] Sending to C-A (NO DATA) (version=BB command=001A flag=00000000)
0000000000000000 | 0C 00 1A 00 00 00 00 00 00 00 00 00 |
0000000000000000 | 0C 00 D5 00 00 00 00 00 00 00 00 00 |
I 80350 2022-07-07 23:29:17 - [Commands] Sending to C-A (NO DATA) (version=BB command=0019 flag=00000000)
0000000000000000 | 10 00 19 00 00 00 00 00 0A 00 00 03 E0 2E 00 00 | .
I 80350 2022-07-07 23:29:17 - [Server] Client disconnected: C-A on fd 29
+2 -2
View File
@@ -1889,7 +1889,7 @@ I 94711 2022-07-26 00:24:56 - [Commands] Sending to C-7 (version=GC command=B7 f
0000000000000000 | B7 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 |
0000000000000010 | 00 00 00 00 FF FF FF 00 FF FF FF 00 FF FF FF FF |
I 94711 2022-07-26 00:24:56 - [Commands] Sending to C-7 (version=GC command=1A flag=00)
0000000000000000 | 1A 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn
0000000000000000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn
0000000000000010 | 65 63 74 65 64 20 74 6F 20 09 43 36 41 6C 65 78 | ected to C6Alex
0000000000000020 | 61 6E 64 72 69 61 09 43 37 2E 00 00 | andria C7.
I 94711 2022-07-26 00:24:56 - [Commands] Received from C-7 (version=GC command=96 flag=00)
@@ -1959,7 +1959,7 @@ I 94711 2022-07-26 00:25:06 - [Commands] Sending to C-7 (version=GC command=07 f
I 94711 2022-07-26 00:25:07 - [Commands] Received from C-7 (version=GC command=10 flag=00)
0000000000000000 | 10 00 0C 00 22 00 00 22 01 00 00 00 | " "
I 94711 2022-07-26 00:25:07 - [Commands] Sending to C-7 (version=GC command=1A flag=00)
0000000000000000 | 1A 00 24 01 4C 6F 62 62 79 20 63 6F 6D 6D 61 6E | $ Lobby comman
0000000000000000 | D5 00 24 01 4C 6F 62 62 79 20 63 6F 6D 6D 61 6E | $ Lobby comman
0000000000000010 | 64 73 3A 20 79 6F 75 20 6D 75 73 74 20 62 65 20 | ds: you must be
0000000000000020 | 61 20 6D 6F 64 65 72 61 74 6F 72 20 74 6F 20 75 | a moderator to u
0000000000000030 | 73 65 0A 74 68 65 73 65 20 63 6F 6D 6D 61 6E 64 | se these command
+1 -1
View File
@@ -81,7 +81,7 @@ I 26579 2022-07-01 10:22:13 - [Commands] Sending to C-5C (version=GC command=000
0000000000000010 | 0E 89 2A 49 00 01 00 00 00 00 00 00 FF FF FF FF | *I
0000000000000020 | FF FF FF FF FF FF FF FF FF FF FF FF |
I 26579 2022-07-01 10:22:13 - [Commands] Sending to C-5C (version=GC command=001A flag=00000000)
0000000000000000 | 1A 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn
0000000000000000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn
0000000000000010 | 65 63 74 65 64 20 74 6F 20 09 43 36 41 6C 65 78 | ected to C6Alex
0000000000000020 | 61 6E 64 72 69 61 09 43 37 2E 00 00 | andria C7.
I 26579 2022-07-01 10:22:13 - [Commands] Received from C-5C (version=GC command=0096 flag=00000000)
+1 -1
View File
@@ -81,7 +81,7 @@ I 22913 2022-06-30 23:45:38 - [Commands] Sending to C-2 (version=GC command=0004
0000000000000010 | 0E 89 2A 49 00 01 00 00 00 00 00 00 FF FF FF FF | *I
0000000000000020 | FF FF FF FF FF FF FF FF FF FF FF FF |
I 22913 2022-06-30 23:45:38 - [Commands] Sending to C-2 (version=GC command=001A flag=00000000)
0000000000000000 | 1A 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn
0000000000000000 | D5 00 2C 00 59 6F 75 20 61 72 65 20 63 6F 6E 6E | , You are conn
0000000000000010 | 65 63 74 65 64 20 74 6F 20 09 43 36 41 6C 65 78 | ected to C6Alex
0000000000000020 | 61 6E 64 72 69 61 09 43 37 2E 00 00 | andria C7.
I 22913 2022-06-30 23:45:39 - [Commands] Received from C-2 (version=GC command=0096 flag=00000000)