diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-10 16:36:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-10 16:36:52 +0300 |
commit | b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90 (patch) | |
tree | 07a2236398d464bc81ed38beb2e1b675a92fcdf6 /src/logger.cpp | |
parent | 3131f766339fa58875bce8257f6127136c217a30 (diff) | |
download | ManaVerse-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.tar.gz ManaVerse-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.tar.bz2 ManaVerse-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.tar.xz ManaVerse-b3f38fd1cac82b68fb057db5cf6c6e80e0cdfd90.zip |
For unknown packet field values show packet id and field value.
Diffstat (limited to 'src/logger.cpp')
-rw-r--r-- | src/logger.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/logger.cpp b/src/logger.cpp index 5b8b7819b..71f26fe25 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -384,7 +384,23 @@ void Logger::unimplimented(const int id) return; const std::string str = strprintf("Unimplimented packet: %d (0x%x)", - id, CAST_U32(id)); + id, + CAST_U32(id)); + DebugMessageListener::distributeEvent(str); + log(str); +} + +void Logger::unimplimented(const int id, + const int id2) +{ + if (!mReportUnimplimented) + return; + + const std::string str = strprintf( + "Unimplimented field value %d for packet %d (0x%x)", + id2, + id, + CAST_U32(id)); DebugMessageListener::distributeEvent(str); log(str); } |