fix minor isses in battle replays
This commit is contained in:
@@ -127,7 +127,8 @@ const BattleRecord::Event* BattleRecord::get_first_event() const {
|
||||
void BattleRecord::add_player(
|
||||
const PlayerLobbyDataDCGC& lobby_data,
|
||||
const PlayerInventory& inventory,
|
||||
const PlayerDispDataDCPCV3& disp) {
|
||||
const PlayerDispDataDCPCV3& disp,
|
||||
uint32_t level) {
|
||||
if (!this->is_writable) {
|
||||
throw logic_error("cannot write to battle record");
|
||||
}
|
||||
@@ -141,6 +142,7 @@ void BattleRecord::add_player(
|
||||
player.lobby_data = lobby_data;
|
||||
player.inventory = inventory;
|
||||
player.disp = disp;
|
||||
player.level = level;
|
||||
}
|
||||
|
||||
void BattleRecord::delete_player(uint8_t client_id) {
|
||||
@@ -349,7 +351,7 @@ void BattleRecordPlayer::schedule_events() {
|
||||
send_command(l, (ev.data.size() >= 0x400) ? 0x6C : 0x60, 0x00, ev.data);
|
||||
break;
|
||||
case BattleRecord::Event::Type::EP3_GAME_COMMAND:
|
||||
send_command(l, 0xCB, 0x00, ev.data);
|
||||
send_command(l, 0xC9, 0x00, ev.data);
|
||||
break;
|
||||
case BattleRecord::Event::Type::CHAT_MESSAGE:
|
||||
send_chat_message(l, ev.guild_card_number, decode_sjis(ev.data));
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
PlayerLobbyDataDCGC lobby_data;
|
||||
PlayerInventory inventory;
|
||||
PlayerDispDataDCPCV3 disp;
|
||||
uint32_t level;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct Event {
|
||||
@@ -65,7 +66,8 @@ public:
|
||||
void add_player(
|
||||
const PlayerLobbyDataDCGC& lobby_data,
|
||||
const PlayerInventory& inventory,
|
||||
const PlayerDispDataDCPCV3& disp);
|
||||
const PlayerDispDataDCPCV3& disp,
|
||||
uint32_t level);
|
||||
void delete_player(uint8_t client_id);
|
||||
void add_command(Event::Type type, const void* data, size_t size);
|
||||
void add_command(Event::Type type, std::string&& data);
|
||||
@@ -78,7 +80,7 @@ public:
|
||||
void set_battle_end_timestamp();
|
||||
|
||||
private:
|
||||
static constexpr uint64_t SIGNATURE = 0x14C946D56D1DAC5A;
|
||||
static constexpr uint64_t SIGNATURE = 0x14C946D56D1DAC50;
|
||||
|
||||
static bool is_map_definition_event(const Event& ev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user