diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-08 13:36:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-08 13:36:05 +0300 |
commit | f6be620b3f688a4ef4bb3983d9d5fe8afef7f013 (patch) | |
tree | cc9de4463215012cb330071ae9e0cbda3c3f22a2 /src/net/eathena | |
parent | ecd14ef02d48407b33a8a32505165f99885d801a (diff) | |
download | plus-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')
-rw-r--r-- | src/net/eathena/npchandler.cpp | 17 | ||||
-rw-r--r-- | src/net/eathena/npchandler.h | 4 |
2 files changed, 7 insertions, 14 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 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 |