summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-08 19:24:29 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-08 19:24:29 +0300
commit8685a2564a96c6819fc0854891293747232fe02a (patch)
tree4fa4a1781d7f7a6a20fd658e3b7978d858c24b56 /src/being/being.cpp
parent53ccb4e767914782172c09ead9076f9fccaa5253 (diff)
downloadmv-8685a2564a96c6819fc0854891293747232fe02a.tar.gz
mv-8685a2564a96c6819fc0854891293747232fe02a.tar.bz2
mv-8685a2564a96c6819fc0854891293747232fe02a.tar.xz
mv-8685a2564a96c6819fc0854891293747232fe02a.zip
Simplify setTempSprite in Being.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp20
1 files changed, 1 insertions, 19 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);
}
}