diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-03 22:08:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-03 22:08:39 +0300 |
commit | 0e84534e753a2eb4d41995048879b83156230de0 (patch) | |
tree | 77208ac8419667ded19ccaafdcd7a61302af2d2b | |
parent | 8315c94fde36046785cf86165021906a49c6d849 (diff) | |
download | manaverse-0e84534e753a2eb4d41995048879b83156230de0.tar.gz manaverse-0e84534e753a2eb4d41995048879b83156230de0.tar.bz2 manaverse-0e84534e753a2eb4d41995048879b83156230de0.tar.xz manaverse-0e84534e753a2eb4d41995048879b83156230de0.zip |
Add support for future legacy npc commands.
-rw-r--r-- | src/net/ea/npchandler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp index 93bc990f5..427415f51 100644 --- a/src/net/ea/npchandler.cpp +++ b/src/net/ea/npchandler.cpp @@ -76,10 +76,12 @@ void NpcHandler::processNpcChoice(Net::MessageIn &msg) void NpcHandler::processNpcMessage(Net::MessageIn &msg) { + const std::string message = msg.readString(msg.getLength() - 8); + // ignore future legacy npc commands. + if (message.size() > 3 && message.substr(0, 3) == "###") + return; if (mDialog) - mDialog->addText(msg.readString(msg.getLength() - 8)); - else - msg.readString(msg.getLength() - 8); + mDialog->addText(message); } void NpcHandler::processNpcClose(Net::MessageIn &msg A_UNUSED) |