diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-08 19:24:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-08 19:24:29 +0300 |
commit | 8685a2564a96c6819fc0854891293747232fe02a (patch) | |
tree | 4fa4a1781d7f7a6a20fd658e3b7978d858c24b56 /src | |
parent | 53ccb4e767914782172c09ead9076f9fccaa5253 (diff) | |
download | manaverse-8685a2564a96c6819fc0854891293747232fe02a.tar.gz manaverse-8685a2564a96c6819fc0854891293747232fe02a.tar.bz2 manaverse-8685a2564a96c6819fc0854891293747232fe02a.tar.xz manaverse-8685a2564a96c6819fc0854891293747232fe02a.zip |
Simplify setTempSprite in Being.
Diffstat (limited to 'src')
-rw-r--r-- | src/being/being.cpp | 20 | ||||
-rw-r--r-- | src/being/being.h | 2 |
2 files changed, 1 insertions, 21 deletions
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<unsigned int>(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, |