From 0e84534e753a2eb4d41995048879b83156230de0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 3 Jun 2013 22:08:39 +0300 Subject: Add support for future legacy npc commands. --- src/net/ea/npchandler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/net') 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) -- cgit v1.2.3-70-g09d2