PreparedStatementpreparedStatement=connection.prepareStatement("SELECT `obj_building`.*, `object`.`parent` FROM `object` INNER JOIN `obj_building` ON `obj_building`.`UID` = `object`.`UID` ORDER BY `object`.`UID` ASC;")){
ResultSetrs=preparedStatement.executeQuery();
buildings=getObjectsFromRs(rs,1000);
@ -425,26 +425,28 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -425,26 +425,28 @@ public class dbBuildingHandler extends dbHandlerBase {
@ -455,26 +457,29 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -455,26 +457,29 @@ public class dbBuildingHandler extends dbHandlerBase {
@ -484,35 +489,27 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -484,35 +489,27 @@ public class dbBuildingHandler extends dbHandlerBase {
@ -722,10 +719,10 @@ public class dbBuildingHandler extends dbHandlerBase {
@@ -722,10 +719,10 @@ public class dbBuildingHandler extends dbHandlerBase {
+"WHERE`buildingUID` = ? AND `playerUID` = ? AND `guildUID` = ? AND `friendType` = ?")){
PreparedStatementpreparedStatement=connection.prepareStatement("SELECT `obj_city`.*, `object`.`parent` FROM `obj_city` INNER JOIN `object` ON `object`.`UID` = `obj_city`.`UID` WHERE `object`.`parent`=?;")){
preparedStatement.setLong(1,objectUUID);
PreparedStatementpreparedStatement=connection.prepareStatement("SELECT `obj_city`.*, `object`.`parent` FROM `obj_city` INNER JOIN `object` ON `object`.`UID` = `obj_city`.`UID` ORDER BY `object`.`UID` ASC;")){
PreparedStatementpreparedStatement=connection.prepareStatement("SELECT `obj_mob`.*, `object`.`parent` FROM `object` INNER JOIN `obj_mob` ON `obj_mob`.`UID` = `object`.`UID` ORDER BY `object`.`UID` ASC;")){
PreparedStatementpreparedStatement=connection.prepareStatement("SELECT `obj_npc`.*, `object`.`parent` FROM `object` INNER JOIN `obj_npc` ON `obj_npc`.`UID` = `object`.`UID` ORDER BY `object`.`UID` ASC;")){
PreparedStatementpreparedStatement=connection.prepareStatement("SELECT `obj_zone`.*, `object`.`parent` FROM `object` INNER JOIN `obj_zone` ON `obj_zone`.`UID` = `object`.`UID` ORDER BY `object`.`UID` ASC;")){
ResultSetrs=preparedStatement.executeQuery();
zoneList=getObjectsFromRs(rs,2000);
}catch(SQLExceptione){
Logger.error(e);
}
returnwsmList;
returnzoneList;
}
publicZoneGET_BY_UID(longID){
@ -72,43 +68,38 @@ public class dbZoneHandler extends dbHandlerBase {
@@ -72,43 +68,38 @@ public class dbZoneHandler extends dbHandlerBase {
@ -31,9 +31,9 @@ public class SetForceRenameCityCmd extends AbstractDevCmd {
@@ -31,9 +31,9 @@ public class SetForceRenameCityCmd extends AbstractDevCmd {
@ -86,7 +86,7 @@ public enum LootManager {
@@ -86,7 +86,7 @@ public enum LootManager {
if(ib==null)
break;
if(ib.isDiscRune()||ib.getName().toLowerCase().contains("of the gods")){
ChatSystemMsgchatMsg=newChatSystemMsg(null,mob.getName()+" in "+mob.getParentZone().getName()+" has found the "+ib.getName()+". Are you tough enough to take it?");
ChatSystemMsgchatMsg=newChatSystemMsg(null,mob.getName()+" in "+mob.getParentZone().zoneName+" has found the "+ib.getName()+". Are you tough enough to take it?");
@ -61,8 +61,6 @@ public class FinishSummonsJob extends AbstractScheduleJob {
@@ -61,8 +61,6 @@ public class FinishSummonsJob extends AbstractScheduleJob {
@ -39,7 +40,7 @@ public class UpgradeBuildingJob extends AbstractScheduleJob {
@@ -39,7 +40,7 @@ public class UpgradeBuildingJob extends AbstractScheduleJob {
@ -1196,7 +1196,7 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1196,7 +1196,7 @@ public class ClientMessagePump implements NetMsgHandler {
@ -1229,7 +1229,7 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1229,7 +1229,7 @@ public class ClientMessagePump implements NetMsgHandler {
@ -1280,7 +1280,7 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1280,7 +1280,7 @@ public class ClientMessagePump implements NetMsgHandler {
@ -151,7 +151,7 @@ public class AbandonAssetMsgHandler extends AbstractClientMsgHandler {
@@ -151,7 +151,7 @@ public class AbandonAssetMsgHandler extends AbstractClientMsgHandler {
@ -45,7 +45,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler {
@@ -45,7 +45,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler {
@ -65,7 +65,7 @@ public class ChannelMuteMsgHandler extends AbstractClientMsgHandler {
@@ -65,7 +65,7 @@ public class ChannelMuteMsgHandler extends AbstractClientMsgHandler {
@ -69,7 +69,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
@@ -69,7 +69,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
@ -117,7 +117,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
@@ -117,7 +117,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
@ -95,7 +95,7 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler {
@@ -95,7 +95,7 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler {
@ -75,12 +75,12 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
@@ -75,12 +75,12 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
ErrorPopupMsg.sendErrorMsg(player,"Unable to find city to command.");
@ -254,7 +254,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
@@ -254,7 +254,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
@ -182,7 +182,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -182,7 +182,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@ -334,7 +334,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -334,7 +334,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@ -151,7 +151,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
@@ -151,7 +151,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
@ -175,7 +175,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
@@ -175,7 +175,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
@ -354,7 +354,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
@@ -354,7 +354,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
@ -288,7 +288,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
@@ -288,7 +288,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
@ -112,7 +111,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -112,7 +111,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
PlaceAssetMsg.sendPlaceAssetError(origin,6,"");// Cannot place underwater
returnfalse;
}
@ -138,7 +137,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -138,7 +137,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -157,7 +156,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -157,7 +156,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Retrieve the building details we're placing
if(serverZone.isNPCCity()==true){
if(serverZone.isNPCCity==true){
PlaceAssetMsg.sendPlaceAssetError(origin,15,"");// Cannot place in a peace zone
returnfalse;
}
@ -178,7 +177,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -178,7 +177,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
PlaceAssetMsg.sendPlaceAssetError(origin,6,"");// Cannot place underwater
returnfalse;
}
@ -186,7 +185,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -186,7 +185,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Players cannot place buildings in mob zones.
if((serverZone.isMacroZone()==true)
||(serverZone.getParent().isMacroZone()==true)){
||(serverZone.parent.isMacroZone()==true)){
PlaceAssetMsg.sendPlaceAssetError(origin,57,player.getName());// No building may be placed within this territory
returnfalse;
}
@ -202,8 +201,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -202,8 +201,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
PlaceAssetMsg.sendPlaceAssetError(origin,1,"Cannot place asset on dead tree until world heals");
returnfalse;
}
@ -262,14 +261,14 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -262,14 +261,14 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Must be a player city
if(serverZone.isPlayerCity()==false){
if(serverZone.guild_zone==false){
PlaceAssetMsg.sendPlaceAssetError(origin,41,player.getName());// Cannot place outside a guild zone
PlaceAssetMsg.sendPlaceAssetError(origin,52,"");//"no city to associate asset with"
@ -513,7 +512,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -513,7 +512,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -572,7 +571,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -572,7 +571,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
PlaceAssetMsg.sendPlaceAssetError(origin,52,"");// Cannot place outisde a guild zone
returnfalse;
}
@ -661,7 +660,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -661,7 +660,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -750,8 +749,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -750,8 +749,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -781,37 +780,19 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -781,37 +780,19 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
playerNation=playerCharacter.getGuild();
playerNation.setGuildState(GuildState.Sovereign);
// Link the zone with the city and then add
// to the appropriate hash tables and cache
zoneObject.setPlayerCity(true);
if(zoneObject.getParent()!=null)
zoneObject.getParent().addNode(zoneObject);//add as child to parent
// *** Refactor : figure out how to send like, one?
@ -858,7 +839,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -858,7 +839,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -932,7 +913,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -932,7 +913,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// Cannot place shrine in abandoned city. Shrines must be owned
// by the tol owner not the person placing them.
@ -1002,7 +983,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -1002,7 +983,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -1062,7 +1043,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -1062,7 +1043,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
// We need to be able to access how much gold a character is carrying
@ -1118,7 +1099,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -1118,7 +1099,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -1230,7 +1211,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -1230,7 +1211,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -1295,7 +1276,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -1295,7 +1276,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -1370,7 +1351,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -1370,7 +1351,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -44,11 +44,11 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler {
@@ -44,11 +44,11 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler {
@ -110,7 +110,6 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
@@ -110,7 +110,6 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
@ -513,17 +513,17 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@@ -513,17 +513,17 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@ -531,9 +531,9 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@@ -531,9 +531,9 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
writer.putInt(guild.getObjectUUID());
else
writer.putInt(0);
writer.put(condemned.isActive()?(byte)1:(byte)0);
writer.put(condemned.active?(byte)1:(byte)0);
writer.put((byte)0);
writer.put(condemned.isActive()?(byte)1:(byte)0);
writer.put(condemned.active?(byte)1:(byte)0);
if(playerCharacter!=null)
writer.putString(playerCharacter.getFirstName());
@ -547,16 +547,16 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@@ -547,16 +547,16 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
}
break;
case4:
guild=Guild.getGuild(condemned.getGuildUID());
guild=Guild.getGuild(condemned.guildUID);
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(condemned.getGuildUID());
writer.putInt(condemned.getFriendType());
writer.putInt(condemned.guildUID);
writer.putInt(condemned.friendType);
writer.putLong(0);
writer.putInt(GameObjectType.Guild.ordinal());
writer.putInt(condemned.getGuildUID());
writer.putInt(condemned.guildUID);
writer.putLong(0);
writer.put((byte)0);
writer.put(condemned.isActive()?(byte)1:(byte)0);
writer.put(condemned.active?(byte)1:(byte)0);
writer.put((byte)0);
if(guild!=null)
writer.putString(guild.getName());
@ -570,17 +570,17 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@@ -570,17 +570,17 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@ -619,22 +619,22 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@@ -619,22 +619,22 @@ public class OpenFriendsCondemnListMsg extends ClientNetMsg {
@ -1069,105 +886,123 @@ public class Building extends AbstractWorldObject {
@@ -1069,105 +886,123 @@ public class Building extends AbstractWorldObject {
returnmaxGold;
}
//This returns if a player is allowed access to control the building
@ -1653,7 +1649,7 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -1653,7 +1649,7 @@ public class Mob extends AbstractIntelligenceAgent {
// Setup location for this Mobile
this.loc=newVector3fImmutable(bindLoc);
this.setLoc(bindLoc);
this.endLoc=newVector3fImmutable(bindLoc);
// Initialize inventory
@ -1681,10 +1677,13 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -1681,10 +1677,13 @@ public class Mob extends AbstractIntelligenceAgent {
@ -117,10 +117,8 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -117,10 +117,8 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1509,16 +1507,16 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1509,16 +1507,16 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1549,12 +1547,12 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1549,12 +1547,12 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1581,12 +1579,12 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1581,12 +1579,12 @@ public class PlayerCharacter extends AbstractCharacter {
leaveWater=1f;
if(zone.getSeaLevel()!=0){
if(zone.sea_level!=0){
floatlocalAltitude=leaver.getLoc().y;
if(localAltitude+leaveWater<zone.getSeaLevel())
if(localAltitude+leaveWater<zone.sea_level)
returnfalse;
}else{
if(leaver.getLoc().y+leaveWater<0)
@ -1705,7 +1703,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1705,7 +1703,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1799,7 +1797,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1799,7 +1797,7 @@ public class PlayerCharacter extends AbstractCharacter {
//enable this to give players deathshroud if mobs kill player.
@ -1845,7 +1843,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1845,7 +1843,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1900,7 +1898,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1900,7 +1898,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4741,10 +4739,10 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4741,10 +4739,10 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4762,13 +4760,13 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4762,13 +4760,13 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4834,7 +4832,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4834,7 +4832,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4842,7 +4840,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4842,7 +4840,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4888,12 +4886,10 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4888,12 +4886,10 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4902,7 +4898,6 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4902,7 +4898,6 @@ public class PlayerCharacter extends AbstractCharacter {
@ -5436,14 +5431,6 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5436,14 +5431,6 @@ public class PlayerCharacter extends AbstractCharacter {
@ -5452,40 +5439,10 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -5452,40 +5439,10 @@ public class PlayerCharacter extends AbstractCharacter {
Logger.warn("Warning! WorldServerMap with ID "+zone.getObjectUUID()+" has a loadnum of 0 (player city) and no city linked. This will probably crash the client!");
@ -56,7 +56,7 @@ public class CreateMobPowerAction extends AbstractPowerAction {
@@ -56,7 +56,7 @@ public class CreateMobPowerAction extends AbstractPowerAction {
@ -38,7 +38,7 @@ public class MobRecallPowerAction extends AbstractPowerAction {
@@ -38,7 +38,7 @@ public class MobRecallPowerAction extends AbstractPowerAction {
@ -58,7 +58,7 @@ public class RecallPowerAction extends AbstractPowerAction {
@@ -58,7 +58,7 @@ public class RecallPowerAction extends AbstractPowerAction {
@ -55,7 +55,7 @@ public class SummonPowerAction extends AbstractPowerAction {
@@ -55,7 +55,7 @@ public class SummonPowerAction extends AbstractPowerAction {
@ -101,7 +101,7 @@ public class TeleportPowerAction extends AbstractPowerAction {
@@ -101,7 +101,7 @@ public class TeleportPowerAction extends AbstractPowerAction {
@ -136,25 +136,25 @@ public class LoginServerMsgHandler implements NetMsgHandler {
@@ -136,25 +136,25 @@ public class LoginServerMsgHandler implements NetMsgHandler {
@ -163,10 +163,10 @@ public class HourlyJobThread implements Runnable {
@@ -163,10 +163,10 @@ public class HourlyJobThread implements Runnable {
mine.nationName=nation.getName();
mine.nationTag=nation.getGuildTag();
mineBuilding.rebuildMine();
BuildingManager.rebuildMine(mineBuilding);
WorldGrid.updateObject(mineBuilding);
ChatSystemMsgchatMsg=newChatSystemMsg(null,mine.lastClaimer.getName()+" has claimed the mine in "+mine.getParentZone().getParent().getName()+" for "+mine.getOwningGuild().getName()+". The mine is no longer active.");
ChatSystemMsgchatMsg=newChatSystemMsg(null,mine.lastClaimer.getName()+" has claimed the mine in "+mine.getParentZone().parent.zoneName+" for "+mine.getOwningGuild().getName()+". The mine is no longer active.");