mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 21:40:05 +00:00
Fix not being able to attach weapons to emails
This commit is contained in:
parent
f53de8d521
commit
121c65d7ea
@ -654,13 +654,12 @@ void BuddyManager::emailSend(CNSocket* sock, CNPacketData* data) {
|
|||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
sEmailItemInfoFromCL attachment = pkt->aItem[i];
|
sEmailItemInfoFromCL attachment = pkt->aItem[i];
|
||||||
resp.aItem[i] = attachment;
|
resp.aItem[i] = attachment;
|
||||||
if (attachment.ItemInven.iID > 0 && attachment.ItemInven.iType > 0) {
|
if (attachment.iSlotNum < 0 || attachment.iSlotNum >= AINVEN_COUNT
|
||||||
if (attachment.iSlotNum < 0 || attachment.iSlotNum >= AINVEN_COUNT)
|
|| attachment.ItemInven.iID <= 0 || attachment.ItemInven.iType < 0)
|
||||||
continue; // sanity check
|
continue; // sanity check
|
||||||
attachments.push_back(attachment.ItemInven);
|
attachments.push_back(attachment.ItemInven);
|
||||||
// delete item
|
// delete item
|
||||||
plr->Inven[attachment.iSlotNum] = { 0, 0, 0, 0 };
|
plr->Inven[attachment.iSlotNum] = { 0, 0, 0, 0 };
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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