summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-21 16:54:46 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-21 16:54:46 +0300
commit7fc54b6d5b3e858296747b0cdb0d1c4ddf4e35d8 (patch)
tree3d6e06849e10ae46fa3840c3af65102a6570adbe /src/being/being.cpp
parent7dbab059a3703b1afffc87eb8653a532f8796832 (diff)
downloadplus-7fc54b6d5b3e858296747b0cdb0d1c4ddf4e35d8.tar.gz
plus-7fc54b6d5b3e858296747b0cdb0d1c4ddf4e35d8.tar.bz2
plus-7fc54b6d5b3e858296747b0cdb0d1c4ddf4e35d8.tar.xz
plus-7fc54b6d5b3e858296747b0cdb0d1c4ddf4e35d8.zip
Simplify Being::setSpriteCards, remove color parameters.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 08f1acddd..1023eb1d6 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2802,11 +2802,9 @@ void Being::setSpriteColorId(const unsigned int slot,
beingEquipmentWindow->updateBeing(this);
}
-// set sprite id, colors, cards
+// set sprite id, colors from cards, cards
void Being::setSpriteCards(const unsigned int slot,
const int id,
- std::string color,
- ItemColor colorId,
CardsList cards) restrict2
{
if (!charServerHandler || slot >= charServerHandler->maxSprite())
@@ -2822,6 +2820,9 @@ void Being::setSpriteCards(const unsigned int slot,
// if (slot && mSlots[slot].spriteId == id)
// return;
+ ItemColor colorId = ItemColor_one;
+ std::string color;
+
// id = 0 means unequip
if (id == 0)
{
@@ -3061,11 +3062,9 @@ void Being::setHairStyle(const unsigned int slot,
const int id) restrict2
{
// dumpSprites();
- setSpriteCards(slot,
+ setSpriteColor(slot,
id,
- ItemDB::get(id).getDyeColorsString(mHairColor),
- ItemColor_one,
- mSlots[slot].cardsId);
+ ItemDB::get(id).getDyeColorsString(mHairColor));
// dumpSprites();
}
@@ -3077,11 +3076,9 @@ void Being::setHairColor(const unsigned int slot,
const int id = beingSlot.spriteId;
if (id != 0)
{
- setSpriteCards(slot,
+ setSpriteColor(slot,
id,
- ItemDB::get(id).getDyeColorsString(color),
- ItemColor_one,
- beingSlot.cardsId);
+ ItemDB::get(id).getDyeColorsString(color));
}
}