mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-10-26 06:20:04 +00:00
Summoned mobs are now actually treated as mobs.
Unfortunetly, this necessitated keeping around yet more JSON objects for the duration of the server's runtime. It also involved unifying the way NPC IDs are handled, such that they may be allocated and deallocated out of order. If any NPCID-related bugs occour, this commit should be regarded as the prime suspect.
This commit is contained in:
@@ -215,6 +215,13 @@ void MobManager::deadStep(Mob *mob, time_t currTime) {
|
||||
s->sendPacket(&pkt, P_FE2CL_NPC_EXIT, sizeof(sP_FE2CL_NPC_EXIT));
|
||||
}
|
||||
}
|
||||
|
||||
// if it was summoned, remove it permanently
|
||||
if (mob->summoned) {
|
||||
std::cout << "[INFO] Deallocating killed summoned mob" << std::endl;
|
||||
NPCManager::removeNPC(mob->appearanceData.iNPC_ID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (mob->killedTime != 0 && currTime - mob->killedTime < mob->regenTime * 100)
|
||||
|
||||
Reference in New Issue
Block a user