summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-04 11:50:47 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-04 13:07:36 +0300
commit93f7e4f666dc1e1d9bf9715307080bd9c3027109 (patch)
tree8dc36c4b2cc8ab90af9d48df825f3914500b5d5b /src/net/tmwa/beinghandler.cpp
parent565e617983d0eaa52131056cd2bc15c9e4a1bece (diff)
downloadmanaverse-93f7e4f666dc1e1d9bf9715307080bd9c3027109.tar.gz
manaverse-93f7e4f666dc1e1d9bf9715307080bd9c3027109.tar.bz2
manaverse-93f7e4f666dc1e1d9bf9715307080bd9c3027109.tar.xz
manaverse-93f7e4f666dc1e1d9bf9715307080bd9c3027109.zip
Give correct names to eathena/tmwa sprites.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index a076d4140..a74e8bee7 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -244,12 +244,12 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
void BeingHandler::undress(Being *const being) const
{
- being->setSprite(SPRITE_BOTTOMCLOTHES, 0);
- being->setSprite(SPRITE_TOPCLOTHES, 0);
- being->setSprite(SPRITE_HAT, 0);
- being->setSprite(SPRITE_SHOE, 0);
- being->setSprite(SPRITE_GLOVES, 0);
-// being->setSprite(SPRITE_WEAPON, 0, "", true);
+ being->setSprite(SPRITE_WEAPON, 0);
+ being->setSprite(SPRITE_HEAD_BOTTOM, 0);
+ being->setSprite(SPRITE_CLOTHES_COLOR, 0);
+ being->setSprite(SPRITE_HAIR, 0);
+ being->setSprite(SPRITE_SHOES, 0);
+// being->setSprite(SPRITE_BODY, 0, "", true);
}
void BeingHandler::requestRanks(const Rank::Rank rank A_UNUSED) const
@@ -335,33 +335,33 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
{
const uint8_t look = static_cast<uint8_t>(id / 256);
const int hair = id % 256;
- dstBeing->setHairStyle(SPRITE_HAIR, hair * -1);
+ dstBeing->setHairStyle(SPRITE_HAIR_COLOR, hair * -1);
dstBeing->setLook(look);
break;
}
case 2: // Weapon ID in id, Shield ID in id2
- dstBeing->setSprite(SPRITE_WEAPON, id, "", 1, true);
+ dstBeing->setSprite(SPRITE_BODY, id, "", 1, true);
if (!mHideShield)
- dstBeing->setSprite(SPRITE_SHIELD, id2);
- localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
+ dstBeing->setSprite(SPRITE_FLOOR, id2);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 3: // Change lower headgear for eAthena, pants for us
- dstBeing->setSprite(SPRITE_BOTTOMCLOTHES, id, color,
+ dstBeing->setSprite(SPRITE_WEAPON, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_BOTTOMCLOTHES);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_WEAPON);
break;
case 4: // Change upper headgear for eAthena, hat for us
- dstBeing->setSprite(SPRITE_HAT, id, color,
+ dstBeing->setSprite(SPRITE_CLOTHES_COLOR, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_HAT);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_CLOTHES_COLOR);
break;
case 5: // Change middle headgear for eathena, armor for us
- dstBeing->setSprite(SPRITE_TOPCLOTHES, id, color,
+ dstBeing->setSprite(SPRITE_HEAD_BOTTOM, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_TOPCLOTHES);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
break;
case 6: // eAthena LOOK_HAIR_COLOR
- dstBeing->setHairColor(SPRITE_HAIR, static_cast<uint8_t>(id));
+ dstBeing->setHairColor(SPRITE_HAIR_COLOR, static_cast<uint8_t>(id));
break;
case 7: // Clothes color
// ignoring it
@@ -369,40 +369,40 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing,
case 8: // eAthena LOOK_SHIELD
if (!mHideShield)
{
- dstBeing->setSprite(SPRITE_SHIELD, id, color,
+ dstBeing->setSprite(SPRITE_FLOOR, id, color,
static_cast<unsigned char>(id2));
}
- localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 9: // eAthena LOOK_SHOES
- dstBeing->setSprite(SPRITE_SHOE, id, color,
+ dstBeing->setSprite(SPRITE_HAIR, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_SHOE);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR);
break;
case 10: // LOOK_GLOVES
- dstBeing->setSprite(SPRITE_GLOVES, id, color,
+ dstBeing->setSprite(SPRITE_SHOES, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_GLOVES);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES);
break;
case 11: // LOOK_CAPE
- dstBeing->setSprite(SPRITE_CAPE, id, color,
+ dstBeing->setSprite(SPRITE_SHIELD, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_CAPE);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
break;
case 12:
- dstBeing->setSprite(SPRITE_MISC1, id, color,
+ dstBeing->setSprite(SPRITE_HEAD_TOP, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_MISC1);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_TOP);
break;
case 13:
- dstBeing->setSprite(SPRITE_MISC2, id, color,
+ dstBeing->setSprite(SPRITE_HEAD_MID, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_MISC2);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_MID);
break;
case 14:
- dstBeing->setSprite(SPRITE_EVOL1, id, color,
+ dstBeing->setSprite(SPRITE_ROBE, id, color,
static_cast<unsigned char>(id2));
- localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL1);
+ localPlayer->imitateOutfit(dstBeing, SPRITE_ROBE);
break;
case 15:
dstBeing->setSprite(SPRITE_EVOL2, id, color,
@@ -521,23 +521,23 @@ void BeingHandler::processPlayerUpdate1(Net::MessageIn &msg)
if (!disguiseId)
{
// Set these after the gender, as the sprites may be gender-specific
- dstBeing->updateSprite(SPRITE_WEAPON, weapon, "", 1, true);
+ dstBeing->updateSprite(SPRITE_BODY, weapon, "", 1, true);
if (!mHideShield)
- dstBeing->updateSprite(SPRITE_SHIELD, shield);
+ dstBeing->updateSprite(SPRITE_FLOOR, shield);
if (serverFeatures->haveItemColors())
{
- dstBeing->updateSprite(SPRITE_BOTTOMCLOTHES, headBottom,
+ dstBeing->updateSprite(SPRITE_WEAPON, headBottom,
"", colors[0]);
- dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid, "", colors[2]);
- dstBeing->updateSprite(SPRITE_HAT, headTop, "", colors[1]);
+ dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]);
}
else
{
- dstBeing->updateSprite(SPRITE_BOTTOMCLOTHES, headBottom);
- dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid);
- dstBeing->updateSprite(SPRITE_HAT, headTop);
+ dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
+ dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop);
}
- dstBeing->updateSprite(SPRITE_HAIR, hairStyle * -1,
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
dstBeing->setHairColor(hairColor);
}
@@ -672,23 +672,23 @@ void BeingHandler::processPlayerUpdate2(Net::MessageIn &msg)
if (!disguiseId)
{
// Set these after the gender, as the sprites may be gender-specific
- dstBeing->updateSprite(SPRITE_WEAPON, weapon, "", 1, true);
+ dstBeing->updateSprite(SPRITE_BODY, weapon, "", 1, true);
if (!mHideShield)
- dstBeing->updateSprite(SPRITE_SHIELD, shield);
+ dstBeing->updateSprite(SPRITE_FLOOR, shield);
if (serverFeatures->haveItemColors())
{
- dstBeing->updateSprite(SPRITE_BOTTOMCLOTHES, headBottom,
+ dstBeing->updateSprite(SPRITE_WEAPON, headBottom,
"", colors[0]);
- dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid, "", colors[2]);
- dstBeing->updateSprite(SPRITE_HAT, headTop, "", colors[1]);
+ dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]);
}
else
{
- dstBeing->updateSprite(SPRITE_BOTTOMCLOTHES, headBottom);
- dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid);
- dstBeing->updateSprite(SPRITE_HAT, headTop);
+ dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
+ dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop);
}
- dstBeing->updateSprite(SPRITE_HAIR, hairStyle * -1,
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
dstBeing->setHairColor(hairColor);
}
@@ -823,23 +823,23 @@ void BeingHandler::processPlayerMove(Net::MessageIn &msg)
if (!disguiseId)
{
// Set these after the gender, as the sprites may be gender-specific
- dstBeing->updateSprite(SPRITE_WEAPON, weapon, "", 1, true);
+ dstBeing->updateSprite(SPRITE_BODY, weapon, "", 1, true);
if (!mHideShield)
- dstBeing->updateSprite(SPRITE_SHIELD, shield);
+ dstBeing->updateSprite(SPRITE_FLOOR, shield);
if (serverFeatures->haveItemColors())
{
- dstBeing->updateSprite(SPRITE_BOTTOMCLOTHES, headBottom,
+ dstBeing->updateSprite(SPRITE_WEAPON, headBottom,
"", colors[0]);
- dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid, "", colors[2]);
- dstBeing->updateSprite(SPRITE_HAT, headTop, "", colors[1]);
+ dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid, "", colors[2]);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop, "", colors[1]);
}
else
{
- dstBeing->updateSprite(SPRITE_BOTTOMCLOTHES, headBottom);
- dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid);
- dstBeing->updateSprite(SPRITE_HAT, headTop);
+ dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
+ dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid);
+ dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop);
}
- dstBeing->updateSprite(SPRITE_HAIR, hairStyle * -1,
+ dstBeing->updateSprite(SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
dstBeing->setHairColor(hairColor);
}
@@ -1057,17 +1057,17 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg)
gender &= 3;
dstBeing->setGender(Being::intToGender(gender));
// Set these after the gender, as the sprites may be gender-specific
- setSprite(dstBeing, SPRITE_HAIR, hairStyle * -1,
+ setSprite(dstBeing, SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
dstBeing->setHairColor(hairColor);
- setSprite(dstBeing, SPRITE_BOTTOMCLOTHES, headBottom);
- setSprite(dstBeing, SPRITE_TOPCLOTHES, headMid);
- setSprite(dstBeing, SPRITE_HAT, headTop);
- setSprite(dstBeing, SPRITE_SHOE, shoes);
- setSprite(dstBeing, SPRITE_GLOVES, gloves);
- setSprite(dstBeing, SPRITE_WEAPON, weapon, "", 1, true);
+ setSprite(dstBeing, SPRITE_WEAPON, headBottom);
+ setSprite(dstBeing, SPRITE_HEAD_BOTTOM, headMid);
+ setSprite(dstBeing, SPRITE_CLOTHES_COLOR, headTop);
+ setSprite(dstBeing, SPRITE_HAIR, shoes);
+ setSprite(dstBeing, SPRITE_SHOES, gloves);
+ setSprite(dstBeing, SPRITE_BODY, weapon, "", 1, true);
if (!mHideShield)
- setSprite(dstBeing, SPRITE_SHIELD, shield);
+ setSprite(dstBeing, SPRITE_FLOOR, shield);
}
else if (dstBeing->getType() == ActorType::Npc
&& serverFeatures->haveNpcGender())
@@ -1262,17 +1262,17 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg)
gender &= 3;
dstBeing->setGender(Being::intToGender(gender));
// Set these after the gender, as the sprites may be gender-specific
- setSprite(dstBeing, SPRITE_HAIR, hairStyle * -1,
+ setSprite(dstBeing, SPRITE_HAIR_COLOR, hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
dstBeing->setHairColor(hairColor);
- setSprite(dstBeing, SPRITE_BOTTOMCLOTHES, headBottom);
- setSprite(dstBeing, SPRITE_TOPCLOTHES, headMid);
- setSprite(dstBeing, SPRITE_HAT, headTop);
- setSprite(dstBeing, SPRITE_SHOE, shoes);
- setSprite(dstBeing, SPRITE_GLOVES, gloves);
- setSprite(dstBeing, SPRITE_WEAPON, weapon, "", 1, true);
+ setSprite(dstBeing, SPRITE_WEAPON, headBottom);
+ setSprite(dstBeing, SPRITE_HEAD_BOTTOM, headMid);
+ setSprite(dstBeing, SPRITE_CLOTHES_COLOR, headTop);
+ setSprite(dstBeing, SPRITE_HAIR, shoes);
+ setSprite(dstBeing, SPRITE_SHOES, gloves);
+ setSprite(dstBeing, SPRITE_BODY, weapon, "", 1, true);
if (!mHideShield)
- setSprite(dstBeing, SPRITE_SHIELD, shield);
+ setSprite(dstBeing, SPRITE_FLOOR, shield);
}
else if (dstBeing->getType() == ActorType::Npc
&& serverFeatures->haveNpcGender())