vehicle has a proper expiration day when bought, implemented checking expired vehicles while login

This commit is contained in:
kamilprzyb
2020-09-22 13:16:09 +02:00
parent 00f64ce992
commit 5a58908462
7 changed files with 79 additions and 1 deletions

View File

@@ -115,6 +115,11 @@ void NPCManager::npcVendorBuy(CNSocket* sock, CNPacketData* data) {
sock->sendPacket((void*)&failResp, P_FE2CL_REP_PC_VENDOR_ITEM_BUY_FAIL, sizeof(sP_FE2CL_REP_PC_VENDOR_ITEM_BUY_FAIL));
return;
}
// if vehicle
if (req->Item.iType == 10)
// set time limit: current time + 7days
req->Item.iTimeLimit = getTime() + 604800;
if (slot != req->iInvenSlotNum) {
// possible item stacking?