summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-09 14:51:14 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-09 14:51:14 +0300
commit8ac73cce3f9808c8fa48b280635104d9587c9c5a (patch)
tree8bbcce22fb3532c5ac915a3d87eecf41fc3d77bd /src/net/eathena/chathandler.cpp
parentf39df8b1de96c6d6e78d90f2f058318aa7fd998b (diff)
downloadplus-8ac73cce3f9808c8fa48b280635104d9587c9c5a.tar.gz
plus-8ac73cce3f9808c8fa48b280635104d9587c9c5a.tar.bz2
plus-8ac73cce3f9808c8fa48b280635104d9587c9c5a.tar.xz
plus-8ac73cce3f9808c8fa48b280635104d9587c9c5a.zip
Remove virtual method call from MessageOut constructor.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index c3f8bf039..da32981dd 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -106,13 +106,18 @@ 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;
}