implement $dropmode on proxy server

This commit is contained in:
Martin Michelsen
2024-02-18 21:33:59 -08:00
parent f16b8ef983
commit db2c2a4774
11 changed files with 509 additions and 173 deletions
+20
View File
@@ -3,6 +3,7 @@
#include <stdint.h>
#include "Client.hh"
#include "CommandFormats.hh"
#include "Lobby.hh"
#include "PSOProtocol.hh"
#include "ServerState.hh"
@@ -16,3 +17,22 @@ void send_item_notification_if_needed(
const Client::Config& config,
const ItemData& item,
bool is_from_rare_table);
G_SpecializableItemDropRequest_6xA2 normalize_drop_request(const void* data, size_t size);
struct DropReconcileResult {
uint8_t effective_rt_index;
bool is_box;
bool should_drop;
bool ignore_def;
};
DropReconcileResult reconcile_drop_request_with_map(
PrefixedLogger& log,
Channel& client_channel,
G_SpecializableItemDropRequest_6xA2& cmd,
Version version,
Episode episode,
const Client::Config& config,
std::shared_ptr<Map> map,
bool mark_drop);