disable rare notifs for client drops by default

This commit is contained in:
Martin Michelsen
2024-07-20 11:58:18 -07:00
parent a3cc0bd13f
commit 5523388ad4
4 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -1956,10 +1956,12 @@ static void on_box_or_enemy_item_drop_t(shared_ptr<Client> c, uint8_t command, u
return;
}
bool should_notify = s->rare_notifs_enabled_for_client_drops && (l->drop_mode == Lobby::DropMode::CLIENT);
ItemData item = cmd.item.item;
item.decode_for_version(c->version());
l->on_item_id_generated_externally(item.id);
l->add_item(cmd.item.floor, item, cmd.item.x, cmd.item.z, (l->drop_mode == Lobby::DropMode::CLIENT) ? 0x100F : 0x000F);
l->add_item(cmd.item.floor, item, cmd.item.x, cmd.item.z, should_notify ? 0x100F : 0x000F);
auto name = s->describe_item(c->version(), item, false);
l->log.info("Player %hhu (leader) created floor item %08" PRIX32 " (%s) at %hhu:(%g, %g)",