diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-29 13:31:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-29 13:31:38 +0300 |
commit | 8caabaeaf267d617ae04f13454bb587c3dbfa427 (patch) | |
tree | 6dd735e6e7c30a2c68e4bcbcd41f405900f75e19 /src/net/eathena/beinghandler.cpp | |
parent | 15204fc913d45dc54b1b67192ab2e5c409bf8e1a (diff) | |
download | plus-8caabaeaf267d617ae04f13454bb587c3dbfa427.tar.gz plus-8caabaeaf267d617ae04f13454bb587c3dbfa427.tar.bz2 plus-8caabaeaf267d617ae04f13454bb587c3dbfa427.tar.xz plus-8caabaeaf267d617ae04f13454bb587c3dbfa427.zip |
eathena: add packet SMSG_MOB_INFO 0x0b03.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 71d7ea5b8..447e7fc4a 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -118,6 +118,7 @@ BeingHandler::BeingHandler(const bool enableSync) : SMSG_RANKS_LIST, SMSG_BEING_FAKE_NAME, SMSG_BEING_STAT_UPDATE_1, + SMSG_MOB_INFO, 0 }; handledMessages = _messages; @@ -319,6 +320,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) processBeingStatUpdate1(msg); break; + case SMSG_MOB_INFO: + processMobInfo(msg); + break; + default: break; } @@ -1965,4 +1970,16 @@ void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) BLOCK_END("BeingHandler::processBeingSelfEffect") } +void BeingHandler::processMobInfo(Net::MessageIn &msg) +{ + const int len = msg.readInt16("len"); + if (len < 12) + return; + Being *const dstBeing = actorManager->findBeing( + msg.readInt32("monster id")); + const int attackRange = msg.readInt32("range"); + if (dstBeing) + dstBeing->setAttackRange(attackRange); +} + } // namespace EAthena |