summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-01 20:35:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-01 20:35:59 +0300
commitcd8b69ef3edafde047ad4db6f7b81afb53bb23f0 (patch)
treee3249a59e7121eb85633d5e247e03130f78e6e05 /src/net/eathena/beinghandler.cpp
parenta88beff0cb22094bd5d4558fcc6937f94480c150 (diff)
downloadmanaplus-cd8b69ef3edafde047ad4db6f7b81afb53bb23f0.tar.gz
manaplus-cd8b69ef3edafde047ad4db6f7b81afb53bb23f0.tar.bz2
manaplus-cd8b69ef3edafde047ad4db6f7b81afb53bb23f0.tar.xz
manaplus-cd8b69ef3edafde047ad4db6f7b81afb53bb23f0.zip
eathena: add packet SMSG_BEING_STAT_UPDATE_1 0x01ab.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index c92de3651..f96fdd332 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -38,6 +38,8 @@
#include "gui/windows/outfitwindow.h"
+#include "net/ea/eaprotocol.h"
+
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "net/eathena/sprite.h"
@@ -106,6 +108,7 @@ BeingHandler::BeingHandler(const bool enableSync) :
SMSG_SKILL_AUTO_CAST,
SMSG_RANKS_LIST,
SMSG_BEING_FAKE_NAME,
+ SMSG_BEING_STAT_UPDATE_1,
0
};
handledMessages = _messages;
@@ -287,6 +290,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
processBeingFakeName(msg);
break;
+ case SMSG_BEING_STAT_UPDATE_1:
+ processBeingStatUpdate1(msg);
+ break;
+
default:
break;
}
@@ -1883,4 +1890,22 @@ void BeingHandler::processBeingFakeName(Net::MessageIn &msg) const
dstBeing->setDirection(dir);
}
+void BeingHandler::processBeingStatUpdate1(Net::MessageIn &msg) const
+{
+ const int id = msg.readInt32("account id");
+ const int type = msg.readInt16("type");
+ const int value = msg.readInt32("value");
+
+ Being *const dstBeing = actorManager->findBeing(id);
+ if (!dstBeing)
+ return;
+
+ if (type != Ea::MANNER)
+ {
+ logger->log("Error: unknown being stat type: %d", type);
+ return;
+ }
+ dstBeing->setManner(value);
+}
+
} // namespace EAthena