summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-21 15:27:11 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-21 15:27:11 +0300
commitfbadc806e050929f44b54fc2973a28d2fdfc516c (patch)
treeb233a68db2a42025cc68934cd0f71ca21120c581 /src/net/tmwa
parent3d524b386e3dd6d89d481749cd0015bff247a703 (diff)
downloadmv-fbadc806e050929f44b54fc2973a28d2fdfc516c.tar.gz
mv-fbadc806e050929f44b54fc2973a28d2fdfc516c.tar.bz2
mv-fbadc806e050929f44b54fc2973a28d2fdfc516c.tar.xz
mv-fbadc806e050929f44b54fc2973a28d2fdfc516c.zip
In Being split setSprite into setSpriteColor and setSpriteColorId.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beingrecv.cpp73
-rw-r--r--src/net/tmwa/charserverrecv.cpp11
2 files changed, 28 insertions, 56 deletions
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp
index 2ece0e993..8b073ea7d 100644
--- a/src/net/tmwa/beingrecv.cpp
+++ b/src/net/tmwa/beingrecv.cpp
@@ -127,7 +127,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
if (dstBeing->getType() == ActorType::Player)
dstBeing->setOtherTime();
- const std::string color;
switch (type)
{
case 0: // change race
@@ -143,34 +142,26 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
break;
}
case 2: // Weapon ID in id, Shield ID in id2
- dstBeing->setSprite(SPRITE_BODY,
- id,
- "",
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_BODY,
+ id);
dstBeing->setWeaponId(id);
dstBeing->setSpriteId(SPRITE_FLOOR,
id2);
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 3: // Change lower headgear for eAthena, pants for us
- dstBeing->setSprite(SPRITE_WEAPON,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_WEAPON,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_WEAPON);
break;
case 4: // Change upper headgear for eAthena, hat for us
- dstBeing->setSprite(SPRITE_CLOTHES_COLOR,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_CLOTHES_COLOR,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_CLOTHES_COLOR);
break;
case 5: // Change middle headgear for eathena, armor for us
- dstBeing->setSprite(SPRITE_HEAD_BOTTOM,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_HEAD_BOTTOM,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
break;
case 6: // eAthena LOOK_HAIR_COLOR
@@ -181,59 +172,43 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
// ignoring it
break;
case 8: // eAthena LOOK_SHIELD
- dstBeing->setSprite(SPRITE_FLOOR,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_FLOOR,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 9: // eAthena LOOK_SHOES
- dstBeing->setSprite(SPRITE_HAIR,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_HAIR,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR);
break;
case 10: // LOOK_GLOVES
- dstBeing->setSprite(SPRITE_SHOES,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_SHOES,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES);
break;
case 11: // LOOK_CAPE
- dstBeing->setSprite(SPRITE_SHIELD,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_SHIELD,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
break;
case 12:
- dstBeing->setSprite(SPRITE_HEAD_TOP,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_HEAD_TOP,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_TOP);
break;
case 13:
- dstBeing->setSprite(SPRITE_HEAD_MID,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_HEAD_MID,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_MID);
break;
case 14:
- dstBeing->setSprite(SPRITE_ROBE,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_ROBE,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_ROBE);
break;
case 15:
- dstBeing->setSprite(SPRITE_EVOL2,
- id,
- color,
- ItemColor_one);
+ dstBeing->setSpriteId(SPRITE_EVOL2,
+ id);
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL2);
break;
case 16:
diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp
index 242e3e489..e54b092e0 100644
--- a/src/net/tmwa/charserverrecv.cpp
+++ b/src/net/tmwa/charserverrecv.cpp
@@ -104,10 +104,8 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
const uint16_t look = msg.readUInt8("look");
tempPlayer->setSubtype(fromInt(race, BeingTypeId), look);
const uint16_t weapon = msg.readInt16("weapon");
- tempPlayer->setSprite(SPRITE_BODY,
- weapon,
- "",
- ItemColor_one);
+ tempPlayer->setSpriteId(SPRITE_BODY,
+ weapon);
tempPlayer->setWeaponId(weapon);
data.mAttributes[Attributes::LEVEL] = msg.readInt16("level");
@@ -128,10 +126,9 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
}
else
{
- tempPlayer->setSprite(SPRITE_HAIR_COLOR,
+ tempPlayer->setSpriteColor(SPRITE_HAIR_COLOR,
hairStyle * -1,
- ItemDB::get(-hairStyle).getDyeColorsString(hairColor),
- ItemColor_one);
+ ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
}
tempPlayer->setHairColor(hairColor);