summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-02 01:51:25 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-02 01:51:25 +0200
commit582428edf9e40db0d1ed7b78222562a7a5031fe4 (patch)
tree2a9f4b1303a3647e3d7bf4599e85ebd358159b4d /src/net/tmwa/beinghandler.cpp
parent218dbbd7ce5415fe8c26857f06c5907c7cc6d175 (diff)
downloadplus-582428edf9e40db0d1ed7b78222562a7a5031fe4.tar.gz
plus-582428edf9e40db0d1ed7b78222562a7a5031fe4.tar.bz2
plus-582428edf9e40db0d1ed7b78222562a7a5031fe4.tar.xz
plus-582428edf9e40db0d1ed7b78222562a7a5031fe4.zip
Add serverversion checks. And disable some advanced features in old servers.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-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 9c5c45185..0548a2715 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -631,7 +631,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
else
{ // SMSG_BEING_CHANGE_LOOKS2
id = msg.readInt16();
- id2 = msg.readInt16();
+ if (type == 2 || serverVersion > 0)
+ id2 = msg.readInt16();
+ else
+ id2 = 1;
color = "";
}
@@ -907,10 +910,18 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (!config.getBoolValue("hideShield"))
dstBeing->setSprite(SPRITE_SHIELD, shield);
//dstBeing->setSprite(SPRITE_SHOE, shoes);
- 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]);
+ if (serverVersion > 0)
+ {
+ dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom, "", colors[0]);
+ dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid, "", colors[2]);
+ dstBeing->setSprite(SPRITE_HAT, headTop, "", colors[1]);
+ }
+ else
+ {
+ dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, headBottom);
+ dstBeing->setSprite(SPRITE_TOPCLOTHES, headMid);
+ dstBeing->setSprite(SPRITE_HAT, headTop);
+ }
//dstBeing->setSprite(SPRITE_GLOVES, gloves);
//dstBeing->setSprite(SPRITE_CAPE, cape);
//dstBeing->setSprite(SPRITE_MISC1, misc1);