summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-01 03:50:27 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-01 03:50:27 +0200
commit98d5d99550b7f4c76da6a7ac2b8a21c8ba6cfa62 (patch)
tree2aff9932061f2c7d93cdfde31e95731d7812aba0 /src
parent1373ea47dc7d6a2afd1ce118d5f9e307326beb02 (diff)
downloadmv-98d5d99550b7f4c76da6a7ac2b8a21c8ba6cfa62.tar.gz
mv-98d5d99550b7f4c76da6a7ac2b8a21c8ba6cfa62.tar.bz2
mv-98d5d99550b7f4c76da6a7ac2b8a21c8ba6cfa62.tar.xz
mv-98d5d99550b7f4c76da6a7ac2b8a21c8ba6cfa62.zip
Add support for reading colors in moveing players packets.
Diffstat (limited to 'src')
-rw-r--r--src/net/tmwa/beinghandler.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 15792cf3a..9c5c45185 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -167,6 +167,7 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
Being *srcBeing, *dstBeing;
int hairStyle, hairColor, flag;
int hp, maxHP, oldHP;
+ unsigned char colors[9];
switch (msg.getId())
{
@@ -876,8 +877,17 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
headTop = msg.readInt16();
headMid = msg.readInt16();
hairColor = msg.readInt16();
- shoes = msg.readInt16();
- gloves = msg.readInt16(); //sd->head_dir
+
+ colors[0] = msg.readInt8();
+ colors[1] = msg.readInt8();
+ colors[2] = msg.readInt8();
+ logger->log("msg: %x", msg.getId());
+ logger->log("colors: %d, %d, %d", colors[0], colors[1], colors[2]);
+
+ msg.readInt8(); //unused
+// shoes = msg.readInt16();
+// gloves = msg.readInt16(); //sd->head_dir
+
guild = msg.readInt32(); // guild
if (guild == 0)
@@ -897,9 +907,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (!config.getBoolValue("hideShield"))
dstBeing->setSprite(SPRITE_SHIELD, shield);
//dstBeing->setSprite(SPRITE_SHOE, shoes);
- dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom);
- dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid);
- dstBeing->setSprite(SPRITE_HAT, headTop);
+ logger->log("bmt: %d, %d, %d", colors[0], colors[2], colors[1]);
+ dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom, "", colors[0]);
+ dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid, "", colors[2]);
+ dstBeing->setSprite(SPRITE_HAT, headTop, "", colors[1]);
//dstBeing->setSprite(SPRITE_GLOVES, gloves);
//dstBeing->setSprite(SPRITE_CAPE, cape);
//dstBeing->setSprite(SPRITE_MISC1, misc1);