Merge pull request #110 from kamilprzyb/vehicles_pr

Fixed Time and implemented vehicles expiring
This commit is contained in:
2020-09-23 14:48:38 -05:00
committed by GitHub
10 changed files with 112 additions and 8 deletions

View File

@@ -369,7 +369,13 @@ void MissionManager::mobKilled(CNSocket *sock, int mobid) {
if (task["m_iCSUNumToKill"][j] != 0)
{
missionmob = true;
plr->RemainingNPCCount[i][j]--;
// sanity check
if (plr->RemainingNPCCount[i][j] == 0) {
std::cout << "[WARN] RemainingNPCCount tries to go below 0?!" << std::endl;
}
else {
plr->RemainingNPCCount[i][j]--;
}
}
// drop quest item
if (task["m_iCSUItemNumNeeded"][j] != 0 && !isQuestItemFull(sock, task["m_iCSUItemID"][j], task["m_iCSUItemNumNeeded"][j]) ) {