summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-21 15:59:43 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-21 15:59:43 +0300
commit58a6cd09e9dad44565b939599fa24c5d82011820 (patch)
tree73cd52edf76433760ecdd7b6a0cd8c377b6d73f9 /src/net/eathena
parent5c61d7b6e04a824b9a60f25e73abd938487b2fc4 (diff)
downloadManaVerse-58a6cd09e9dad44565b939599fa24c5d82011820.tar.gz
ManaVerse-58a6cd09e9dad44565b939599fa24c5d82011820.tar.bz2
ManaVerse-58a6cd09e9dad44565b939599fa24c5d82011820.tar.xz
ManaVerse-58a6cd09e9dad44565b939599fa24c5d82011820.zip
Remove function BeingRecv::setSprite
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/beingrecv.cpp67
1 files changed, 24 insertions, 43 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index fdc8ff5d6..ba0ad46d0 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -447,27 +447,22 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
// Set these after the gender, as the sprites may be gender-specific
if (hairStyle == 0)
{
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_HAIR_COLOR,
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR,
0,
std::string());
}
else
{
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_HAIR_COLOR,
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR,
hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
}
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_WEAPON, headBottom);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_HEAD_BOTTOM, headMid);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_CLOTHES_COLOR, headTop);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_HAIR, shoes);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_SHOES, gloves);
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_BODY,
- weapon,
- std::string());
+ 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->setWeaponId(weapon);
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
@@ -650,29 +645,22 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
// Set these after the gender, as the sprites may be gender-specific
if (hairStyle == 0)
{
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_HAIR_COLOR,
- 0,
- std::string());
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0);
}
else
{
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_HAIR_COLOR,
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR,
hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
}
if (!serverFeatures->haveMove3())
{
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_WEAPON, headBottom);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_HEAD_BOTTOM, headMid);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_CLOTHES_COLOR, headTop);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_HAIR, shoes);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_SHOES, gloves);
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_BODY,
- weapon,
- std::string());
+ 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->setWeaponId(weapon);
}
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
@@ -855,27 +843,20 @@ void BeingRecv::processBeingSpawn(Net::MessageIn &msg)
// Set these after the gender, as the sprites may be gender-specific
if (hairStyle == 0)
{
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_HAIR_COLOR,
- 0,
- std::string());
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR, 0);
}
else
{
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_HAIR_COLOR,
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR,
hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
}
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_WEAPON, headBottom);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_HEAD_BOTTOM, headMid);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_CLOTHES_COLOR, headTop);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_HAIR, shoes);
- Ea::BeingRecv::setSprite(dstBeing, SPRITE_SHOES, gloves);
- Ea::BeingRecv::setSprite(dstBeing,
- SPRITE_BODY,
- weapon,
- std::string());
+ 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->setWeaponId(weapon);
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}