diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-17 00:00:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-17 00:00:03 +0300 |
commit | 8067031cfe41e43b911e7e0af28c88ae4edddcbf (patch) | |
tree | 889b797b30767bdb11705232a72a0b9b8a60279e | |
parent | fb39de93ed747453b71dec6b1c996f20da8ff609 (diff) | |
download | manaverse-8067031cfe41e43b911e7e0af28c88ae4edddcbf.tar.gz manaverse-8067031cfe41e43b911e7e0af28c88ae4edddcbf.tar.bz2 manaverse-8067031cfe41e43b911e7e0af28c88ae4edddcbf.tar.xz manaverse-8067031cfe41e43b911e7e0af28c88ae4edddcbf.zip |
Remove default parameter from Being::updateSprite.
-rw-r--r-- | src/being/being.h | 2 | ||||
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 48 | ||||
-rw-r--r-- | src/net/tmwa/beingrecv.cpp | 62 |
3 files changed, 68 insertions, 44 deletions
diff --git a/src/being/being.h b/src/being/being.h index 23b7bc1e4..850c171ce 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -355,7 +355,7 @@ class Being notfinal : public ActorSprite, void updateSprite(const unsigned int slot, const int id, - const std::string &restrict color = "") + const std::string &restrict color) restrict2; void setHairColorSpriteID(const unsigned int slot, diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 2e3080989..ff67669d4 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -117,12 +117,24 @@ static void setBasicFields(Being *restrict const dstBeing, } if (updateSlots) { - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - dstBeing->updateSprite(SPRITE_HAIR, shoes); - dstBeing->updateSprite(SPRITE_SHOES, gloves); - dstBeing->updateSprite(SPRITE_BODY, weapon); + dstBeing->updateSprite(SPRITE_WEAPON, + headBottom, + std::string()); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, + headMid, + std::string()); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, + headTop, + std::string()); + dstBeing->updateSprite(SPRITE_HAIR, + shoes, + std::string()); + dstBeing->updateSprite(SPRITE_SHOES, + gloves, + std::string()); + dstBeing->updateSprite(SPRITE_BODY, + weapon, + std::string()); dstBeing->setWeaponId(weapon); } break; @@ -137,12 +149,24 @@ static void setBasicFields(Being *restrict const dstBeing, dstBeing->setHairStyle(SPRITE_HAIR_COLOR, -hairStyle); // for npc not checking updateSlots flag, // probably because npc missing visible packet if moving - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - dstBeing->updateSprite(SPRITE_HAIR, shoes); - dstBeing->updateSprite(SPRITE_SHOES, gloves); - dstBeing->updateSprite(SPRITE_BODY, weapon); + dstBeing->updateSprite(SPRITE_WEAPON, + headBottom, + std::string()); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, + headMid, + std::string()); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, + headTop, + std::string()); + dstBeing->updateSprite(SPRITE_HAIR, + shoes, + std::string()); + dstBeing->updateSprite(SPRITE_SHOES, + gloves, + std::string()); + dstBeing->updateSprite(SPRITE_BODY, + weapon, + std::string()); dstBeing->setWeaponId(weapon); } break; diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp index bb165789d..b4e1df298 100644 --- a/src/net/tmwa/beingrecv.cpp +++ b/src/net/tmwa/beingrecv.cpp @@ -343,12 +343,12 @@ void BeingRecv::processPlayerUpdate1(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific dstBeing->updateSprite(SPRITE_BODY, weapon, - ""); + std::string()); dstBeing->setWeaponId(weapon); - dstBeing->updateSprite(SPRITE_FLOOR, shield); - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); + dstBeing->updateSprite(SPRITE_FLOOR, shield, std::string()); + dstBeing->updateSprite(SPRITE_WEAPON, headBottom, std::string()); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, std::string()); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, std::string()); if (hairStyle == 0) { dstBeing->updateSprite(SPRITE_HAIR_COLOR, @@ -487,12 +487,12 @@ void BeingRecv::processPlayerUpdate2(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific dstBeing->updateSprite(SPRITE_BODY, weapon, - ""); + std::string()); dstBeing->setWeaponId(weapon); - dstBeing->updateSprite(SPRITE_FLOOR, shield); - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); + dstBeing->updateSprite(SPRITE_FLOOR, shield, std::string()); + dstBeing->updateSprite(SPRITE_WEAPON, headBottom, std::string()); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, std::string()); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, std::string()); if (hairStyle == 0) { dstBeing->updateSprite(SPRITE_HAIR_COLOR, @@ -631,12 +631,12 @@ void BeingRecv::processPlayerMove(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific dstBeing->updateSprite(SPRITE_BODY, weapon, - ""); + std::string()); dstBeing->setWeaponId(weapon); - dstBeing->updateSprite(SPRITE_FLOOR, shield); - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); + dstBeing->updateSprite(SPRITE_FLOOR, shield, std::string()); + dstBeing->updateSprite(SPRITE_WEAPON, headBottom, std::string()); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, std::string()); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, std::string()); if (hairStyle == 0) { dstBeing->updateSprite(SPRITE_HAIR_COLOR, @@ -862,7 +862,7 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific if (hairStyle == 0) { - dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0); + dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0, std::string()); } else { @@ -871,14 +871,14 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg) ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); } dstBeing->setHairColor(hairColor); - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - dstBeing->updateSprite(SPRITE_HAIR, shoes); - dstBeing->updateSprite(SPRITE_SHOES, gloves); - dstBeing->updateSprite(SPRITE_BODY, weapon); + dstBeing->updateSprite(SPRITE_WEAPON, headBottom, std::string()); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, std::string()); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, std::string()); + dstBeing->updateSprite(SPRITE_HAIR, shoes, std::string()); + dstBeing->updateSprite(SPRITE_SHOES, gloves, std::string()); + dstBeing->updateSprite(SPRITE_BODY, weapon, std::string()); dstBeing->setWeaponId(weapon); - dstBeing->updateSprite(SPRITE_FLOOR, shield); + dstBeing->updateSprite(SPRITE_FLOOR, shield, std::string()); } else if (dstBeing->getType() == ActorType::Npc && serverFeatures->haveNpcGender()) @@ -1071,7 +1071,7 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg) // Set these after the gender, as the sprites may be gender-specific if (hairStyle == 0) { - dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0); + dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0, std::string()); } else { @@ -1080,14 +1080,14 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg) ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); } dstBeing->setHairColor(hairColor); - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - dstBeing->updateSprite(SPRITE_HAIR, shoes); - dstBeing->updateSprite(SPRITE_SHOES, gloves); - dstBeing->updateSprite(SPRITE_BODY, weapon); + dstBeing->updateSprite(SPRITE_WEAPON, headBottom, std::string()); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, std::string()); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, std::string()); + dstBeing->updateSprite(SPRITE_HAIR, shoes, std::string()); + dstBeing->updateSprite(SPRITE_SHOES, gloves, std::string()); + dstBeing->updateSprite(SPRITE_BODY, weapon, std::string()); dstBeing->setWeaponId(weapon); - dstBeing->updateSprite(SPRITE_FLOOR, shield); + dstBeing->updateSprite(SPRITE_FLOOR, shield, std::string()); } else if (dstBeing->getType() == ActorType::Npc && serverFeatures->haveNpcGender()) |