make $edit level also set stats

This commit is contained in:
Martin Michelsen
2023-10-31 09:57:29 -07:00
parent 4158f4a42a
commit 724186a8c0
4 changed files with 26 additions and 12 deletions
+1 -2
View File
@@ -34,7 +34,6 @@
- Find any remaining mismatches in enemy IDs / experience
- Support EXP multipliers
- Sale prices for non-rare weapons with specials are computed incorrectly when buying/selling at shops
- Replace enemy list, game episode, etc. with quest data when loading a quest
- Implement trade window
- Fix some edge cases on the BB proxy server (e.g. Change Ship)
- Implement less-common subcommands
@@ -45,4 +44,4 @@
- 6xDE: Good Luck quest
- 6xE0
- 6xE1: Gallon's Plan quest
- Implement team commands
- Implement teams
+3 -1
View File
@@ -831,7 +831,9 @@ static void server_command_edit(shared_ptr<Client> c, const std::string& args) {
} else if (tokens.at(0) == "exp") {
p->disp.stats.experience = stoul(tokens.at(1));
} else if (tokens.at(0) == "level") {
p->disp.stats.level = stoul(tokens.at(1)) - 1;
uint32_t level = stoul(tokens.at(1)) - 1;
p->disp.stats.reset_to_base(p->disp.visual.char_class, s->level_table);
p->disp.stats.advance_to_level(p->disp.visual.char_class, level, s->level_table);
} else if (tokens.at(0) == "namecolor") {
uint32_t new_color;
sscanf(tokens.at(1).c_str(), "%8X", &new_color);
+22 -8
View File
@@ -3215,7 +3215,8 @@ struct C_CreateTeam_BB_01EA {
} __packed__;
// 02EA (S->C): Unknown
// This command behaves exactly like 1FEA.
// header.flag must be in the range [0, 6]. If it isn't, the command is ignored.
// No other arguments.
// 03EA (C->S): Add team member
@@ -3274,11 +3275,9 @@ struct S_Unknown_BB_0CEA {
struct S_Unknown_BB_0EEA {
parray<uint8_t, 0x10> unused;
// Text follows here
pstring<TextEncoding::UTF16, 0x10> team_name;
} __packed__;
// 0EEA (S->C): Unknown
// 0FEA (C->S): Set team flag
// The client also accepts this command but completely ignores it.
@@ -3315,10 +3314,10 @@ struct S_TeamMembershipInformation_BB_12EA {
pstring<TextEncoding::UTF16, 0x10> team_name;
} __packed__;
// 13EA: Unknown
// 13EA: Team info for lobby players
// header.flag specifies the number of entries.
struct S_Unknown_BB_13EA_15EA_Entry {
struct S_TeamInfoForPlayer_BB_13EA_15EA_Entry {
le_uint32_t guild_card_number = 0;
le_uint32_t team_id = 0;
le_uint32_t unknown_a3 = 0;
@@ -3343,10 +3342,26 @@ struct S_Unknown_BB_13EA_15EA_Entry {
// 18EA: Membership information
// No arguments (C->S)
// TODO: Document S->C format
struct S_TeamMembershipInformation_BB_18EA {
parray<uint8_t, 0x0C> unknown_a1;
le_uint32_t unknown_a2 = 1;
le_uint32_t unknown_a3 = 1;
le_uint32_t privilege_level = 0;
le_uint32_t guild_card_number;
pstring<TextEncoding::UTF16, 0x10> player_name;
le_uint32_t unknown_a4 = 0;
le_uint32_t unknown_a5 = 2;
} __packed__;
// 19EA: Privilege list
// No arguments (C->S)
struct S_TeamPrivilegeList_BB_19EA {
le_uint32_t unknown_a1 = 0;
} __packed__;
// 1AEA: Unknown
// 1BEA (C->S): Unknown
@@ -3366,8 +3381,7 @@ struct C_Unknown_BB_1EEA {
} __packed__;
// 1FEA (S->C): Unknown
// header.flag must be in the range [0, 6]. If it isn't, the command is ignored.
// No other arguments.
// This command behaves exactly like 02EA.
// 20EA: Unknown
// header.flag is used, but no other arguments
-1
View File
@@ -3934,7 +3934,6 @@ static void on_EF_Ep3(shared_ptr<Client> c, uint16_t, uint32_t, string& data) {
}
static void on_xxEA_BB(shared_ptr<Client> c, uint16_t command, uint32_t, string&) {
// TODO: Implement teams. This command has a very large number of subcommands
// (up to 20EA!).
if (command == 0x01EA) {