From 403792db7d005066273bcbe138afcd1a98b3144c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 19 Sep 2014 17:07:35 +0300 Subject: In out packets allow set packet name in packets log. --- src/net/eathena/messageout.cpp | 4 ++-- src/net/eathena/messageout.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/net/eathena') 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(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) -- cgit v1.2.3-70-g09d2