Toggle drops.
Through txt command in-game, or through the config file. White space fix. Forgot this part.
This commit is contained in:
@@ -953,6 +953,7 @@ static void on_sort_inventory_bb(shared_ptr<ServerState>,
|
||||
// EXP/Drop Item commands
|
||||
|
||||
static bool drop_item(
|
||||
std::shared_ptr<ServerState>s,
|
||||
std::shared_ptr<Lobby> l,
|
||||
int64_t enemy_id,
|
||||
uint8_t area,
|
||||
@@ -988,7 +989,7 @@ static bool drop_item(
|
||||
return true;
|
||||
}
|
||||
|
||||
static void on_enemy_drop_item_request(shared_ptr<ServerState>,
|
||||
static void on_enemy_drop_item_request(shared_ptr<ServerState>s,
|
||||
shared_ptr<Lobby> l, shared_ptr<Client> c, uint8_t command, uint8_t flag,
|
||||
const string& data) {
|
||||
if (!l->is_game()) {
|
||||
@@ -998,12 +999,12 @@ static void on_enemy_drop_item_request(shared_ptr<ServerState>,
|
||||
const auto& cmd = check_size_sc<G_EnemyDropItemRequest_DC_6x60>(data,
|
||||
sizeof(G_EnemyDropItemRequest_DC_6x60),
|
||||
sizeof(G_EnemyDropItemRequest_PC_V3_BB_6x60));
|
||||
if (!drop_item(l, cmd.enemy_id, cmd.area, cmd.x, cmd.z, cmd.enemy_id)) {
|
||||
if (!drop_item(s, l, cmd.enemy_id, cmd.area, cmd.x, cmd.z, cmd.enemy_id)) {
|
||||
forward_subcommand(l, c, command, flag, data);
|
||||
}
|
||||
}
|
||||
|
||||
static void on_box_drop_item_request(shared_ptr<ServerState>,
|
||||
static void on_box_drop_item_request(shared_ptr<ServerState>s,
|
||||
shared_ptr<Lobby> l, shared_ptr<Client> c, uint8_t command, uint8_t flag,
|
||||
const string& data) {
|
||||
if (!l->is_game()) {
|
||||
@@ -1011,7 +1012,7 @@ static void on_box_drop_item_request(shared_ptr<ServerState>,
|
||||
}
|
||||
|
||||
const auto& cmd = check_size_sc<G_BoxItemDropRequest_6xA2>(data);
|
||||
if (!drop_item(l, -1, cmd.area, cmd.x, cmd.z, cmd.request_id)) {
|
||||
if (!drop_item(s, l, -1, cmd.area, cmd.x, cmd.z, cmd.request_id)) {
|
||||
forward_subcommand(l, c, command, flag, data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user