summaryrefslogtreecommitdiff
path: root/src/net/eathena/npchandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-08 13:36:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-08 13:36:05 +0300
commitf6be620b3f688a4ef4bb3983d9d5fe8afef7f013 (patch)
treecc9de4463215012cb330071ae9e0cbda3c3f22a2 /src/net/eathena/npchandler.cpp
parentecd14ef02d48407b33a8a32505165f99885d801a (diff)
downloadplus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.tar.gz
plus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.tar.bz2
plus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.tar.xz
plus-f6be620b3f688a4ef4bb3983d9d5fe8afef7f013.zip
Remove additional parameters from most npchandlers.
Diffstat (limited to 'src/net/eathena/npchandler.cpp')
-rw-r--r--src/net/eathena/npchandler.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index 5947c967b..e6428fc31 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -65,27 +65,22 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
switch (msg.getId())
{
case SMSG_NPC_CHOICE:
- getNpc(msg);
processNpcChoice(msg);
break;
case SMSG_NPC_MESSAGE:
- getNpc(msg);
processNpcMessage(msg);
break;
case SMSG_NPC_CLOSE:
- getNpc(msg);
processNpcClose(msg);
break;
case SMSG_NPC_NEXT:
- getNpc(msg);
processNpcNext(msg);
break;
case SMSG_NPC_INT_INPUT:
- getNpc(msg);
processNpcIntInput(msg);
break;
@@ -95,12 +90,11 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
break;
case SMSG_NPC_CUTIN:
- processNpcCutin(msg, npcId);
+ processNpcCutin(msg);
break;
case SMSG_NPC_VIEWPOINT:
- npcId = getNpc(msg);
- processNpcViewPoint(msg, npcId);
+ processNpcViewPoint(msg);
break;
default:
@@ -247,17 +241,16 @@ int NpcHandler::getNpc(Net::MessageIn &msg)
return npcId;
}
-void NpcHandler::processNpcCutin(Net::MessageIn &msg A_UNUSED,
- const int npcId A_UNUSED)
+void NpcHandler::processNpcCutin(Net::MessageIn &msg A_UNUSED)
{
msg.readString(64); // image name
msg.readUInt8(); // type
}
-void NpcHandler::processNpcViewPoint(Net::MessageIn &msg A_UNUSED,
- const int npcId A_UNUSED)
+void NpcHandler::processNpcViewPoint(Net::MessageIn &msg A_UNUSED)
{
// +++ probably need add nav point and start moving to it
+ msg.readInt32("npc id");
msg.readInt32("type"); // 0 display for 15 sec,
// 1 display until teleport,
// 2 remove