Force serialize mines.

This commit is contained in:
2023-02-23 17:37:14 -05:00
parent 0dad677bc0
commit 85798822cc
@@ -50,13 +50,9 @@ public class CityDataHandler extends AbstractClientMsgHandler {
if (playerSession == null) if (playerSession == null)
return true; return true;
// No reason to serialize cities and mines everytime map is // No reason to serialize cities everytime map is
// opened. Wait until something has changed. // opened. Wait until something has changed.
// This does not work for mines.
if (playerCharacter.getTimeStamp("mineupdate") <= Mine.getLastChange()) {
playerCharacter.setTimeStamp("mineupdate", System.currentTimeMillis());
updateMine = true;
}
if (playerCharacter.getTimeStamp("cityUpdate") <= City.lastCityUpdate) { if (playerCharacter.getTimeStamp("cityUpdate") <= City.lastCityUpdate) {
playerCharacter.setTimeStamp("cityUpdate", System.currentTimeMillis()); playerCharacter.setTimeStamp("cityUpdate", System.currentTimeMillis());
@@ -64,7 +60,7 @@ public class CityDataHandler extends AbstractClientMsgHandler {
} }
cityDataMsg cityDataMsg = new cityDataMsg(SessionManager.getSession(playerCharacter), false); cityDataMsg cityDataMsg = new cityDataMsg(SessionManager.getSession(playerCharacter), false);
cityDataMsg.updateMines(updateMine); cityDataMsg.updateMines(true);
cityDataMsg.updateCities(updateCity); cityDataMsg.updateCities(updateCity);
dispatch = Dispatch.borrow(playerCharacter, cityDataMsg); dispatch = Dispatch.borrow(playerCharacter, cityDataMsg);