Browse Source

zone override

birdbane
FatBoy-DOTC 9 months ago
parent
commit
a4d20af0f8
  1. 23
      src/engine/objects/Zone.java

23
src/engine/objects/Zone.java

@ -74,7 +74,11 @@ public class Zone extends AbstractGameObject { @@ -74,7 +74,11 @@ public class Zone extends AbstractGameObject {
this.zCoord = rs.getFloat("ZCoord");
this.yCoord = rs.getFloat("YOffset");
this.loadNum = rs.getInt("LoadNum");
this.safeZone = rs.getByte("SafeZone");
if(overrideSafety(rs.getString("Name"))){
this.safeZone = (byte) 0;
}else {
this.safeZone = rs.getByte("SafeZone");
}
this.Icon1 = rs.getString("Icon1");
this.Icon2 = rs.getString("Icon2");
this.Icon3 = rs.getString("Icon3");
@ -123,6 +127,23 @@ public class Zone extends AbstractGameObject { @@ -123,6 +127,23 @@ public class Zone extends AbstractGameObject {
}
return false;
}
public static boolean overrideSafety(String name){
switch(name){
case"Sanctuary":
case "All-Father's Rest":
case "Hamlet of Hothor's Doom":
case"Hamlet of Hrimdal":
case "Hamlet of Valkirch":
case "Hamlet of Scraefahl":
case "Hamlet of Hengest":
case "Starkholm":
case "Aeldreth Havens":
case "Erkeng Hold":
return false;
}
return true;
}
public static void serializeForClientMsg(Zone zone, ByteBufferWriter writer) {
if (zone.loadNum == 0 && zone.playerCityID == 0)

Loading…
Cancel
Save