Create EmoteType enum for EmoteMsg

There is one field (number 16) that appears to be unknown.
This commit is contained in:
tfarley 2016-07-24 00:31:31 -07:00 committed by pschord
parent 2070f77443
commit 4a4f0b4466
4 changed files with 43 additions and 8 deletions

View file

@ -266,20 +266,20 @@ class GamePacketTest extends Specification {
}
"EmoteMsg" should {
val string = hex"25 4B0004"
val string = hex"25 4B00 15"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case EmoteMsg(avatar_guid, emote_id) =>
case EmoteMsg(avatar_guid, emote) =>
avatar_guid mustEqual PlanetSideGUID(75)
emote_id mustEqual 4
emote mustEqual EmoteType.Thumbsdown
case default =>
ko
}
}
"encode" in {
val msg = EmoteMsg(PlanetSideGUID(75), 4)
val msg = EmoteMsg(PlanetSideGUID(75), EmoteType.Thumbsdown)
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string