Packet: EmoteMsg

Still need an Enum for emote messages.

* Add EmoteMsg packet

* Add EmoteMsg test

* Add EmoteMsg handler stub
This commit is contained in:
tfarley 2016-07-23 18:10:40 -07:00 committed by pschord
parent 4c4f1341be
commit 3e980bbe15
4 changed files with 47 additions and 1 deletions

View file

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