implement BB challenge param commands

This commit is contained in:
Martin Michelsen
2023-11-08 22:08:59 -08:00
parent 3ea65ccc75
commit cabd03a82e
12 changed files with 224 additions and 86 deletions
+4 -1
View File
@@ -2318,7 +2318,10 @@ void send_set_exp_multiplier(std::shared_ptr<Lobby> l) {
if (!l->is_game()) {
throw logic_error("6xDD can only be sent in games (not in lobbies)");
}
G_SetEXPMultiplier_BB_6xDD cmd = {{0xDD, sizeof(G_SetEXPMultiplier_BB_6xDD) / 4, l->exp_multiplier}};
if (floorf(l->exp_multiplier) != l->exp_multiplier) {
throw runtime_error("EXP multiplier is not an integer");
}
G_SetEXPMultiplier_BB_6xDD cmd = {{0xDD, sizeof(G_SetEXPMultiplier_BB_6xDD) / 4, static_cast<uint16_t>(l->exp_multiplier)}};
send_command_t(l, 0x60, 0x00, cmd);
}