From f6be620b3f688a4ef4bb3983d9d5fe8afef7f013 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Sep 2014 13:36:05 +0300 Subject: Remove additional parameters from most npchandlers. --- src/net/eathena/npchandler.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/net/eathena/npchandler.cpp') 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 -- cgit v1.2.3-60-g2f50