mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-04-20 03:15:19 +00:00
Merge pull request #138 from Fate-JH/targeting-request
Packet: TargetingImplantRequestMessage
This commit is contained in:
commit
9a1c1338e4
4 changed files with 156 additions and 1 deletions
|
|
@ -533,7 +533,7 @@ object GamePacketOpcode extends Enumeration {
|
|||
case 0xb2 => game.VoiceHostInfo.decode
|
||||
case 0xb3 => game.BattleplanMessage.decode
|
||||
case 0xb4 => game.BattleExperienceMessage.decode
|
||||
case 0xb5 => noDecoder(TargetingImplantRequest)
|
||||
case 0xb5 => game.TargetingImplantRequest.decode
|
||||
case 0xb6 => game.ZonePopulationUpdateMessage.decode
|
||||
case 0xb7 => game.DisconnectMessage.decode
|
||||
// 0xb8
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package net.psforever.packet.game
|
||||
|
||||
import net.psforever.packet.{GamePacketOpcode, Marshallable, PlanetSideGamePacket}
|
||||
import scodec.Codec
|
||||
import scodec.codecs._
|
||||
|
||||
/**
|
||||
* An entry regarding a specific target.
|
||||
* @param target_guid the target
|
||||
* @param unk na
|
||||
*/
|
||||
final case class TargetRequest(target_guid : PlanetSideGUID,
|
||||
unk : Boolean)
|
||||
|
||||
/**
|
||||
* Dispatched by the client when the advanced targeting implant activates to collect status information from the server.<br>
|
||||
* <br>
|
||||
* This packet is answered by a `TargetingInfoMessage` with `List` entries of thed corresponding UIDs.
|
||||
* @param target_list a `List` of targets
|
||||
*/
|
||||
final case class TargetingImplantRequest(target_list : List[TargetRequest])
|
||||
extends PlanetSideGamePacket {
|
||||
type Packet = TargetingImplantRequest
|
||||
def opcode = GamePacketOpcode.TargetingImplantRequest
|
||||
def encode = TargetingImplantRequest.encode(this)
|
||||
}
|
||||
|
||||
object TargetingImplantRequest extends Marshallable[TargetingImplantRequest] {
|
||||
private val request_codec : Codec[TargetRequest] = (
|
||||
("target_guid" | PlanetSideGUID.codec) ::
|
||||
("unk" | bool)
|
||||
).as[TargetRequest]
|
||||
|
||||
implicit val codec : Codec[TargetingImplantRequest] = ("target_list" | listOfN(intL(6), request_codec)).as[TargetingImplantRequest]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue