void WorldCreator::DeleteInstance(uint32 instanceid, uint32 mapid) { _busy.Acquire(); MapMgr * mapMgr = NULL; mapMgr = GetMap(mapid)->GetRawInstance(instanceid); if(mapMgr) { if(!mapMgr->HasPlayers()) { GetMap(mapid)->DestroyMapMgrInstance(instanceid); sLog.outDebug("Instance %i on map %i deleted with success\n", instanceid, mapid); } } else { sLog.outDebug("Instance %i failed to be deleted, reason: Doesnt Exist\n", instanceid); } _busy.Release(); }