Rename and clean up MapleMapFactory
This commit is contained in:
@@ -47,13 +47,13 @@ public class GotoCommand extends Command {
|
||||
// thanks shavit for noticing goto areas getting loaded from wz needlessly only for the name retrieval
|
||||
|
||||
for (Map.Entry<String, Integer> e : towns) {
|
||||
GOTO_TOWNS_INFO += ("'" + e.getKey() + "' - #b" + (MapleMapFactory.loadPlaceName(e.getValue())) + "#k\r\n");
|
||||
GOTO_TOWNS_INFO += ("'" + e.getKey() + "' - #b" + (MapFactory.loadPlaceName(e.getValue())) + "#k\r\n");
|
||||
}
|
||||
|
||||
List<Entry<String, Integer>> areas = new ArrayList<>(GameConstants.GOTO_AREAS.entrySet());
|
||||
sortGotoEntries(areas);
|
||||
for (Map.Entry<String, Integer> e : areas) {
|
||||
GOTO_AREAS_INFO += ("'" + e.getKey() + "' - #b" + (MapleMapFactory.loadPlaceName(e.getValue())) + "#k\r\n");
|
||||
GOTO_AREAS_INFO += ("'" + e.getKey() + "' - #b" + (MapFactory.loadPlaceName(e.getValue())) + "#k\r\n");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -41,10 +41,9 @@ import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class MapleMapFactory {
|
||||
|
||||
private static Data nameData;
|
||||
private static DataProvider mapSource;
|
||||
public class MapFactory {
|
||||
private static final Data nameData;
|
||||
private static final DataProvider mapSource;
|
||||
|
||||
static {
|
||||
nameData = DataProviderFactory.getDataProvider(WZFiles.STRING).getData("Map.img");
|
||||
@@ -19,8 +19,6 @@
|
||||
*/
|
||||
package server.maps;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import net.server.audit.locks.MonitoredLockType;
|
||||
import net.server.audit.locks.MonitoredReadLock;
|
||||
import net.server.audit.locks.MonitoredReentrantReadWriteLock;
|
||||
@@ -29,6 +27,9 @@ import net.server.audit.locks.factory.MonitoredReadLockFactory;
|
||||
import net.server.audit.locks.factory.MonitoredWriteLockFactory;
|
||||
import scripting.event.EventInstanceManager;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class MapleMapManager {
|
||||
|
||||
private int channel, world;
|
||||
@@ -76,7 +77,7 @@ public class MapleMapManager {
|
||||
}
|
||||
}
|
||||
|
||||
map = MapleMapFactory.loadMapFromWz(mapid, world, channel, event);
|
||||
map = MapFactory.loadMapFromWz(mapid, world, channel, event);
|
||||
|
||||
if (cache) {
|
||||
mapsWLock.lock();
|
||||
|
||||
Reference in New Issue
Block a user