forked from MagicBane/Server
Static method moved to manager singleton.
This commit is contained in:
@@ -746,33 +746,6 @@ public class City extends AbstractWorldObject {
|
||||
return open;
|
||||
}
|
||||
|
||||
public static void loadCities(Zone zone) {
|
||||
|
||||
ArrayList<City> cities = DbManager.CityQueries.GET_CITIES_BY_ZONE(zone.getObjectUUID());
|
||||
|
||||
for (City city : cities) {
|
||||
|
||||
city.setParent(zone);
|
||||
city.setObjectTypeMask(MBServerStatics.MASK_CITY);
|
||||
city.setLoc(city.location);
|
||||
|
||||
//not player city, must be npc city..
|
||||
if (!zone.isPlayerCity())
|
||||
zone.setNPCCity(true);
|
||||
|
||||
if ((ConfigManager.serverType.equals(ServerType.WORLDSERVER)) && (city.hash == null)) {
|
||||
|
||||
city.setHash();
|
||||
|
||||
if (DataWarehouse.recordExists(Enum.DataRecordType.CITY, city.getObjectUUID()) == false) {
|
||||
CityRecord cityRecord = CityRecord.borrow(city, Enum.RecordEventType.CREATE);
|
||||
DataWarehouse.pushToWarehouse(cityRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void updateDatabase() {
|
||||
|
||||
Reference in New Issue
Block a user