diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-04 11:50:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-04 13:07:36 +0300 |
commit | 93f7e4f666dc1e1d9bf9715307080bd9c3027109 (patch) | |
tree | 8dc36c4b2cc8ab90af9d48df825f3914500b5d5b | |
parent | 565e617983d0eaa52131056cd2bc15c9e4a1bece (diff) | |
download | manaplus-93f7e4f666dc1e1d9bf9715307080bd9c3027109.tar.gz manaplus-93f7e4f666dc1e1d9bf9715307080bd9c3027109.tar.bz2 manaplus-93f7e4f666dc1e1d9bf9715307080bd9c3027109.tar.xz manaplus-93f7e4f666dc1e1d9bf9715307080bd9c3027109.zip |
Give correct names to eathena/tmwa sprites.
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/eaprotocol.h | 18 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 148 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 22 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/sprite.h | 18 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 148 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 40 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 16 | ||||
-rw-r--r-- | src/net/tmwa/sprite.h | 18 |
10 files changed, 222 insertions, 222 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 8c400852b..d117df553 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -69,7 +69,7 @@ unsigned int CharServerHandler::baseSprite() const unsigned int CharServerHandler::hairSprite() const { - return EA_SPRITE_HAIR; + return EA_SPRITE_HAIR_COLOR; } unsigned int CharServerHandler::maxSprite() const diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h index 89d8dd791..00370e141 100644 --- a/src/net/ea/eaprotocol.h +++ b/src/net/ea/eaprotocol.h @@ -76,18 +76,18 @@ namespace Ea enum { EA_SPRITE_BASE = 0, - EA_SPRITE_SHOE, - EA_SPRITE_BOTTOMCLOTHES, - EA_SPRITE_TOPCLOTHES, - EA_SPRITE_MISC1, - EA_SPRITE_MISC2, EA_SPRITE_HAIR, - EA_SPRITE_HAT, - EA_SPRITE_CAPE, - EA_SPRITE_GLOVES, EA_SPRITE_WEAPON, + EA_SPRITE_HEAD_BOTTOM, + EA_SPRITE_HEAD_TOP, + EA_SPRITE_HEAD_MID, + EA_SPRITE_HAIR_COLOR, + EA_SPRITE_CLOTHES_COLOR, EA_SPRITE_SHIELD, - EA_SPRITE_EVOL1, + EA_SPRITE_SHOES, + EA_SPRITE_BODY, + EA_SPRITE_FLOOR, + EA_SPRITE_ROBE, EA_SPRITE_EVOL2, EA_SPRITE_EVOL3, EA_SPRITE_EVOL4, diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 2973a791c..48f31aeaa 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -391,12 +391,12 @@ Being *BeingHandler::createBeing2(const int id, 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) const @@ -458,32 +458,32 @@ void BeingHandler::processBeingChangeLookContinue(Being *const dstBeing, dstBeing->setSubtype(static_cast<uint16_t>(id), 0); break; case 1: // eAthena LOOK_HAIR - dstBeing->setSpriteID(SPRITE_HAIR, id *-1); + dstBeing->setSpriteID(SPRITE_HAIR_COLOR, id *-1); break; case 2: // LOOK_WEAPON 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: // LOOK_HEAD_BOTTOM - 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: // LOOK_HEAD_TOP 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: // LOOK_HEAD_MID 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->setSpriteColor(SPRITE_HAIR, ItemDB::get( - dstBeing->getSpriteID(SPRITE_HAIR)).getDyeColorsString(id)); + dstBeing->setSpriteColor(SPRITE_HAIR_COLOR, ItemDB::get( + dstBeing->getSpriteID(SPRITE_HAIR_COLOR)).getDyeColorsString(id)); break; case 7: // Clothes color // ignoring it @@ -491,40 +491,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_FLOOR - 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: // LOOK_ROBE - 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: // COSTUME_HEAD_TOP - 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: // COSTUME_HEAD_MID - 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: // COSTUME_HEAD_LOW dstBeing->setSprite(SPRITE_EVOL2, id, color, @@ -633,13 +633,13 @@ 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_BOTTOMCLOTHES, headBottom); - dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid); - dstBeing->updateSprite(SPRITE_HAT, headTop); - dstBeing->updateSprite(SPRITE_HAIR, hairStyle * -1, + 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_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); } localPlayer->imitateOutfit(dstBeing); @@ -758,13 +758,13 @@ 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_BOTTOMCLOTHES, headBottom); - dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid); - dstBeing->updateSprite(SPRITE_HAT, headTop); - dstBeing->updateSprite(SPRITE_HAIR, hairStyle * -1, + 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_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); } localPlayer->imitateOutfit(dstBeing); @@ -883,13 +883,13 @@ 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_BOTTOMCLOTHES, headBottom); - dstBeing->updateSprite(SPRITE_TOPCLOTHES, headMid); - dstBeing->updateSprite(SPRITE_HAT, headTop); - dstBeing->updateSprite(SPRITE_HAIR, hairStyle * -1, + 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_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); } localPlayer->imitateOutfit(dstBeing); @@ -1049,16 +1049,16 @@ void BeingHandler::processBeingVisible(Net::MessageIn &msg) { 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)); - 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()) @@ -1211,16 +1211,16 @@ void BeingHandler::processBeingMove(Net::MessageIn &msg) { 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)); - 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()) @@ -1376,16 +1376,16 @@ void BeingHandler::processBeingSpawn(Net::MessageIn &msg) { 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)); - 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()) diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 02ee92cbc..fde3b0a19 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -203,7 +203,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, const int hairStyle = msg.readInt16("hair style"); const int weapon = msg.readInt32("weapon"); - tempPlayer->setSprite(SPRITE_WEAPON, weapon, "", 1, true); + tempPlayer->setSprite(SPRITE_BODY, weapon, "", 1, true); data.mAttributes[Attributes::LEVEL] = msg.readInt16("level"); @@ -213,7 +213,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, const int hat = msg.readInt16("head top"); const int topClothes = msg.readInt16("head mid"); - tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1, + tempPlayer->setSprite(SPRITE_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString( msg.readInt16("hair color"))); @@ -233,18 +233,18 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, msg.readString(16, "map name"); msg.readInt32("delete date"); const int shoes = msg.readInt32("robe"); - tempPlayer->setSprite(SPRITE_SHOE, shoes); - tempPlayer->setSprite(SPRITE_GLOVES, gloves); - tempPlayer->setSprite(SPRITE_CAPE, cape); - tempPlayer->setSprite(SPRITE_MISC1, misc1); - tempPlayer->setSprite(SPRITE_BOTTOMCLOTHES, bottomClothes); + tempPlayer->setSprite(SPRITE_HAIR, shoes); + tempPlayer->setSprite(SPRITE_SHOES, gloves); + tempPlayer->setSprite(SPRITE_SHIELD, cape); + tempPlayer->setSprite(SPRITE_HEAD_TOP, misc1); + tempPlayer->setSprite(SPRITE_WEAPON, bottomClothes); // to avoid show error (error.xml) need remove this sprite if (!config.getBoolValue("hideShield")) - tempPlayer->setSprite(SPRITE_SHIELD, shield); + tempPlayer->setSprite(SPRITE_FLOOR, shield); - tempPlayer->setSprite(SPRITE_HAT, hat); - tempPlayer->setSprite(SPRITE_TOPCLOTHES, topClothes); - tempPlayer->setSprite(SPRITE_MISC2, misc2); + tempPlayer->setSprite(SPRITE_CLOTHES_COLOR, hat); + tempPlayer->setSprite(SPRITE_HEAD_BOTTOM, topClothes); + tempPlayer->setSprite(SPRITE_HEAD_MID, misc2); msg.readInt32("slot change"); tempPlayer->setRename(msg.readInt32("rename (inverse)")); // +++ here need use gender diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index b2d68e558..ec2ba5b3c 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -45,17 +45,17 @@ extern Net::InventoryHandler *inventoryHandler; const Equipment::Slot EQUIP_CONVERT[] = { Equipment::EQUIP_PROJECTILE_SLOT, // 0 0 - Equipment::EQUIP_FEET_SLOT, // 1 SPRITE_SHOE - Equipment::EQUIP_LEGS_SLOT, // 2 SPRITE_BOTTOMCLOTHES - Equipment::EQUIP_TORSO_SLOT, // 3 SPRITE_TOPCLOTHES + Equipment::EQUIP_FEET_SLOT, // 1 SPRITE_HAIR + Equipment::EQUIP_LEGS_SLOT, // 2 SPRITE_WEAPON + Equipment::EQUIP_TORSO_SLOT, // 3 SPRITE_HEAD_BOTTOM Equipment::EQUIP_GLOVES_SLOT, // 4 0 Equipment::EQUIP_EVOL_RING1_SLOT, // 5 Equipment::EQUIP_PROJECTILE_SLOT, // 6 0 - Equipment::EQUIP_HEAD_SLOT, // 7 SPRITE_HAT + Equipment::EQUIP_HEAD_SLOT, // 7 SPRITE_CLOTHES_COLOR Equipment::EQUIP_RING2_SLOT, // 8 0 - Equipment::EQUIP_PROJECTILE_SLOT, // 9 SPRITE_GLOVES - Equipment::EQUIP_FIGHT1_SLOT, // 10 SPRITE_WEAPON - Equipment::EQUIP_FIGHT2_SLOT, // 11 SPRITE_SHIELD + Equipment::EQUIP_PROJECTILE_SLOT, // 9 SPRITE_SHOES + Equipment::EQUIP_FIGHT1_SLOT, // 10 SPRITE_BODY + Equipment::EQUIP_FIGHT2_SLOT, // 11 SPRITE_FLOOR Equipment::EQUIP_EVOL_RING2_SLOT, // 12 Equipment::EQUIP_PROJECTILE_SLOT, // 13 SPRITE_EVOL2 Equipment::EQUIP_COSTUME_ROBE_SLOT, // 14 SPRITE_EVOL3 diff --git a/src/net/eathena/sprite.h b/src/net/eathena/sprite.h index 7d685b988..53863f53a 100644 --- a/src/net/eathena/sprite.h +++ b/src/net/eathena/sprite.h @@ -26,18 +26,18 @@ enum { SPRITE_BASE = 0, - SPRITE_SHOE, - SPRITE_BOTTOMCLOTHES, - SPRITE_TOPCLOTHES, - SPRITE_MISC1, - SPRITE_MISC2, SPRITE_HAIR, - SPRITE_HAT, - SPRITE_CAPE, - SPRITE_GLOVES, SPRITE_WEAPON, + SPRITE_HEAD_BOTTOM, + SPRITE_HEAD_TOP, + SPRITE_HEAD_MID, + SPRITE_HAIR_COLOR, + SPRITE_CLOTHES_COLOR, SPRITE_SHIELD, - SPRITE_EVOL1, + SPRITE_SHOES, + SPRITE_BODY, + SPRITE_FLOOR, + SPRITE_ROBE, SPRITE_EVOL2, SPRITE_EVOL3, SPRITE_EVOL4, 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()) diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index f4c3dc60e..459663705 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -173,7 +173,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, const uint8_t look = msg.readUInt8("look"); tempPlayer->setSubtype(race, look); const uint16_t weapon = msg.readInt16("weapon"); - tempPlayer->setSprite(SPRITE_WEAPON, weapon, "", 1, true); + tempPlayer->setSprite(SPRITE_BODY, weapon, "", 1, true); data.mAttributes[Attributes::LEVEL] = msg.readInt16("level"); @@ -186,7 +186,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, const uint8_t hairColor = msg.readUInt8("hair color"); msg.readUInt8("unused"); - tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1, + tempPlayer->setSprite(SPRITE_HAIR_COLOR, hairStyle * -1, ItemDB::get(-hairStyle).getDyeColorsString(hairColor)); tempPlayer->setHairColor(static_cast<unsigned char>(hairColor)); @@ -203,20 +203,20 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, if (withColors) { - tempPlayer->setSprite(SPRITE_SHOE, shoes, "", + tempPlayer->setSprite(SPRITE_HAIR, shoes, "", msg.readUInt8("shoes color")); - tempPlayer->setSprite(SPRITE_GLOVES, gloves, "", + tempPlayer->setSprite(SPRITE_SHOES, gloves, "", msg.readUInt8("gloves color")); - tempPlayer->setSprite(SPRITE_CAPE, cape, "", + tempPlayer->setSprite(SPRITE_SHIELD, cape, "", msg.readUInt8("cape color")); - tempPlayer->setSprite(SPRITE_MISC1, misc1, "", + tempPlayer->setSprite(SPRITE_HEAD_TOP, misc1, "", msg.readUInt8("misc1 color")); - tempPlayer->setSprite(SPRITE_BOTTOMCLOTHES, bottomClothes, + tempPlayer->setSprite(SPRITE_WEAPON, bottomClothes, "", msg.readUInt8("bottom clothes color")); // to avoid show error (error.xml) need remove this sprite if (!config.getBoolValue("hideShield")) { - tempPlayer->setSprite(SPRITE_SHIELD, shield, "", + tempPlayer->setSprite(SPRITE_FLOOR, shield, "", msg.readUInt8("shield color")); } else @@ -224,28 +224,28 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, msg.readUInt8("shield color"); } - tempPlayer->setSprite(SPRITE_HAT, hat, "", + tempPlayer->setSprite(SPRITE_CLOTHES_COLOR, hat, "", msg.readUInt8("head option top color")); - tempPlayer->setSprite(SPRITE_TOPCLOTHES, topClothes, "", + tempPlayer->setSprite(SPRITE_HEAD_BOTTOM, topClothes, "", msg.readUInt8("top clothes color")); - tempPlayer->setSprite(SPRITE_MISC2, misc2, "", + tempPlayer->setSprite(SPRITE_HEAD_MID, misc2, "", msg.readUInt8("misc2 color")); msg.skip(5, "unused"); } else { - tempPlayer->setSprite(SPRITE_SHOE, shoes); - tempPlayer->setSprite(SPRITE_GLOVES, gloves); - tempPlayer->setSprite(SPRITE_CAPE, cape); - tempPlayer->setSprite(SPRITE_MISC1, misc1); - tempPlayer->setSprite(SPRITE_BOTTOMCLOTHES, bottomClothes); + tempPlayer->setSprite(SPRITE_HAIR, shoes); + tempPlayer->setSprite(SPRITE_SHOES, gloves); + tempPlayer->setSprite(SPRITE_SHIELD, cape); + tempPlayer->setSprite(SPRITE_HEAD_TOP, misc1); + tempPlayer->setSprite(SPRITE_WEAPON, bottomClothes); // to avoid show error (error.xml) need remove this sprite if (!config.getBoolValue("hideShield")) - tempPlayer->setSprite(SPRITE_SHIELD, shield); + tempPlayer->setSprite(SPRITE_FLOOR, shield); - tempPlayer->setSprite(SPRITE_HAT, hat); // head option top - tempPlayer->setSprite(SPRITE_TOPCLOTHES, topClothes); - tempPlayer->setSprite(SPRITE_MISC2, misc2); + tempPlayer->setSprite(SPRITE_CLOTHES_COLOR, hat); // head option top + tempPlayer->setSprite(SPRITE_HEAD_BOTTOM, topClothes); + tempPlayer->setSprite(SPRITE_HEAD_MID, misc2); } character->slot = msg.readUInt8("slot"); msg.readUInt8("unused"); diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index c271cd95b..5f89e3ebc 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -45,18 +45,18 @@ extern Net::InventoryHandler *inventoryHandler; const Equipment::Slot EQUIP_CONVERT[] = { Equipment::EQUIP_PROJECTILE_SLOT, // 0 0 - Equipment::EQUIP_FEET_SLOT, // 1 SPRITE_SHOE - Equipment::EQUIP_LEGS_SLOT, // 2 SPRITE_BOTTOMCLOTHES - Equipment::EQUIP_TORSO_SLOT, // 3 SPRITE_TOPCLOTHES + Equipment::EQUIP_FEET_SLOT, // 1 SPRITE_HAIR + Equipment::EQUIP_LEGS_SLOT, // 2 SPRITE_WEAPON + Equipment::EQUIP_TORSO_SLOT, // 3 SPRITE_HEAD_BOTTOM Equipment::EQUIP_PROJECTILE_SLOT, // 4 0 Equipment::EQUIP_NECK_SLOT, // 5 SPRITE_RING Equipment::EQUIP_PROJECTILE_SLOT, // 6 0 - Equipment::EQUIP_HEAD_SLOT, // 7 SPRITE_HAT + Equipment::EQUIP_HEAD_SLOT, // 7 SPRITE_CLOTHES_COLOR Equipment::EQUIP_RING2_SLOT, // 8 0 - Equipment::EQUIP_GLOVES_SLOT, // 9 SPRITE_GLOVES - Equipment::EQUIP_FIGHT1_SLOT, // 10 SPRITE_WEAPON - Equipment::EQUIP_FIGHT2_SLOT, // 11 SPRITE_SHIELD - Equipment::EQUIP_EVOL_RING1_SLOT, // 12 SPRITE_EVOL1 + Equipment::EQUIP_GLOVES_SLOT, // 9 SPRITE_SHOES + Equipment::EQUIP_FIGHT1_SLOT, // 10 SPRITE_BODY + Equipment::EQUIP_FIGHT2_SLOT, // 11 SPRITE_FLOOR + Equipment::EQUIP_EVOL_RING1_SLOT, // 12 SPRITE_ROBE Equipment::EQUIP_EVOL_RING2_SLOT, // 13 SPRITE_EVOL2 }; diff --git a/src/net/tmwa/sprite.h b/src/net/tmwa/sprite.h index 24d47e1c9..d80e91f59 100644 --- a/src/net/tmwa/sprite.h +++ b/src/net/tmwa/sprite.h @@ -26,18 +26,18 @@ enum { SPRITE_BASE = 0, - SPRITE_SHOE, - SPRITE_BOTTOMCLOTHES, - SPRITE_TOPCLOTHES, - SPRITE_MISC1, - SPRITE_MISC2, SPRITE_HAIR, - SPRITE_HAT, - SPRITE_CAPE, - SPRITE_GLOVES, SPRITE_WEAPON, + SPRITE_HEAD_BOTTOM, + SPRITE_HEAD_TOP, + SPRITE_HEAD_MID, + SPRITE_HAIR_COLOR, + SPRITE_CLOTHES_COLOR, SPRITE_SHIELD, - SPRITE_EVOL1, + SPRITE_SHOES, + SPRITE_BODY, + SPRITE_FLOOR, + SPRITE_ROBE, SPRITE_EVOL2, SPRITE_VECTOREND }; |