diff options
Diffstat (limited to 'src/net/tmwa/chathandler.cpp')
-rw-r--r-- | src/net/tmwa/chathandler.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 165d91422..dc0ecbab2 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -107,13 +107,17 @@ void ChatHandler::sendRaw(const std::string &args) const if (pos != std::string::npos) { str = line.substr(0, pos); - outMsg = new MessageOut(static_cast<int16_t>(parseNumber(str))); + const int16_t id = static_cast<int16_t>(parseNumber(str)); + outMsg = new MessageOut(id); + outMsg->writeInt16(id, "packet id"); line = line.substr(pos + 1); pos = line.find(" "); } else { - outMsg = new MessageOut(static_cast<int16_t>(parseNumber(line))); + const int16_t id = static_cast<int16_t>(parseNumber(line)); + outMsg = new MessageOut(id); + outMsg->writeInt16(id, "packet id"); delete outMsg; return; } |