|
|
|
@ -176,6 +176,7 @@ public class Mine extends AbstractGameObject {
@@ -176,6 +176,7 @@ public class Mine extends AbstractGameObject {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void serializeForClientMsg(Mine mine, ByteBufferWriter writer) { |
|
|
|
|
try { |
|
|
|
|
writer.putInt(mine.getObjectType().ordinal()); |
|
|
|
|
writer.putInt(mine.getObjectUUID()); |
|
|
|
|
writer.putInt(mine.getObjectUUID()); //actually a hash of mine
|
|
|
|
@ -193,11 +194,11 @@ public class Mine extends AbstractGameObject {
@@ -193,11 +194,11 @@ public class Mine extends AbstractGameObject {
|
|
|
|
|
writer.put(mine.isActive ? (byte) 0x01 : (byte) 0x00); |
|
|
|
|
|
|
|
|
|
Building mineTower = BuildingManager.getBuilding(mine.buildingID); |
|
|
|
|
if(mineTower != null) { |
|
|
|
|
if (mineTower != null) { |
|
|
|
|
writer.putFloat(mineTower.getLoc().x); |
|
|
|
|
writer.putFloat(mineTower.getParentZone().getLoc().y); |
|
|
|
|
writer.putFloat(mineTower.getLoc().z); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
writer.putFloat(mine.parentZone.getLoc().x); |
|
|
|
|
writer.putFloat(mine.parentZone.getLoc().y); |
|
|
|
|
writer.putFloat(mine.parentZone.getLoc().z); |
|
|
|
@ -209,6 +210,9 @@ public class Mine extends AbstractGameObject {
@@ -209,6 +210,9 @@ public class Mine extends AbstractGameObject {
|
|
|
|
|
GuildTag._serializeForDisplay(mine.guildTag, writer); |
|
|
|
|
writer.putString(mine.nationName); |
|
|
|
|
GuildTag._serializeForDisplay(mine.nationTag, writer); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
Logger.error("Failed TO Serialize Mine Because: " + e.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static ArrayList<Mine> getMinesForGuild(int guildID) { |
|
|
|
|