mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
added sanity check for killing mission mobs
This commit is contained in:
parent
adf017b07c
commit
00f64ce992
@ -328,7 +328,13 @@ void MissionManager::mobKilled(CNSocket *sock, int mobid) {
|
|||||||
if (task["m_iCSUNumToKill"][j] != 0)
|
if (task["m_iCSUNumToKill"][j] != 0)
|
||||||
{
|
{
|
||||||
missionmob = true;
|
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
|
// drop quest item
|
||||||
if (task["m_iCSUItemNumNeeded"][j] != 0 && !isQuestItemFull(sock, task["m_iCSUItemID"][j], task["m_iCSUItemNumNeeded"][j]) ) {
|
if (task["m_iCSUItemNumNeeded"][j] != 0 && !isQuestItemFull(sock, task["m_iCSUItemID"][j], task["m_iCSUItemNumNeeded"][j]) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user