diff options
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 |