mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Email: fix issue #186
This commit is contained in:
parent
bbaaa53df2
commit
65a608b478
@ -252,11 +252,16 @@ static void emailSend(CNSocket* sock, CNPacketData* data) {
|
|||||||
if (attachment.ItemInven.iID == 0)
|
if (attachment.ItemInven.iID == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
sItemBase* item = &pkt->aItem[i].ItemInven;
|
||||||
|
sItemBase* real = &plr->Inven[attachment.iSlotNum];
|
||||||
|
|
||||||
resp.aItem[i] = attachment;
|
resp.aItem[i] = attachment;
|
||||||
attachments.push_back(attachment.ItemInven);
|
attachments.push_back(attachment.ItemInven);
|
||||||
attSlots.push_back(attachment.iSlotNum);
|
attSlots.push_back(attachment.iSlotNum);
|
||||||
// delete item
|
if (real->iOpt == item->iOpt) // delete item (if they attached the whole stack)
|
||||||
plr->Inven[attachment.iSlotNum] = { 0, 0, 0, 0 };
|
*real = { 0, 0, 0, 0 };
|
||||||
|
else // otherwise, decrement the item TODO:
|
||||||
|
real->iOpt -= item->iOpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cost = pkt->iCash + 50 + 20 * attachments.size(); // attached taros + postage
|
int cost = pkt->iCash + 50 + 20 * attachments.size(); // attached taros + postage
|
||||||
|
Loading…
Reference in New Issue
Block a user