forked from MagicBane/Server
zone loading
This commit is contained in:
@@ -81,38 +81,41 @@ public class Mine extends AbstractGameObject {
|
|||||||
this.buildingID = rs.getInt("mine_buildingUID");
|
this.buildingID = rs.getInt("mine_buildingUID");
|
||||||
this.flags = rs.getInt("flags");
|
this.flags = rs.getInt("flags");
|
||||||
//int parent = rs.getInt("parent");
|
//int parent = rs.getInt("parent");
|
||||||
Building tower = BuildingManager.getBuildingFromCache(rs.getInt("mine_buildingUID"));
|
if(BuildingManager.getBuildingFromCache(rs.getInt("mine_buildingUID")) != null) {
|
||||||
for(Zone zone : ZoneManager.getAllZonesIn(tower.loc)){
|
Building tower = BuildingManager.getBuildingFromCache(rs.getInt("mine_buildingUID"));
|
||||||
if(zone.isMacroZone()) {
|
|
||||||
this.parentZone = zone;
|
for (Zone zone : ZoneManager.getAllZonesIn(tower.loc)) {
|
||||||
this.zoneName = this.parentZone.getParent().getName();
|
if (zone.isMacroZone()) {
|
||||||
|
this.parentZone = zone;
|
||||||
|
this.zoneName = this.parentZone.getParent().getName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.owningGuild = Guild.getGuild(ownerUID);
|
||||||
|
Guild nation = null;
|
||||||
|
|
||||||
|
if (this.owningGuild.isEmptyGuild()) {
|
||||||
|
this.guildName = "";
|
||||||
|
this.guildTag = GuildTag.ERRANT;
|
||||||
|
nation = Guild.getErrantGuild();
|
||||||
|
this.owningGuild = Guild.getErrantGuild();
|
||||||
|
} else {
|
||||||
|
this.guildName = this.owningGuild.getName();
|
||||||
|
this.guildTag = this.owningGuild.getGuildTag();
|
||||||
|
nation = this.owningGuild.getNation();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nation.isEmptyGuild()) {
|
||||||
|
this.nationName = nation.getName();
|
||||||
|
this.nationTag = nation.getGuildTag();
|
||||||
|
} else {
|
||||||
|
this.nationName = "";
|
||||||
|
this.nationTag = GuildTag.ERRANT;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.production = Resource.valueOf(rs.getString("mine_resource"));
|
||||||
|
this.lastClaimer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.owningGuild = Guild.getGuild(ownerUID);
|
|
||||||
Guild nation = null;
|
|
||||||
|
|
||||||
if (this.owningGuild.isEmptyGuild()) {
|
|
||||||
this.guildName = "";
|
|
||||||
this.guildTag = GuildTag.ERRANT;
|
|
||||||
nation = Guild.getErrantGuild();
|
|
||||||
this.owningGuild = Guild.getErrantGuild();
|
|
||||||
} else {
|
|
||||||
this.guildName = this.owningGuild.getName();
|
|
||||||
this.guildTag = this.owningGuild.getGuildTag();
|
|
||||||
nation = this.owningGuild.getNation();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!nation.isEmptyGuild()) {
|
|
||||||
this.nationName = nation.getName();
|
|
||||||
this.nationTag = nation.getGuildTag();
|
|
||||||
} else {
|
|
||||||
this.nationName = "";
|
|
||||||
this.nationTag = GuildTag.ERRANT;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.production = Resource.valueOf(rs.getString("mine_resource"));
|
|
||||||
this.lastClaimer = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetTimes(){
|
public static void SetTimes(){
|
||||||
@@ -150,7 +153,7 @@ public class Mine extends AbstractGameObject {
|
|||||||
AmericaMines.get(10).liveTime = 1;
|
AmericaMines.get(10).liveTime = 1;
|
||||||
AmericaMines.get(11).liveTime = 1;
|
AmericaMines.get(11).liveTime = 1;
|
||||||
AmericaMines.get(12).liveTime = 1;
|
AmericaMines.get(12).liveTime = 1;
|
||||||
AmericaMines.get(13).liveTime = 1;
|
//AmericaMines.get(13).liveTime = 1;
|
||||||
|
|
||||||
|
|
||||||
int count = 1;
|
int count = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user