diff --git a/common/src/main/scala/net/psforever/packet/GamePacketOpcode.scala b/common/src/main/scala/net/psforever/packet/GamePacketOpcode.scala index 6e9984e5d..911bc1103 100644 --- a/common/src/main/scala/net/psforever/packet/GamePacketOpcode.scala +++ b/common/src/main/scala/net/psforever/packet/GamePacketOpcode.scala @@ -457,7 +457,7 @@ object GamePacketOpcode extends Enumeration { case 0x72 => noDecoder(FriendsRequest) case 0x73 => noDecoder(FriendsResponse) case 0x74 => noDecoder(TriggerEnvironmentalDamageMessage) - case 0x75 => noDecoder(TrainingZoneMessage) + case 0x75 => game.TrainingZoneMessage.decode case 0x76 => noDecoder(DeployableObjectsInfoMessage) case 0x77 => noDecoder(SquadState) // 0x78 diff --git a/common/src/main/scala/net/psforever/packet/game/TrainingZoneMessage.scala b/common/src/main/scala/net/psforever/packet/game/TrainingZoneMessage.scala new file mode 100644 index 000000000..5a1d2b168 --- /dev/null +++ b/common/src/main/scala/net/psforever/packet/game/TrainingZoneMessage.scala @@ -0,0 +1,38 @@ +// Copyright (c) 2016 PSForever.net to present +package net.psforever.packet.game + +import net.psforever.packet.{GamePacketOpcode, Marshallable, PlanetSideGamePacket} +import scodec.Codec +import scodec.codecs._ + +/** + * The client is telling the server that the player wants to go to the training zones.
+ *
+ * This message is dispatched when a player enters the VR hallway / VR teleport and accepts the "Shooting Range" or the "Vehicle Training Area" options on the prompt. + * The packet sends indication to the server (as if it didn't know?) in regards to which training grounds the player should be sent. + * Players are sent to their respective empire's area by default.
+ * @param unk1 na; + * 19 (`13`) when shooting range; + * 22 (`16`) when ground vehicle range + * @param unk2 na; always zero? + * @param unk3 na; always zero? + * @param unk4 na; always zero? + */ +final case class TrainingZoneMessage(unk1 : Int, + unk2 : Int, + unk3 : Int, + unk4 : Int) + extends PlanetSideGamePacket { + type Packet = TrainingZoneMessage + def opcode = GamePacketOpcode.TrainingZoneMessage + def encode = TrainingZoneMessage.encode(this) +} + +object TrainingZoneMessage extends Marshallable[TrainingZoneMessage] { + implicit val codec : Codec[TrainingZoneMessage] = ( + ("unk1" | uint8L) :: + ("unk2" | uint8L) :: + ("unk3" | uint8L) :: + ("unk4" | uint8L) + ).as[TrainingZoneMessage] +}