diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-19 17:07:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-19 17:07:35 +0300 |
commit | 403792db7d005066273bcbe138afcd1a98b3144c (patch) | |
tree | 81b0064f555d099c9a726faa838c7e7721f2a78d /src/net | |
parent | 2e7f792b0f5ef9fc68b90f80f4dcaad5a4cffc07 (diff) | |
download | mv-403792db7d005066273bcbe138afcd1a98b3144c.tar.gz mv-403792db7d005066273bcbe138afcd1a98b3144c.tar.bz2 mv-403792db7d005066273bcbe138afcd1a98b3144c.tar.xz mv-403792db7d005066273bcbe138afcd1a98b3144c.zip |
In out packets allow set packet name in packets log.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/messageout.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/messageout.h | 3 | ||||
-rw-r--r-- | src/net/tmwa/messageout.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/messageout.h | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/net/eathena/messageout.cpp b/src/net/eathena/messageout.cpp index f2b851ad4..e980f1254 100644 --- a/src/net/eathena/messageout.cpp +++ b/src/net/eathena/messageout.cpp @@ -38,7 +38,7 @@ namespace EAthena { -MessageOut::MessageOut(const int16_t id) : +MessageOut::MessageOut(const int16_t id, const char *const str) : Net::MessageOut(id), mNetwork(EAthena::Network::instance()) { @@ -46,7 +46,7 @@ MessageOut::MessageOut(const int16_t id) : mData = mNetwork->mOutBuffer + static_cast<size_t>(mNetwork->mOutSize); // +++ can be issue. call to virtual member - writeInt16(id, "packet id"); + writeInt16(id, str); } void MessageOut::expand(const size_t bytes) diff --git a/src/net/eathena/messageout.h b/src/net/eathena/messageout.h index 8834d44fe..810a1916d 100644 --- a/src/net/eathena/messageout.h +++ b/src/net/eathena/messageout.h @@ -43,7 +43,8 @@ class MessageOut final : public Net::MessageOut /** * Constructor. */ - explicit MessageOut(const int16_t id); + explicit MessageOut(const int16_t id, + const char *const str = "packet id"); A_DELETE_COPY(MessageOut) diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp index f1bc7dd02..8be02ce49 100644 --- a/src/net/tmwa/messageout.cpp +++ b/src/net/tmwa/messageout.cpp @@ -38,7 +38,7 @@ namespace TmwAthena { -MessageOut::MessageOut(const int16_t id) : +MessageOut::MessageOut(const int16_t id, const char *const str) : Net::MessageOut(id), mNetwork(TmwAthena::Network::instance()) { @@ -46,7 +46,7 @@ MessageOut::MessageOut(const int16_t id) : mData = mNetwork->mOutBuffer + static_cast<size_t>(mNetwork->mOutSize); // +++ can be issue. call to virtual member - writeInt16(id, "packet id"); + writeInt16(id, str); } void MessageOut::expand(const size_t bytes) diff --git a/src/net/tmwa/messageout.h b/src/net/tmwa/messageout.h index 7aba1677b..0825488d6 100644 --- a/src/net/tmwa/messageout.h +++ b/src/net/tmwa/messageout.h @@ -43,7 +43,8 @@ class MessageOut final : public Net::MessageOut /** * Constructor. */ - explicit MessageOut(const int16_t id); + explicit MessageOut(const int16_t id, + const char *const str = "packet id"); A_DELETE_COPY(MessageOut) |