Sync player data to DB when trading and sending emails

This commit is contained in:
2022-12-05 22:29:23 +01:00
parent eb8e54c1f0
commit 9b3e856a05
5 changed files with 67 additions and 31 deletions

View File

@@ -276,7 +276,7 @@ static void emailSend(CNSocket* sock, CNPacketData* data) {
0 // DeleteTime (unimplemented)
};
if (!Database::sendEmail(&email, attachments)) {
if (!Database::sendEmail(&email, attachments, plr)) {
plr->money += cost; // give money back
// give items back
while (!attachments.empty()) {