diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-10-14 18:40:34 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:32 +0100 |
commit | abba018da3c2c8011b1485ee8e9e5b2690659c76 (patch) | |
tree | 88642b34e91957bbb5e6f05aca4107b512b7b4f2 /src/GameState.cpp | |
parent | 2017-10-09 (diff) | |
download | AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.gz AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.bz2 AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.lz AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.xz AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.zst AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.zip |
Diffstat (limited to 'src/GameState.cpp')
-rw-r--r-- | src/GameState.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GameState.cpp b/src/GameState.cpp index 3020bde..945824f 100644 --- a/src/GameState.cpp +++ b/src/GameState.cpp @@ -113,8 +113,12 @@ void GameState::UpdatePacket(NetworkClient *nc) break; case TabCompleteCB: break; - case ChatMessageCB: + case ChatMessageCB: { + auto packet = std::static_pointer_cast<PacketChatMessageCB>(ptr); + LOG(INFO) << "Message (" << int(packet->Position) << "): " << packet->JsonData.text; + EventAgregator::PushEvent(EventType::ChatMessageReceived, ChatMessageReceivedData{ packet->JsonData,packet->Position }); break; + } case MultiBlockChange: { auto packet = std::static_pointer_cast<PacketMultiBlockChange>(ptr); world.ParseChunkData(packet); |