summaryrefslogtreecommitdiff
path: root/src/net/eathena/charserverhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-13 21:46:01 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-13 21:46:01 +0300
commitde337195bdbb72df1e56b630f0b83d394648bbb8 (patch)
tree014a3555c0f855ce77dbf0df5377e1783b870bf7 /src/net/eathena/charserverhandler.cpp
parent1289a09b48736324e97f5ce82d9cfee656e6cbe7 (diff)
downloadplus-de337195bdbb72df1e56b630f0b83d394648bbb8.tar.gz
plus-de337195bdbb72df1e56b630f0b83d394648bbb8.tar.bz2
plus-de337195bdbb72df1e56b630f0b83d394648bbb8.tar.xz
plus-de337195bdbb72df1e56b630f0b83d394648bbb8.zip
Add support for load all item slots with cards in char selection dialog (hercules).
Also removed some outdated evol color code.
Diffstat (limited to 'src/net/eathena/charserverhandler.cpp')
-rw-r--r--src/net/eathena/charserverhandler.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index 7ff8e40d3..b2310b029 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -191,8 +191,7 @@ void CharServerHandler::handleMessage(Net::MessageIn &msg)
}
void CharServerHandler::readPlayerData(Net::MessageIn &msg,
- Net::Character *const character,
- const bool) const
+ Net::Character *const character) const
{
if (!character)
return;
@@ -233,7 +232,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
const uint16_t race = msg.readInt16("class");
// tempPlayer->setSubtype(race, 0);
const int hairStyle = msg.readInt32("hair style");
- const int option = (msg.readInt16("weapon") | 1) ^ 1;
+ const int option A_UNUSED = (msg.readInt16("weapon") | 1) ^ 1;
const int weapon = 0;
tempPlayer->setSprite(SPRITE_BODY, weapon, "", 1, true);
@@ -270,16 +269,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_HAIR, shoes);
- tempPlayer->setSprite(SPRITE_SHOES, gloves);
- tempPlayer->setSprite(SPRITE_SHIELD, cape);
- tempPlayer->setSprite(SPRITE_HEAD_TOP, misc1);
- tempPlayer->setSprite(SPRITE_WEAPON, bottomClothes);
- tempPlayer->setSprite(SPRITE_FLOOR, shield);
-
- tempPlayer->setSprite(SPRITE_CLOTHES_COLOR, hat);
- tempPlayer->setSprite(SPRITE_HEAD_BOTTOM, topClothes);
-// tempPlayer->setSprite(SPRITE_HEAD_MID, misc2);
+ if (!serverFeatures->haveAdvancedSprites())
+ {
+ 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);
+ tempPlayer->setSprite(SPRITE_FLOOR, shield);
+ 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)"));
@@ -409,7 +410,7 @@ void CharServerHandler::processCharLogin(Net::MessageIn &msg)
for (int i = 0; i < count; ++i)
{
Net::Character *const character = new Net::Character;
- readPlayerData(msg, character, false);
+ readPlayerData(msg, character);
mCharacters.push_back(character);
if (character->dummy)
{
@@ -550,7 +551,7 @@ void CharServerHandler::processCharCreate(Net::MessageIn &msg)
{
BLOCK_START("CharServerHandler::processCharCreate")
Net::Character *const character = new Net::Character;
- charServerHandler->readPlayerData(msg, character, false);
+ charServerHandler->readPlayerData(msg, character);
mCharacters.push_back(character);
updateCharSelectDialog();
@@ -733,7 +734,7 @@ void CharServerHandler::processCharCharacters(Net::MessageIn &msg)
for (int i = 0; i < count; ++i)
{
Net::Character *const character = new Net::Character;
- charServerHandler->readPlayerData(msg, character, false);
+ charServerHandler->readPlayerData(msg, character);
mCharacters.push_back(character);
if (character->dummy)
{