Пример #1
0
  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;
  }
Пример #2
0
 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;
 }
Пример #3
0
 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);
 }