diff --git a/gameserver/src/main/java/brainwine/gameserver/zone/Zone.java b/gameserver/src/main/java/brainwine/gameserver/zone/Zone.java index 9464a6f..487a172 100644 --- a/gameserver/src/main/java/brainwine/gameserver/zone/Zone.java +++ b/gameserver/src/main/java/brainwine/gameserver/zone/Zone.java @@ -79,8 +79,15 @@ public class Zone { this(documentId, config.getName(), config.getBiome(), config.getWidth(), config.getHeight()); surface = data.getSurface(); sunlight = data.getSunlight(); - pendingSunlight.addAll(data.getPendingSunlight()); - chunksExplored = data.getChunksExplored(); + + // Ha ha silly me! + if(data.getPendingSunlight() != null) { + pendingSunlight.addAll(data.getPendingSunlight()); + } + + if(data.getChunksExplored() != null) { + chunksExplored = data.getChunksExplored(); + } } public Zone(String documentId, String name, Biome biome, int width, int height) { diff --git a/gameserver/src/main/java/brainwine/gameserver/zone/ZoneManager.java b/gameserver/src/main/java/brainwine/gameserver/zone/ZoneManager.java index 98d901a..48239fd 100644 --- a/gameserver/src/main/java/brainwine/gameserver/zone/ZoneManager.java +++ b/gameserver/src/main/java/brainwine/gameserver/zone/ZoneManager.java @@ -20,6 +20,7 @@ import org.msgpack.core.MessageUnpacker; import org.msgpack.jackson.dataformat.MessagePackFactory; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import brainwine.gameserver.util.ZipUtils; import brainwine.gameserver.zone.gen.ZoneGenerator; @@ -28,7 +29,8 @@ import brainwine.shared.JsonHelper; public class ZoneManager { private static final Logger logger = LogManager.getLogger(); - private final ObjectMapper mapper = new ObjectMapper(new MessagePackFactory()); + private final ObjectMapper mapper = new ObjectMapper(new MessagePackFactory()) + .setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE); private final File dataDir = new File("zones"); private Map zones = new HashMap<>(); private Map zonesByName = new HashMap<>();