make EXP computation match the client

This commit is contained in:
Martin Michelsen
2023-11-13 17:56:26 -08:00
parent 1ca0e928a4
commit a1b457a5e6
8 changed files with 155 additions and 132 deletions
+1 -4
View File
@@ -2287,10 +2287,7 @@ 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)");
}
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)}};
G_SetEXPMultiplier_BB_6xDD cmd = {{0xDD, sizeof(G_SetEXPMultiplier_BB_6xDD) / 4, (l->mode == GameMode::CHALLENGE) ? 1 : l->base_exp_multiplier}};
send_command_t(l, 0x60, 0x00, cmd);
}