From b55c6220a640cb2a9919261378966057357b53d4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Jun 2016 17:03:05 +0300 Subject: Remove cards parameter from Being::setTempSprite. --- src/being/being.cpp | 23 +++++++++-------------- src/being/being.h | 3 +-- 2 files changed, 10 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/being/being.cpp b/src/being/being.cpp index 1023eb1d6..a61849ebc 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2915,8 +2915,7 @@ void Being::setWeaponId(const int id) restrict2 void Being::setTempSprite(const unsigned int slot, const int id, - std::string color, - CardsList cards) restrict2 + std::string color) restrict2 { if (!charServerHandler || slot >= charServerHandler->maxSprite()) return; @@ -2927,6 +2926,8 @@ void Being::setTempSprite(const unsigned int slot, if (slot >= CAST_U32(mSlots.size())) mSlots.resize(slot + 1, BeingSlot()); + const CardsList &cards = mSlots[slot].cardsId; + // id = 0 means unequip if (id == 0) { @@ -3877,16 +3878,14 @@ void Being::recalcSpritesOrder() restrict2 { setTempSprite(remSprite, repIt->second, - remSlot.color, - remSlot.cardsId); + remSlot.color); } else { setTempSprite(remSprite, repIt->second, ItemDB::get(repIt->second) - .getDyeColorsString(mHairColor), - remSlot.cardsId); + .getDyeColorsString(mHairColor)); } updatedSprite[remSprite] = true; } @@ -3910,8 +3909,7 @@ void Being::recalcSpritesOrder() restrict2 { setTempSprite(slot2, repIt->second, - beingSlot2.color, - beingSlot2.cardsId); + beingSlot2.color); } else { @@ -3919,8 +3917,7 @@ void Being::recalcSpritesOrder() restrict2 repIt->second, ItemDB::get(repIt->second) .getDyeColorsString( - mHairColor), - beingSlot2.cardsId); + mHairColor)); } updatedSprite[slot2] = true; } @@ -4065,8 +4062,7 @@ void Being::recalcSpritesOrder() restrict2 updatedSprite[slot] = true; setTempSprite(slot, id, - beingSlot.color, - beingSlot.cardsId); + beingSlot.color); } } } @@ -4081,8 +4077,7 @@ void Being::recalcSpritesOrder() restrict2 { setTempSprite(static_cast(slot), id, - beingSlot.color, - beingSlot.cardsId); + beingSlot.color); } } } diff --git a/src/being/being.h b/src/being/being.h index af3f702c9..25246a8b1 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -341,8 +341,7 @@ class Being notfinal : public ActorSprite, void setTempSprite(const unsigned int slot, const int id, - std::string color, - CardsList cards) restrict2; + std::string color) restrict2; void updateSprite(const unsigned int slot, const int id, -- cgit v1.2.3-70-g09d2