summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-21 18:06:28 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-21 18:06:28 +0300
commitae351c43eca44c532404deb9f10bf3e4b97406bf (patch)
tree32a8380404183b1938981c3020c13e09f57291b0
parentc04cc2c9270b5a54fae239d0ae60356113bdf70b (diff)
downloadplus-ae351c43eca44c532404deb9f10bf3e4b97406bf.tar.gz
plus-ae351c43eca44c532404deb9f10bf3e4b97406bf.tar.bz2
plus-ae351c43eca44c532404deb9f10bf3e4b97406bf.tar.xz
plus-ae351c43eca44c532404deb9f10bf3e4b97406bf.zip
Imrove Being::setTempSprite.
-rw-r--r--src/being/being.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index c5c68068d..618922fa3 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2944,17 +2944,16 @@ void Being::setTempSprite(const unsigned int slot,
mGender, mSubType);
int lastTime = 0;
int startTime = 0;
- const CardsList &cards = beingSlot.cardsId;
- std::string color = beingSlot.color;
AnimatedSprite *restrict equipmentSprite = nullptr;
- ItemColor colorId = ItemColor_one;
- if (!cards.isEmpty())
- colorId = ItemColorManager::getColorFromCards(cards);
-
if (!filename.empty())
{
+ ItemColor colorId = ItemColor_one;
+ const CardsList &cards = beingSlot.cardsId;
+ if (!cards.isEmpty())
+ colorId = ItemColorManager::getColorFromCards(cards);
+ std::string color = beingSlot.color;
if (color.empty())
color = info.getDyeColorsString(colorId);