Consistent handling of wz files and their paths

This commit is contained in:
P0nk
2021-07-10 17:37:24 +02:00
parent 2193057fce
commit 14a405adb2
27 changed files with 106 additions and 82 deletions

View File

@@ -969,7 +969,6 @@ public class Server {
}
public static void main(String[] args) {
System.setProperty("wzpath", "wz");
Security.setProperty("crypto.policy", "unlimited");
AutoJCE.removeCryptographyRestrictions();
Server.getInstance().init();

View File

@@ -34,10 +34,10 @@ import net.server.world.MapleParty;
import provider.MapleData;
import provider.MapleDataProviderFactory;
import provider.MapleDataTool;
import provider.wz.WZFiles;
import tools.MaplePacketCreator;
import tools.Pair;
import java.io.File;
import java.util.*;
import java.util.Map.Entry;
@@ -68,7 +68,7 @@ public class MaplePartySearchCoordinator {
private static Map<Integer, Set<Integer>> fetchNeighbouringMaps() {
Map<Integer, Set<Integer>> mapLinks = new HashMap<>();
MapleData data = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("wzpath") + "/" + "Etc.wz")).getData("MapNeighbors.img");
MapleData data = MapleDataProviderFactory.getDataProvider(WZFiles.ETC).getData("MapNeighbors.img");
if (data != null) {
for (MapleData mapdata : data.getChildren()) {
int mapid = Integer.parseInt(mapdata.getName());