Fix chat message reads (#817)

* Fix chat message reads

* Fix teams
This commit is contained in:
David Markowitz 2022-11-04 12:28:19 -07:00 committed by GitHub
parent 8d37d9b681
commit 8880486c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -394,7 +394,7 @@ void ChatPacketHandler::HandleChatMessage(Packet* packet) {
uint8_t channel = 0; uint8_t channel = 0;
inStream.Read(channel); inStream.Read(channel);
std::string message = PacketUtils::ReadString(0x66, packet, true); std::string message = PacketUtils::ReadString(0x66, packet, true, 512);
Game::logger->Log("ChatPacketHandler", "Got a message from (%s) [%d]: %s", senderName.c_str(), channel, message.c_str()); Game::logger->Log("ChatPacketHandler", "Got a message from (%s) [%d]: %s", senderName.c_str(), channel, message.c_str());
@ -436,7 +436,7 @@ void ChatPacketHandler::HandleChatMessage(Packet* packet) {
void ChatPacketHandler::HandlePrivateChatMessage(Packet* packet) { void ChatPacketHandler::HandlePrivateChatMessage(Packet* packet) {
LWOOBJID senderID = PacketUtils::ReadPacketS64(0x08, packet); LWOOBJID senderID = PacketUtils::ReadPacketS64(0x08, packet);
std::string receiverName = PacketUtils::ReadString(0x66, packet, true); std::string receiverName = PacketUtils::ReadString(0x66, packet, true);
std::string message = PacketUtils::ReadString(0xAA, packet, true); std::string message = PacketUtils::ReadString(0xAA, packet, true, 512);
//Get the bois: //Get the bois:
auto goonA = playerContainer.GetPlayerData(senderID); auto goonA = playerContainer.GetPlayerData(senderID);