summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-03 22:08:39 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-03 22:08:39 +0300
commit0e84534e753a2eb4d41995048879b83156230de0 (patch)
tree77208ac8419667ded19ccaafdcd7a61302af2d2b /src/net
parent8315c94fde36046785cf86165021906a49c6d849 (diff)
downloadmv-0e84534e753a2eb4d41995048879b83156230de0.tar.gz
mv-0e84534e753a2eb4d41995048879b83156230de0.tar.bz2
mv-0e84534e753a2eb4d41995048879b83156230de0.tar.xz
mv-0e84534e753a2eb4d41995048879b83156230de0.zip
Add support for future legacy npc commands.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/npchandler.cpp8
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)