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
|
// thanks shavit for noticing goto areas getting loaded from wz needlessly only for the name retrieval
|
||||||
|
|
||||||
for (Map.Entry<String, Integer> e : towns) {
|
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());
|
List<Entry<String, Integer>> areas = new ArrayList<>(GameConstants.GOTO_AREAS.entrySet());
|
||||||
sortGotoEntries(areas);
|
sortGotoEntries(areas);
|
||||||
for (Map.Entry<String, Integer> e : 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) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -41,10 +41,9 @@ import java.util.HashMap;
|
|||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class MapleMapFactory {
|
public class MapFactory {
|
||||||
|
private static final Data nameData;
|
||||||
private static Data nameData;
|
private static final DataProvider mapSource;
|
||||||
private static DataProvider mapSource;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
nameData = DataProviderFactory.getDataProvider(WZFiles.STRING).getData("Map.img");
|
nameData = DataProviderFactory.getDataProvider(WZFiles.STRING).getData("Map.img");
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
package server.maps;
|
package server.maps;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import net.server.audit.locks.MonitoredLockType;
|
import net.server.audit.locks.MonitoredLockType;
|
||||||
import net.server.audit.locks.MonitoredReadLock;
|
import net.server.audit.locks.MonitoredReadLock;
|
||||||
import net.server.audit.locks.MonitoredReentrantReadWriteLock;
|
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 net.server.audit.locks.factory.MonitoredWriteLockFactory;
|
||||||
import scripting.event.EventInstanceManager;
|
import scripting.event.EventInstanceManager;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class MapleMapManager {
|
public class MapleMapManager {
|
||||||
|
|
||||||
private int channel, world;
|
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) {
|
if (cache) {
|
||||||
mapsWLock.lock();
|
mapsWLock.lock();
|
||||||
|
|||||||
Reference in New Issue
Block a user