summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-29 13:31:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-29 13:31:38 +0300
commit8caabaeaf267d617ae04f13454bb587c3dbfa427 (patch)
tree6dd735e6e7c30a2c68e4bcbcd41f405900f75e19
parent15204fc913d45dc54b1b67192ab2e5c409bf8e1a (diff)
downloadplus-8caabaeaf267d617ae04f13454bb587c3dbfa427.tar.gz
plus-8caabaeaf267d617ae04f13454bb587c3dbfa427.tar.bz2
plus-8caabaeaf267d617ae04f13454bb587c3dbfa427.tar.xz
plus-8caabaeaf267d617ae04f13454bb587c3dbfa427.zip
eathena: add packet SMSG_MOB_INFO 0x0b03.
-rw-r--r--src/net/eathena/beinghandler.cpp17
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h3
4 files changed, 23 insertions, 1 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
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index cafe2457f..cb5c5d6a4 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -124,6 +124,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
static void processPlaterStatusChange2(Net::MessageIn &msg);
static void processBeingSelfEffect(Net::MessageIn &msg);
+
+ static void processMobInfo(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 5e71c7304..69b0239be 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -279,7 +279,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// #0x0B00
- 16, -1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 16, -1, 10, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index b101e273a..469cdb77c 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -307,8 +307,11 @@
#define SMSG_ELEMENTAL_INFO 0x081d
#define SMSG_UPDATE_HOST 0x0063
+
#define SMSG_MAP_MASK 0x0b02
+#define SMSG_MOB_INFO 0x0b03
+
/**********************************
* Packets from client to server *
**********************************/