Apply Brutal Peeps HP patch after BB area load
This commit is contained in:
@@ -2762,7 +2762,6 @@ static asio::awaitable<void> on_10_main_menu(std::shared_ptr<Client> c, uint32_t
|
|||||||
c->log.info_f("Brutal Peeps +{} selected from BB menu at level {}", tier, character_level);
|
c->log.info_f("Brutal Peeps +{} selected from BB menu at level {}", tier, character_level);
|
||||||
|
|
||||||
co_await send_auto_patches_if_needed(c);
|
co_await send_auto_patches_if_needed(c);
|
||||||
co_await send_brutal_peeps_hp_patch_bb(c, tier);
|
|
||||||
co_await enable_save_if_needed(c);
|
co_await enable_save_if_needed(c);
|
||||||
send_lobby_list(c);
|
send_lobby_list(c);
|
||||||
if (!c->lobby.lock()) {
|
if (!c->lobby.lock()) {
|
||||||
@@ -5572,9 +5571,11 @@ static asio::awaitable<void> on_6F(std::shared_ptr<Client> c, Channel::Message&
|
|||||||
|
|
||||||
// Episode 3 sends a 6F after a CAx21 (end battle) command, so we shouldn't reassign the item IDs again in that case
|
// Episode 3 sends a 6F after a CAx21 (end battle) command, so we shouldn't reassign the item IDs again in that case
|
||||||
// (even though item IDs really don't matter for Ep3)
|
// (even though item IDs really don't matter for Ep3)
|
||||||
|
bool loading_flag_cleared = false;
|
||||||
if (c->check_flag(Client::Flag::LOADING)) {
|
if (c->check_flag(Client::Flag::LOADING)) {
|
||||||
c->clear_flag(Client::Flag::LOADING);
|
c->clear_flag(Client::Flag::LOADING);
|
||||||
c->log.info_f("LOADING flag cleared");
|
c->log.info_f("LOADING flag cleared");
|
||||||
|
loading_flag_cleared = true;
|
||||||
|
|
||||||
// The client sends 6F when it has created its TObjPlayer and assigned its item IDs. For the leader, however, this
|
// The client sends 6F when it has created its TObjPlayer and assigned its item IDs. For the leader, however, this
|
||||||
// happens before any inbound commands are processed, so we already did it when the client was added to the lobby.
|
// happens before any inbound commands are processed, so we already did it when the client was added to the lobby.
|
||||||
@@ -5584,6 +5585,11 @@ static asio::awaitable<void> on_6F(std::shared_ptr<Client> c, Channel::Message&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (loading_flag_cleared && (c->version() == Version::BB_V4)) {
|
||||||
|
int64_t brutal_peeps_hp_patch_tier = (l->brutal_peeps_tier >= 1) ? l->brutal_peeps_tier : -1;
|
||||||
|
co_await send_brutal_peeps_hp_patch_bb(c, brutal_peeps_hp_patch_tier);
|
||||||
|
}
|
||||||
|
|
||||||
// DC NTE creates players in the invisible state by default; if the joiner is not DC NTE, it won't send 6x23 to make
|
// DC NTE creates players in the invisible state by default; if the joiner is not DC NTE, it won't send 6x23 to make
|
||||||
// itself visible, so we have to do it
|
// itself visible, so we have to do it
|
||||||
for (const auto& lc : l->clients) {
|
for (const auto& lc : l->clients) {
|
||||||
|
|||||||
+5
-1
@@ -912,7 +912,11 @@ asio::awaitable<void> send_brutal_peeps_hp_patch_bb(std::shared_ptr<Client> c, i
|
|||||||
|
|
||||||
auto promise = send_brutal_peeps_hp_patch_bb_now(c, tier);
|
auto promise = send_brutal_peeps_hp_patch_bb_now(c, tier);
|
||||||
if (promise && c->channel->connected()) {
|
if (promise && c->channel->connected()) {
|
||||||
co_await promise->get();
|
auto result = co_await promise->get();
|
||||||
|
c->log.info_f("Brutal Peeps HP client patch result: tier={} return_value={:08X} checksum={:08X}",
|
||||||
|
tier,
|
||||||
|
static_cast<uint32_t>(result.return_value),
|
||||||
|
static_cast<uint32_t>(result.checksum));
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user