summaryrefslogtreecommitdiff
path: root/src/net/eathena/npchandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/npchandler.cpp')
-rw-r--r--src/net/eathena/npchandler.cpp19
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