diff --git a/common/src/main/scala/net/psforever/packet/game/ZoneInfoMessage.scala b/common/src/main/scala/net/psforever/packet/game/ZoneInfoMessage.scala
index 09e84c7d..c1c4b7a6 100644
--- a/common/src/main/scala/net/psforever/packet/game/ZoneInfoMessage.scala
+++ b/common/src/main/scala/net/psforever/packet/game/ZoneInfoMessage.scala
@@ -6,18 +6,22 @@ import scodec.Codec
import scodec.codecs._
/**
- * na
+ * Change the "Empire Status" text in the Interstellar Map zone description for the specified zone.
+ *
+ * The `Long` value is applicable to the caverns.
+ * It indicates how long the given cavern will remain locked until at least one of their geowarps will open during normal rotation.
+ * As thus, when a cavern has its status as "inactive," this number will always be a non-zero.
+ * On normal continents, this number is always zero, though a non-zero number will not have any effect anyway.
* @param zone the zone id
- * @param empire_status change the "Empire Status" text in the Interstellar Map zone description;
- * `true` displays the queue availability for the avatar's empire;
- * `false` display "Inactive"
- * @param unk na;
- * always 0?
- * @see `ZonePopulationUpdateMessage`
+ * @param empire_status `true` displays the queue availability for the avatar's empire;
+ * `false` displays "Inactive"
+ * @param lock_time how long until the continent naturally unlocks (in ms);
+ * only applicable to caverns
+ * @see `ZonePopulationUpdateMessage` for information on population and queues
*/
final case class ZoneInfoMessage(zone : Int,
empire_status : Boolean,
- unk : Long)
+ lock_time : Long)
extends PlanetSideGamePacket {
type Packet = ZoneInfoMessage
def opcode = GamePacketOpcode.ZoneInfoMessage
@@ -28,6 +32,6 @@ object ZoneInfoMessage extends Marshallable[ZoneInfoMessage] {
implicit val codec : Codec[ZoneInfoMessage] = (
("zone" | uint16L) ::
("empire_status" | bool) ::
- ("unk" | uint32L)
+ ("lock_time" | uint32L)
).as[ZoneInfoMessage]
}
diff --git a/common/src/test/scala/GamePacketTest.scala b/common/src/test/scala/GamePacketTest.scala
index abb05c7e..903b62f0 100644
--- a/common/src/test/scala/GamePacketTest.scala
+++ b/common/src/test/scala/GamePacketTest.scala
@@ -2184,8 +2184,9 @@ class GamePacketTest extends Specification {
"ZoneInfoMessage" should {
val string = hex"C6 0C 00 80 00 00 00 00"
+ val string_cavern = hex"C6 1B 00 1D F9 F3 00 00"
- "decode" in {
+ "decode (normal)" in {
PacketCoding.DecodePacket(string).require match {
case ZoneInfoMessage(zone, empire_status, unk) =>
zone mustEqual 12
@@ -2196,12 +2197,30 @@ class GamePacketTest extends Specification {
}
}
- "encode" in {
+ "decode (cavern)" in {
+ PacketCoding.DecodePacket(string_cavern).require match {
+ case ZoneInfoMessage(zone, empire_status, unk) =>
+ zone mustEqual 27
+ empire_status mustEqual false
+ unk mustEqual 15135547
+ case default =>
+ ko
+ }
+ }
+
+ "encode (normal)" in {
val msg = ZoneInfoMessage(12, true, 0)
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
+
+ "encode (cavern)" in {
+ val msg = ZoneInfoMessage(27, false, 15135547)
+ val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
+
+ pkt mustEqual string_cavern
+ }
}
"PingMsg" should {