mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-25 06:49:07 +00:00
Create EmoteType enum for EmoteMsg
There is one field (number 16) that appears to be unknown.
This commit is contained in:
parent
2070f77443
commit
4a4f0b4466
4 changed files with 43 additions and 8 deletions
|
|
@ -2,11 +2,12 @@
|
|||
package net.psforever.packet.game
|
||||
|
||||
import net.psforever.packet.{GamePacketOpcode, Marshallable, PacketHelpers, PlanetSideGamePacket}
|
||||
import net.psforever.types.EmoteType
|
||||
import scodec.Codec
|
||||
import scodec.codecs._
|
||||
|
||||
final case class EmoteMsg(avatar_guid : PlanetSideGUID,
|
||||
emote_id : Int)
|
||||
emote : EmoteType.Value)
|
||||
extends PlanetSideGamePacket {
|
||||
type Packet = EmoteMsg
|
||||
def opcode = GamePacketOpcode.EmoteMsg
|
||||
|
|
@ -16,6 +17,6 @@ final case class EmoteMsg(avatar_guid : PlanetSideGUID,
|
|||
object EmoteMsg extends Marshallable[EmoteMsg] {
|
||||
implicit val codec : Codec[EmoteMsg] = (
|
||||
("avatar_guid" | PlanetSideGUID.codec) ::
|
||||
("emote_id" | uint8L)
|
||||
("emote" | EmoteType.codec)
|
||||
).as[EmoteMsg]
|
||||
}
|
||||
|
|
|
|||
34
common/src/main/scala/net/psforever/types/EmoteType.scala
Normal file
34
common/src/main/scala/net/psforever/types/EmoteType.scala
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) 2016 PSForever.net to present
|
||||
package net.psforever.types
|
||||
|
||||
import net.psforever.packet.PacketHelpers
|
||||
import scodec.codecs._
|
||||
|
||||
object EmoteType extends Enumeration {
|
||||
type Type = Value
|
||||
val Charge,
|
||||
Halt,
|
||||
Nod,
|
||||
Stinky,
|
||||
Wave,
|
||||
Bow,
|
||||
CabbagePatch,
|
||||
Cheer,
|
||||
ChestThump,
|
||||
Choking,
|
||||
Dunno,
|
||||
Fistup,
|
||||
Followme,
|
||||
Help,
|
||||
Laugh,
|
||||
Move,
|
||||
No, // TODO: Double check this one, doesn't seem to have an associated slash command
|
||||
Roundup,
|
||||
Salute,
|
||||
Sorry,
|
||||
Spreadout,
|
||||
Thumbsdown
|
||||
= Value
|
||||
|
||||
implicit val codec = PacketHelpers.createEnumerationCodec(this, uint8L)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue