public final MapleMap getMapInstance(int args) { final MapleMap map = mapFactory.getInstanceMap(mapIds.get(args)); // in case reactors need shuffling and we are actually loading the map if (!mapFactory.isInstanceMapLoaded(mapIds.get(args))) { if (em.getProperty("shuffleReactors") != null && em.getProperty("shuffleReactors").equals("true")) { map.shuffleReactors(); } } return map; }
public void dispose() { mutex.lock(); try { chars.clear(); chars = null; } finally { mutex.unlock(); } mobs.clear(); mobs = null; killCount.clear(); killCount = null; timeStarted = 0; eventTime = 0; props.clear(); props = null; for (final Integer i : mapIds) { mapFactory.removeInstanceMap(i); } mapIds = null; mapFactory = null; em.disposeInstance(name); em = null; }
public final MapleMap createInstanceMapS(final int mapid) { final int assignedid = em.getChannelServer().getEventSM().getNewInstanceMapId(); mapIds.add(assignedid); return mapFactory.CreateInstanceMap(mapid, false, false, false, assignedid); }