summaryrefslogtreecommitdiff
path: root/src/being/being.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-15 13:58:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-16 01:52:14 +0300
commit41cc92f73e39cec5dfea6b1164176610cccc7df4 (patch)
tree22fd3d388084d2c61fe80f0441c3c30ab8ffd33c /src/being/being.h
parent7aa637abc8b0bca35aacdb9492e65f557ed32038 (diff)
downloadmanaverse-41cc92f73e39cec5dfea6b1164176610cccc7df4.tar.gz
manaverse-41cc92f73e39cec5dfea6b1164176610cccc7df4.tar.bz2
manaverse-41cc92f73e39cec5dfea6b1164176610cccc7df4.tar.xz
manaverse-41cc92f73e39cec5dfea6b1164176610cccc7df4.zip
Add strong typed int for item color.
Diffstat (limited to 'src/being/being.h')
-rw-r--r--src/being/being.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/being/being.h b/src/being/being.h
index 8926e5548..7bb7def7d 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -27,6 +27,7 @@
#include "enums/gui/usercolorid.h"
+#include "enums/simpletypes/itemcolor.h"
#include "enums/simpletypes/move.h"
#include "resources/beinginfo.h"
@@ -306,13 +307,13 @@ class Being notfinal : public ActorSprite,
*/
void setSprite(const unsigned int slot, const int id,
std::string color = "",
- const unsigned char colorId = 1,
+ const ItemColor colorId = ItemColor_one,
const bool isWeapon = false,
const bool isTempSprite = false);
void updateSprite(const unsigned int slot, const int id,
std::string color = "",
- const unsigned char colorId = 1,
+ const ItemColor colorId = ItemColor_one,
const bool isWeapon = false,
const bool isTempSprite = false);
@@ -784,17 +785,17 @@ class Being notfinal : public ActorSprite,
int getSpriteID(const int slot) const A_WARN_UNUSED;
- unsigned char getSpriteColor(const int slot) const A_WARN_UNUSED;
+ ItemColor getSpriteColor(const int slot) const A_WARN_UNUSED;
void setHairStyle(const unsigned int slot, const int id);
void setHairColor(const unsigned int slot,
- const unsigned char color);
+ const ItemColor color);
- void setHairColor(const unsigned char color)
+ void setHairColor(const ItemColor color)
{ mHairColor = color; }
- unsigned char getHairColor() const A_WARN_UNUSED
+ ItemColor getHairColor() const A_WARN_UNUSED
{ return mHairColor; }
void recalcSpritesOrder();
@@ -1007,7 +1008,7 @@ class Being notfinal : public ActorSprite,
StringVect mSpriteColors;
std::vector<int> mSpriteIDs;
- std::vector<unsigned char> mSpriteColorsIds;
+ std::vector<ItemColor> mSpriteColorsIds;
SpriteParticleInfo mSpriteParticles;
// Character guild information
@@ -1139,7 +1140,7 @@ class Being notfinal : public ActorSprite,
uint16_t mTeamId;
uint16_t mLook;
uint16_t mBadgesCount;
- unsigned char mHairColor;
+ ItemColor mHairColor;
bool mErased;
bool mEnemy;
bool mGotComment;