diff --git a/src/Database.cpp b/src/Database.cpp index 99bff3b..a478838 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -611,7 +611,7 @@ void Database::getInventory(Player* player) { } void Database::removeExpiredVehicles(Player* player) { - uint64_t currentTime = getTimestamp(); + int32_t currentTime = getTimestamp()/1000; //remove from bank immediately for (int i = 0; i < ABANK_COUNT; i++) { if (player->Bank[i].iType == 10 && player->Bank[i].iTimeLimit < currentTime) diff --git a/src/NPCManager.cpp b/src/NPCManager.cpp index c054dff..0f6d940 100644 --- a/src/NPCManager.cpp +++ b/src/NPCManager.cpp @@ -118,8 +118,7 @@ void NPCManager::npcVendorBuy(CNSocket* sock, CNPacketData* data) { // if vehicle if (req->Item.iType == 10) // set time limit: current time + 7days - req->Item.iTimeLimit = getTimestamp() + 604800; - + req->Item.iTimeLimit = getTimestamp()/1000 + 604800; if (slot != req->iInvenSlotNum) { // possible item stacking?