diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-16 23:35:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-16 23:35:37 +0300 |
commit | ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f (patch) | |
tree | 1017b9434f0bf905423f22b39fc683075040ac83 /src/net/eathena/beinghandler.cpp | |
parent | 37eb9896130e6606c93166d29c595480e02a785b (diff) | |
download | plus-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.tar.gz plus-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.tar.bz2 plus-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.tar.xz plus-ead2b06e3496b0cbe3a4a4c33a55c8262f02b73f.zip |
In all places try get item color from ItemColorManager.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 5c748915b..5c531e16a 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -25,6 +25,7 @@ #include "actormanager.h" #include "effectmanager.h" #include "game.h" +#include "itemcolormanager.h" #include "notifymanager.h" #include "party.h" @@ -525,7 +526,7 @@ void BeingHandler::processBeingChangeLook2(Net::MessageIn &msg) void BeingHandler::processBeingChangeLookCards(Net::MessageIn &msg) { Being *dstBeing = nullptr; - uint16_t cards[4]; + int cards[4]; if (!actorManager) { // here can be look from char server @@ -571,12 +572,13 @@ void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, const uint8_t type, const int id, const int id2, - const uint16_t *cards + const int *cards A_UNUSED) { if (dstBeing->getType() == ActorType::Player) dstBeing->setOtherTime(); + const ItemColor itemColor = ItemColorManager::getColorFromCards(cards); const std::string color; switch (type) { @@ -589,7 +591,7 @@ void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg, dstBeing->setSpriteID(SPRITE_HAIR_COLOR, id * -1); break; case 2: // LOOK_WEAPON Weapon ID in id, Shield ID in id2 - dstBeing->setSprite(SPRITE_BODY, id, "", ItemColor_one, true); + dstBeing->setSprite(SPRITE_BODY, id, "", itemColor, true); dstBeing->setSprite(SPRITE_FLOOR, id2); if (localPlayer) localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR); |