diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-06 20:49:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 20:49:52 +0300 |
commit | a80d52c7b85e3e844a0185eff53ec65b8a176bee (patch) | |
tree | dbe8f75ff7e750b36183ee3271244f42a188edfe /src | |
parent | f88429f9c991cd90bfad76b4aba93cb312aaa342 (diff) | |
download | plus-a80d52c7b85e3e844a0185eff53ec65b8a176bee.tar.gz plus-a80d52c7b85e3e844a0185eff53ec65b8a176bee.tar.bz2 plus-a80d52c7b85e3e844a0185eff53ec65b8a176bee.tar.xz plus-a80d52c7b85e3e844a0185eff53ec65b8a176bee.zip |
eathena: fix packet SMSG_NPC_VIEWPOINT 0x0144.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/npchandler.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index a15d6480e..5947c967b 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -199,17 +199,19 @@ void NpcHandler::sellItem(const int beingId A_UNUSED, int NpcHandler::getNpc(Net::MessageIn &msg) { if (msg.getId() == SMSG_NPC_CHOICE - || msg.getId() == SMSG_NPC_MESSAGE - || msg.getId() == SMSG_NPC_VIEWPOINT) + || msg.getId() == SMSG_NPC_MESSAGE) { - msg.readInt16(); // length + msg.readInt16("len"); } - const int npcId = msg.readInt32(); + const int npcId = msg.readInt32("npc id"); const NpcDialogs::const_iterator diag = NpcDialog::mNpcDialogs.find(npcId); mDialog = nullptr; + if (msg.getId() == SMSG_NPC_VIEWPOINT) + return npcId; + if (diag == NpcDialog::mNpcDialogs.end()) { // Empty dialogs don't help @@ -255,11 +257,14 @@ void NpcHandler::processNpcCutin(Net::MessageIn &msg A_UNUSED, void NpcHandler::processNpcViewPoint(Net::MessageIn &msg A_UNUSED, const int npcId A_UNUSED) { - msg.readInt32(); // type - msg.readInt32(); // x - msg.readInt32(); // y - msg.readUInt8(); // byte - msg.readInt32(); // color + // +++ probably need add nav point and start moving to it + msg.readInt32("type"); // 0 display for 15 sec, + // 1 display until teleport, + // 2 remove + msg.readInt32("x"); + msg.readInt32("y"); + msg.readUInt8("number"); // can be used for scripts + msg.readInt32("color"); } } // namespace EAthena |