diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-08 16:07:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-08 16:07:07 +0300 |
commit | 8ac687d770f3a8f13f9e0a50909b435933c86f6b (patch) | |
tree | 18d2b51363d7f731f7f8383b2bce5c6c354507fc /src/being/being.cpp | |
parent | 83b27b146211fe301f751a6aed27e22271190795 (diff) | |
download | plus-8ac687d770f3a8f13f9e0a50909b435933c86f6b.tar.gz plus-8ac687d770f3a8f13f9e0a50909b435933c86f6b.tar.bz2 plus-8ac687d770f3a8f13f9e0a50909b435933c86f6b.tar.xz plus-8ac687d770f3a8f13f9e0a50909b435933c86f6b.zip |
Add support for getting sprite color by cards in Being.
But for now mostly unused.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 3e57c969c..855a081e9 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -27,6 +27,7 @@ #include "configuration.h" #include "effectmanager.h" #include "guild.h" +#include "itemcolormanager.h" #include "party.h" #include "settings.h" #include "soundmanager.h" @@ -2486,9 +2487,10 @@ void Being::updateSprite(const unsigned int slot, void Being::setSprite(const unsigned int slot, const int id, std::string color, - const ItemColor colorId, + ItemColor colorId, const IsWeapon isWeapon, - const IsTempSprite isTempSprite) restrict2 + const IsTempSprite isTempSprite, + const int *const cards) restrict2 { if (!charServerHandler || slot >= charServerHandler->maxSprite()) return; @@ -2549,6 +2551,9 @@ void Being::setSprite(const unsigned int slot, addPet(pet); } + if (cards != nullptr) + colorId = ItemColorManager::getColorFromCards(cards); + if (!filename.empty()) { if (color.empty()) |