summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/npchandler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 888a3a29..9cc93df1 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -54,17 +54,20 @@ void NPCHandler::handleMessage(MessageIn &msg)
}
current_npc = static_cast< NPC * >(being);
- std::string text = msg.readString(msg.getUnreadLength());
switch (msg.getId())
{
case GPMSG_NPC_CHOICE:
- npcListDialog->parseItems(text);
+ npcListDialog->reset();
+ while (msg.getUnreadLength())
+ {
+ npcListDialog->addItem(msg.readString());
+ }
npcListDialog->setVisible(true);
break;
case GPMSG_NPC_MESSAGE:
- npcTextDialog->addText(text);
+ npcTextDialog->addText(msg.readString(msg.getUnreadLength()));
npcListDialog->setVisible(false);
npcTextDialog->setVisible(true);
break;