write battle/challenge records structures
This commit is contained in:
@@ -368,82 +368,6 @@ void ClientGameData::save_player_data() {
|
||||
}
|
||||
}
|
||||
|
||||
void ClientGameData::import_player(const PSOPlayerDataDCPC& pd) {
|
||||
auto player = this->player();
|
||||
player->inventory = pd.inventory;
|
||||
player->disp = pd.disp.to_bb();
|
||||
// TODO: Add these fields to the command structure so we can parse them
|
||||
// info_board = pd.info_board;
|
||||
// blocked_senders = pd.blocked_senders;
|
||||
// auto_reply = pd.auto_reply;
|
||||
}
|
||||
|
||||
void ClientGameData::import_player(const PSOPlayerDataV3& gc, bool is_gc) {
|
||||
auto account = this->account();
|
||||
auto player = this->player();
|
||||
player->inventory = gc.inventory;
|
||||
if (is_gc) {
|
||||
for (size_t z = 0; z < 30; z++) {
|
||||
player->inventory.items[z].data.bswap_data2_if_mag();
|
||||
}
|
||||
}
|
||||
player->disp = gc.disp.to_bb();
|
||||
player->info_board = gc.info_board;
|
||||
account->blocked_senders = gc.blocked_senders;
|
||||
if (gc.auto_reply_enabled) {
|
||||
player->auto_reply = gc.auto_reply;
|
||||
} else {
|
||||
player->auto_reply.clear(0);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientGameData::import_player(const PSOPlayerDataBB& bb) {
|
||||
auto account = this->account();
|
||||
auto player = this->player();
|
||||
// Note: we don't copy the inventory and disp here because we already have
|
||||
// them (we sent the player data to the client in the first place)
|
||||
player->info_board = bb.info_board;
|
||||
account->blocked_senders = bb.blocked_senders;
|
||||
if (bb.auto_reply_enabled) {
|
||||
player->auto_reply = bb.auto_reply;
|
||||
} else {
|
||||
player->auto_reply.clear(0);
|
||||
}
|
||||
}
|
||||
|
||||
PlayerBB ClientGameData::export_player_bb() {
|
||||
auto account = this->account();
|
||||
auto player = this->player();
|
||||
|
||||
PlayerBB ret;
|
||||
ret.inventory = player->inventory;
|
||||
ret.disp = player->disp;
|
||||
ret.unknown.clear(0);
|
||||
ret.option_flags = account->option_flags;
|
||||
ret.quest_data1 = player->quest_data1;
|
||||
ret.bank = player->bank;
|
||||
ret.guild_card_number = this->guild_card_number;
|
||||
ret.name = player->disp.name;
|
||||
ret.team_name = account->team_name;
|
||||
ret.guild_card_description = player->guild_card_description;
|
||||
ret.reserved1 = 0;
|
||||
ret.reserved2 = 0;
|
||||
ret.section_id = player->disp.visual.section_id;
|
||||
ret.char_class = player->disp.visual.char_class;
|
||||
ret.unknown3 = 0;
|
||||
ret.symbol_chats = account->symbol_chats;
|
||||
ret.shortcuts = account->shortcuts;
|
||||
ret.auto_reply = player->auto_reply;
|
||||
ret.info_board = player->info_board;
|
||||
ret.unknown5.clear(0);
|
||||
ret.challenge_data = player->challenge_data;
|
||||
ret.tech_menu_config = player->tech_menu_config;
|
||||
ret.unknown6.clear(0);
|
||||
ret.quest_data2 = player->quest_data2;
|
||||
ret.key_config = account->key_config;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void PlayerLobbyDataPC::clear() {
|
||||
this->player_tag = 0;
|
||||
this->guild_card = 0;
|
||||
|
||||
Reference in New Issue
Block a user