From f6be620b3f688a4ef4bb3983d9d5fe8afef7f013 Mon Sep 17 00:00:00 2001 From: Andrei Karas <akaras@inbox.ru> Date: Mon, 8 Sep 2014 13:36:05 +0300 Subject: Remove additional parameters from most npchandlers. --- src/net/eathena/npchandler.cpp | 17 +++++------------ src/net/eathena/npchandler.h | 4 ++-- 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'src/net/eathena') 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 diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h index 68f64e072..eadba2a13 100644 --- a/src/net/eathena/npchandler.h +++ b/src/net/eathena/npchandler.h @@ -67,9 +67,9 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler int getNpc(Net::MessageIn &msg) override final; - static void processNpcCutin(Net::MessageIn &msg, const int npcId); + static void processNpcCutin(Net::MessageIn &msg); - static void processNpcViewPoint(Net::MessageIn &msg, const int npcId); + static void processNpcViewPoint(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-70-g09d2