summaryrefslogtreecommitdiff
path: root/src/net/tmwa/npchandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-19 15:15:44 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-19 15:15:44 +0300
commitf0315000bcf20685471966d2f25cd8e9f35e8230 (patch)
treeb5b51e2880191696d6217181d5aa4d5c5341265f /src/net/tmwa/npchandler.cpp
parent5615f8dde421e8d44c5e49a5a44ab7e69cb543a5 (diff)
downloadmv-f0315000bcf20685471966d2f25cd8e9f35e8230.tar.gz
mv-f0315000bcf20685471966d2f25cd8e9f35e8230.tar.bz2
mv-f0315000bcf20685471966d2f25cd8e9f35e8230.tar.xz
mv-f0315000bcf20685471966d2f25cd8e9f35e8230.zip
add ability to give more than one item to npc. (evol only)
Diffstat (limited to 'src/net/tmwa/npchandler.cpp')
-rw-r--r--src/net/tmwa/npchandler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index 1356dbf8c..bb53ef33f 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -329,10 +329,14 @@ void NpcHandler::processNpcCommand(Net::MessageIn &msg, const int npcId)
mDialog->clearRows();
break;
case 10: // send selected item id
+ {
+ int invSize = msg.readInt32();
+ if (!invSize)
+ invSize = 1;
if (mDialog)
- mDialog->itemRequest();
+ mDialog->itemRequest(invSize);
break;
-
+ }
default:
logger->log("unknown npc command: %d", cmd);
break;