From 8685a2564a96c6819fc0854891293747232fe02a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Jun 2016 19:24:29 +0300 Subject: Simplify setTempSprite in Being. --- src/being/being.cpp | 20 +------------------- src/being/being.h | 2 -- 2 files changed, 1 insertion(+), 21 deletions(-) (limited to 'src') diff --git a/src/being/being.cpp b/src/being/being.cpp index 79d8f975e..18535ab9e 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2607,8 +2607,6 @@ void Being::setSprite(const unsigned int slot, void Being::setTempSprite(const unsigned int slot, const int id, std::string color, - ItemColor colorId, - const IsWeapon isWeapon, const int *const cards) restrict2 { if (!charServerHandler || slot >= charServerHandler->maxSprite()) @@ -2632,8 +2630,6 @@ void Being::setTempSprite(const unsigned int slot, removeSprite(slot); mSpriteDraw[slot] = 0; - if (isWeapon == IsWeapon_true) - mEquippedWeapon = nullptr; const int id1 = mSpriteIDs[slot]; if (id1) removeItemParticles(id1); @@ -2647,6 +2643,7 @@ void Being::setTempSprite(const unsigned int slot, int startTime = 0; AnimatedSprite *restrict equipmentSprite = nullptr; + ItemColor colorId = ItemColor_one; if (cards != nullptr) colorId = ItemColorManager::getColorFromCards(cards); @@ -2672,9 +2669,6 @@ void Being::setTempSprite(const unsigned int slot, addItemParticles(id, info.getDisplay()); - if (isWeapon == IsWeapon_true) - mEquippedWeapon = &ItemDB::get(id); - setAction(mAction, 0); if (equipmentSprite) { @@ -3496,8 +3490,6 @@ void Being::recalcSpritesOrder() restrict2 setTempSprite(remSprite, repIt->second, mSpriteColors[remSprite], - ItemColor_one, - IsWeapon_false, nullptr); } else @@ -3506,8 +3498,6 @@ void Being::recalcSpritesOrder() restrict2 repIt->second, ItemDB::get(repIt->second) .getDyeColorsString(mHairColor), - ItemColor_one, - IsWeapon_false, nullptr); } updatedSprite[remSprite] = true; @@ -3531,8 +3521,6 @@ void Being::recalcSpritesOrder() restrict2 setTempSprite(slot2, repIt->second, mSpriteColors[slot2], - ItemColor_one, - IsWeapon_false, nullptr); } else @@ -3542,8 +3530,6 @@ void Being::recalcSpritesOrder() restrict2 ItemDB::get(repIt->second) .getDyeColorsString( mHairColor), - ItemColor_one, - IsWeapon_false, nullptr); } updatedSprite[slot2] = true; @@ -3689,8 +3675,6 @@ void Being::recalcSpritesOrder() restrict2 setTempSprite(slot, id, mSpriteColors[slot], - ItemColor_one, - IsWeapon_false, nullptr); } } @@ -3706,8 +3690,6 @@ void Being::recalcSpritesOrder() restrict2 setTempSprite(static_cast(slot), id, mSpriteColors[slot], - ItemColor_one, - IsWeapon_false, nullptr); } } diff --git a/src/being/being.h b/src/being/being.h index ccabeb36c..bb9951f56 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -329,8 +329,6 @@ class Being notfinal : public ActorSprite, void setTempSprite(const unsigned int slot, const int id, std::string color, - ItemColor colorId, - const IsWeapon isWeapon, const int *const cards) restrict2; void updateSprite(const unsigned int slot, -- cgit v1.2.3-70-g09d2