diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-20 23:48:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-20 23:48:46 +0300 |
commit | 68581ace3255ea4d8b0f0e5b33a33633a27b8e42 (patch) | |
tree | 498fbea8f60078e71b60cfb2dfec012563ca7aad /src/net/eathena/npchandler.cpp | |
parent | 7a618aa66e0b5b7df3bccd1bf1df908f1b421629 (diff) | |
download | ManaVerse-68581ace3255ea4d8b0f0e5b33a33633a27b8e42.tar.gz ManaVerse-68581ace3255ea4d8b0f0e5b33a33633a27b8e42.tar.bz2 ManaVerse-68581ace3255ea4d8b0f0e5b33a33633a27b8e42.tar.xz ManaVerse-68581ace3255ea4d8b0f0e5b33a33633a27b8e42.zip |
eathena: add packet SMSG_NPC_AREA 0x0b0b
Change protocol version to 5.
Diffstat (limited to 'src/net/eathena/npchandler.cpp')
-rw-r--r-- | src/net/eathena/npchandler.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 0bb2e2587..e797c0477 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -22,6 +22,8 @@ #include "net/eathena/npchandler.h" +#include "actormanager.h" + #include "being/localplayer.h" #include "gui/windows/npcdialog.h" @@ -56,6 +58,7 @@ NpcHandler::NpcHandler() : SMSG_NPC_CLOSE_TIMEOUT, SMSG_NPC_COMMAND, SMSG_NPC_CHANGETITLE, + SMSG_NPC_AREA, 0 }; handledMessages = _messages; @@ -114,6 +117,10 @@ void NpcHandler::handleMessage(Net::MessageIn &msg) processChangeTitle(msg); break; + case SMSG_NPC_AREA: + processArea(msg); + break; + default: break; } @@ -351,4 +358,16 @@ void NpcHandler::processNpcCloseTimeout(Net::MessageIn &msg) msg.readInt32("npc id"); } +void NpcHandler::processArea(Net::MessageIn &msg) +{ + const int len = msg.readInt16("len"); + if (len < 12) + return; + Being *const dstBeing = actorManager->findBeing( + msg.readInt32("npc id")); + const int area = msg.readInt32("area size"); + if (dstBeing) + dstBeing->setAreaSize(area); +} + } // namespace EAthena |