Various fixes to ChatMsg (#43)

* Add BinaryChoiceCodec

* Proper ChatMsg structuring
This commit is contained in:
tfarley 2016-07-28 19:23:38 -07:00 committed by pschord
parent 4fb13fdc57
commit fc2ef50be6
5 changed files with 61 additions and 22 deletions

View file

@ -148,13 +148,13 @@ class WorldSessionActor extends Actor with MDCContextAware {
case msg @ PlayerStateMessageUpstream(avatar_guid, pos, vel, unk1, aim_pitch, unk2, seq_time, unk3, is_crouching, unk4, unk5, unk6, unk7, unk8) =>
//log.info("PlayerState: " + msg)
case msg @ ChatMsg(messagetype, unk1, recipient, contents) =>
case msg @ ChatMsg(messagetype, has_wide_contents, recipient, contents, note_contents) =>
log.info("Chat: " + msg)
// TODO: Depending on messagetype, may need to prepend sender's name to contents with proper spacing
// TODO: Just replays the packet straight back to sender; actually needs to be routed to recipients!
sendResponse(PacketCoding.CreateGamePacket(0, ChatMsg(messagetype, unk1, recipient, contents)))
sendResponse(PacketCoding.CreateGamePacket(0, ChatMsg(messagetype, has_wide_contents, recipient, contents, note_contents)))
case msg @ ChangeFireModeMessage(item_guid, fire_mode) =>
log.info("ChangeFireMode: " + msg)