summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-21 15:46:14 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-21 15:46:14 +0300
commit5c61d7b6e04a824b9a60f25e73abd938487b2fc4 (patch)
tree73d9e751b32076a90f6277bda1eb8d6cc66d05a3
parentfbadc806e050929f44b54fc2973a28d2fdfc516c (diff)
downloadmanaverse-5c61d7b6e04a824b9a60f25e73abd938487b2fc4.tar.gz
manaverse-5c61d7b6e04a824b9a60f25e73abd938487b2fc4.tar.bz2
manaverse-5c61d7b6e04a824b9a60f25e73abd938487b2fc4.tar.xz
manaverse-5c61d7b6e04a824b9a60f25e73abd938487b2fc4.zip
Remove colorId parameter from Being::updateSprite.
-rw-r--r--src/being/being.cpp13
-rw-r--r--src/being/being.h3
-rw-r--r--src/net/ea/beingrecv.cpp5
-rw-r--r--src/net/ea/beingrecv.h3
-rw-r--r--src/net/eathena/beingrecv.cpp9
-rw-r--r--src/net/tmwa/beingrecv.cpp15
6 files changed, 17 insertions, 31 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 4e6795d70..fae5224b6 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2469,8 +2469,7 @@ void Being::updateColors()
void Being::updateSprite(const unsigned int slot,
const int id,
- const std::string &restrict color,
- const ItemColor colorId) restrict2
+ const std::string &restrict color) restrict2
{
if (!charServerHandler || slot >= charServerHandler->maxSprite())
return;
@@ -2480,11 +2479,9 @@ void Being::updateSprite(const unsigned int slot,
if (slot && mSlots[slot].spriteId == id)
return;
- setSpriteCards(slot,
+ setSpriteColor(slot,
id,
- color,
- colorId,
- mSlots[slot].cardsId);
+ color);
}
// set sprite id, reset colors, reset cards
@@ -2614,7 +2611,7 @@ void Being::unSetSprite(const unsigned int slot) restrict2
beingEquipmentWindow->updateBeing(this);
}
-// set sprite id, colors, reset cards
+// set sprite id, use color string, reset cards
void Being::setSpriteColor(const unsigned int slot,
const int id,
std::string color) restrict2
@@ -2708,7 +2705,7 @@ void Being::setSpriteColor(const unsigned int slot,
beingEquipmentWindow->updateBeing(this);
}
-// set sprite id, colors, reset cards
+// set sprite id, use color id, reset cards
void Being::setSpriteColorId(const unsigned int slot,
const int id,
ItemColor colorId) restrict2
diff --git a/src/being/being.h b/src/being/being.h
index e39baa079..62ad47ea9 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -348,8 +348,7 @@ class Being notfinal : public ActorSprite,
void updateSprite(const unsigned int slot,
const int id,
- const std::string &restrict color = "",
- const ItemColor colorId = ItemColor_one)
+ const std::string &restrict color = "")
restrict2;
void setHairColorSpriteID(const unsigned int slot,
diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp
index 10694a8e9..a32ad0ecb 100644
--- a/src/net/ea/beingrecv.cpp
+++ b/src/net/ea/beingrecv.cpp
@@ -545,12 +545,11 @@ Being *BeingRecv::createBeing(const BeingId id,
void BeingRecv::setSprite(Being *const being,
const unsigned int slot,
const int id,
- const std::string &color,
- const ItemColor colorId)
+ const std::string &color)
{
if (!being)
return;
- being->updateSprite(slot, id, color, colorId);
+ being->updateSprite(slot, id, color);
}
} // namespace Ea
diff --git a/src/net/ea/beingrecv.h b/src/net/ea/beingrecv.h
index 3ffc95367..0fe2ea234 100644
--- a/src/net/ea/beingrecv.h
+++ b/src/net/ea/beingrecv.h
@@ -56,8 +56,7 @@ namespace Ea
void setSprite(Being *const being,
const unsigned int slot,
const int id,
- const std::string &color = "",
- const ItemColor colorId = ItemColor_one);
+ const std::string &color = "");
} // namespace BeingRecv
} // namespace Ea
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index bffa9d274..fdc8ff5d6 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -467,8 +467,7 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
Ea::BeingRecv::setSprite(dstBeing,
SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ std::string());
dstBeing->setWeaponId(weapon);
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
@@ -673,8 +672,7 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
Ea::BeingRecv::setSprite(dstBeing,
SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ std::string());
dstBeing->setWeaponId(weapon);
}
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
@@ -877,8 +875,7 @@ void BeingRecv::processBeingSpawn(Net::MessageIn &msg)
Ea::BeingRecv::setSprite(dstBeing,
SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ std::string());
dstBeing->setWeaponId(weapon);
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp
index 8b073ea7d..78d40dc1d 100644
--- a/src/net/tmwa/beingrecv.cpp
+++ b/src/net/tmwa/beingrecv.cpp
@@ -315,8 +315,7 @@ void BeingRecv::processPlayerUpdate1(Net::MessageIn &msg)
// Set these after the gender, as the sprites may be gender-specific
dstBeing->updateSprite(SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ "");
dstBeing->setWeaponId(weapon);
dstBeing->updateSprite(SPRITE_FLOOR, shield);
dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
@@ -461,8 +460,7 @@ void BeingRecv::processPlayerUpdate2(Net::MessageIn &msg)
// Set these after the gender, as the sprites may be gender-specific
dstBeing->updateSprite(SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ "");
dstBeing->setWeaponId(weapon);
dstBeing->updateSprite(SPRITE_FLOOR, shield);
dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
@@ -607,8 +605,7 @@ void BeingRecv::processPlayerMove(Net::MessageIn &msg)
// Set these after the gender, as the sprites may be gender-specific
dstBeing->updateSprite(SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ "");
dstBeing->setWeaponId(weapon);
dstBeing->updateSprite(SPRITE_FLOOR, shield);
dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
@@ -861,8 +858,7 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
Ea::BeingRecv::setSprite(dstBeing,
SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ std::string());
dstBeing->setWeaponId(weapon);
Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
@@ -1078,8 +1074,7 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
Ea::BeingRecv::setSprite(dstBeing,
SPRITE_BODY,
weapon,
- "",
- ItemColor_one);
+ std::string());
dstBeing->setWeaponId(weapon);
Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}