From c9a31afec60a5085e0a3dbd26c15db397730a768 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Jun 2016 14:30:28 +0300 Subject: Add strong typed bool IsWeapon. --- src/being/being.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/being/being.cpp') diff --git a/src/being/being.cpp b/src/being/being.cpp index cec64c269..1a6e14fc4 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2468,7 +2468,7 @@ void Being::updateSprite(const unsigned int slot, const int id, const std::string &restrict color, const ItemColor colorId, - const bool isWeapon, + const IsWeapon isWeapon, const bool isTempSprite) restrict2 { if (!charServerHandler || slot >= charServerHandler->maxSprite()) @@ -2486,7 +2486,7 @@ void Being::setSprite(const unsigned int slot, const int id, std::string color, const ItemColor colorId, - const bool isWeapon, + const IsWeapon isWeapon, const bool isTempSprite) restrict2 { if (!charServerHandler || slot >= charServerHandler->maxSprite()) @@ -2514,7 +2514,7 @@ void Being::setSprite(const unsigned int slot, removeSprite(slot); mSpriteDraw[slot] = 0; - if (isWeapon) + if (isWeapon == IsWeapon_true) mEquippedWeapon = nullptr; const int id1 = mSpriteIDs[slot]; if (id1) @@ -2567,7 +2567,7 @@ void Being::setSprite(const unsigned int slot, addItemParticles(id, info.getDisplay()); - if (isWeapon) + if (isWeapon == IsWeapon_true) mEquippedWeapon = &ItemDB::get(id); setAction(mAction, 0); @@ -3376,7 +3376,7 @@ void Being::recalcSpritesOrder() restrict2 setSprite(remSprite, repIt->second, mSpriteColors[remSprite], ItemColor_one, - false, + IsWeapon_false, true); } else @@ -3385,7 +3385,7 @@ void Being::recalcSpritesOrder() restrict2 ItemDB::get(repIt->second) .getDyeColorsString(mHairColor), ItemColor_one, - false, + IsWeapon_false, true); } updatedSprite[remSprite] = true; @@ -3409,7 +3409,7 @@ void Being::recalcSpritesOrder() restrict2 setSprite(slot2, repIt->second, mSpriteColors[slot2], ItemColor_one, - false, + IsWeapon_false, true); } else @@ -3419,7 +3419,7 @@ void Being::recalcSpritesOrder() restrict2 .getDyeColorsString( mHairColor), ItemColor_one, - false, + IsWeapon_false, true); } updatedSprite[slot2] = true; @@ -3566,7 +3566,7 @@ void Being::recalcSpritesOrder() restrict2 id, mSpriteColors[slot], ItemColor_one, - false, + IsWeapon_false, true); } } @@ -3583,7 +3583,7 @@ void Being::recalcSpritesOrder() restrict2 id, mSpriteColors[slot], ItemColor_one, - false, + IsWeapon_false, true); } } -- cgit v1.2.3-60-g2f50