Remove redundant instance deletion

This commit is contained in:
Gent S
2020-10-25 18:14:35 -04:00
parent d840b0bbd0
commit 609d3cdb99
3 changed files with 4 additions and 7 deletions

View File

@@ -584,8 +584,6 @@ void NPCManager::handleWarp(CNSocket* sock, int32_t warpId) {
if (Warps.find(warpId) == Warps.end())
return;
uint64_t fromInstance = plrv.plr->instanceID; // saved for post-warp
// std::cerr << "Warped to Map Num:" << Warps[warpId].instanceID << " NPC ID " << Warps[warpId].npcID << std::endl;
if (Warps[warpId].isInstance) {
uint64_t instanceID = Warps[warpId].instanceID;
@@ -625,9 +623,6 @@ void NPCManager::handleWarp(CNSocket* sock, int32_t warpId) {
plrv.plr->instanceID = INSTANCE_OVERWORLD;
sock->sendPacket((void*)&resp, P_FE2CL_REP_PC_WARP_USE_NPC_SUCC, sizeof(sP_FE2CL_REP_PC_WARP_USE_NPC_SUCC));
}
// post-warp: check if the source instance has no more players in it and delete it if so
ChunkManager::destroyInstanceIfEmpty(fromInstance);
}
/*