fix visual.version field

This commit is contained in:
Martin Michelsen
2023-11-16 23:27:24 -08:00
parent 6b1a3e615b
commit 2f99a3760a
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -4,6 +4,7 @@
#include <string.h>
#include <wchar.h>
#include <algorithm>
#include <phosg/Filesystem.hh>
#include <phosg/Hash.hh>
#include <phosg/Random.hh>
@@ -116,13 +117,14 @@ void PlayerDispDataDCPCV3::enforce_lobby_join_limits_for_client(shared_ptr<Clien
this->visual.char_class = 0; // Invalid classes -> HUmar
}
this->visual.version = min<uint8_t>(this->visual.version, c->config.check_flag(Client::Flag::IS_DC_V1) ? 0 : 2);
maxes = &v1_v2_class_maxes[this->visual.char_class];
this->visual.version = c->config.check_flag(Client::Flag::IS_DC_V1) ? 1 : 2;
} else {
if (this->visual.char_class >= 19) {
this->visual.char_class = 0; // Invalid classes -> HUmar
}
this->visual.version = min<uint8_t>(this->visual.version, 3);
maxes = &v3_v4_class_maxes[this->visual.char_class];
}
+3 -3
View File
@@ -293,7 +293,7 @@ I 40469 2023-05-26 10:40:59 - [Commands] Sending to C-2 (Tali) (version=DC comma
03A0 | 54 61 6C 69 00 00 00 00 00 00 00 00 00 00 00 00 | Tali
03B0 | 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 |
03C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
03D0 | 04 05 00 02 52 00 00 00 00 00 02 00 00 00 03 00 | R
03D0 | 04 05 00 00 52 00 00 00 00 00 02 00 00 00 03 00 | R
03E0 | 00 00 00 00 00 00 00 00 0C D7 A3 3E 00 00 00 00 | >
03F0 | 00 00 00 00 01 00 01 00 02 00 01 00 02 01 01 00 |
0400 | 04 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 |
@@ -450,7 +450,7 @@ I 40469 2023-05-26 10:41:20 - [Commands] Sending to C-2 (Tali) (version=DC comma
03A0 | 54 61 6C 69 00 00 00 00 00 00 00 00 00 00 00 00 | Tali
03B0 | 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 |
03C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
03D0 | 04 05 00 02 52 00 00 00 00 00 02 00 00 00 03 00 | R
03D0 | 04 05 00 00 52 00 00 00 00 00 02 00 00 00 03 00 | R
03E0 | 00 00 00 00 00 00 00 00 0C D7 A3 3E 00 00 00 00 | >
03F0 | 00 00 00 00 01 00 01 00 02 00 01 00 02 01 01 00 |
0400 | 04 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 |
@@ -1177,7 +1177,7 @@ I 40469 2023-05-26 10:42:43 - [Commands] Sending to C-2 (Tali) (version=DC comma
03A0 | 54 61 6C 69 00 00 00 00 00 00 00 00 00 00 00 00 | Tali
03B0 | 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 |
03C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
03D0 | 04 05 00 02 52 00 00 00 00 00 02 00 00 00 03 00 | R
03D0 | 04 05 00 00 52 00 00 00 00 00 02 00 00 00 03 00 | R
03E0 | 00 00 00 00 00 00 00 00 0C D7 A3 3E 00 00 00 00 | >
03F0 | 00 00 00 00 01 06 01 00 02 00 00 00 02 01 00 00 |
0400 | 04 00 01 00 01 06 00 00 00 00 00 00 00 00 00 00 |