mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
Compare commits
No commits in common. "dbd2ec2270826fce851c2c6050d5b1c5a7675b5a" and "7471bcbf38bb895a1bdad8562fa11d78248761a2" have entirely different histories.
dbd2ec2270
...
7471bcbf38
@ -252,26 +252,11 @@ 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);
|
||||||
if (real->iOpt <= item->iOpt) // delete item (if they attached the whole stack)
|
// delete item
|
||||||
*real = { 0, 0, 0, 0 };
|
plr->Inven[attachment.iSlotNum] = { 0, 0, 0, 0 };
|
||||||
else // otherwise, decrement the item
|
|
||||||
real->iOpt -= item->iOpt;
|
|
||||||
|
|
||||||
// HACK: update the slot
|
|
||||||
INITSTRUCT(sP_FE2CL_PC_ITEM_MOVE_SUCC, itemResp);
|
|
||||||
itemResp.iFromSlotNum = attachment.iSlotNum;
|
|
||||||
itemResp.iToSlotNum = attachment.iSlotNum;
|
|
||||||
itemResp.FromSlotItem = *real;
|
|
||||||
itemResp.ToSlotItem = *real;
|
|
||||||
itemResp.eFrom = (int32_t)Items::SlotType::INVENTORY;
|
|
||||||
itemResp.eTo = (int32_t)Items::SlotType::INVENTORY;
|
|
||||||
sock->sendPacket(itemResp, P_FE2CL_PC_ITEM_MOVE_SUCC);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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