diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-02 01:51:25 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-02 01:51:25 +0200 |
commit | 582428edf9e40db0d1ed7b78222562a7a5031fe4 (patch) | |
tree | 2a9f4b1303a3647e3d7bf4599e85ebd358159b4d /src/net/tmwa/beinghandler.cpp | |
parent | 218dbbd7ce5415fe8c26857f06c5907c7cc6d175 (diff) | |
download | manaverse-582428edf9e40db0d1ed7b78222562a7a5031fe4.tar.gz manaverse-582428edf9e40db0d1ed7b78222562a7a5031fe4.tar.bz2 manaverse-582428edf9e40db0d1ed7b78222562a7a5031fe4.tar.xz manaverse-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.cpp | 21 |
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); |