add card config backup

This commit is contained in:
Martin Michelsen
2022-03-28 18:17:29 -07:00
parent 035730c1b2
commit cf44e2041e
4 changed files with 47 additions and 18 deletions
+5 -5
View File
@@ -2102,12 +2102,12 @@ void send_give_experience(shared_ptr<Lobby> l, shared_ptr<Client> c,
void send_ep3_card_list_update(shared_ptr<Client> c) {
auto file_data = file_cache.get("system/ep3/cardupdate.mnr");
string data("\0\0\0\0", 4);
*reinterpret_cast<uint32_t*>(data.data()) = file_data->size();
data += *file_data;
data.resize((data.size() + 3) & ~3);
StringWriter w;
w.put_u32l(file_data->size());
w.write(*file_data);
w.str().resize((w.str().size() + 3) & (~3));
send_command(c, 0xB8, 0x00, data);
send_command(c, 0xB8, 0x00, w.str());
}
// sends the client a generic rank