summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-21 13:53:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-21 13:58:49 +0300
commit48cff567cb37f3ce18ee32e75bb7570db72368e0 (patch)
treee40f3656b0b37f6ca51a1da27a7050552b7c86eb
parent26891e5a71320228e49f0f42b8efdf5284e8e853 (diff)
downloadmanaverse-48cff567cb37f3ce18ee32e75bb7570db72368e0.tar.gz
manaverse-48cff567cb37f3ce18ee32e75bb7570db72368e0.tar.bz2
manaverse-48cff567cb37f3ce18ee32e75bb7570db72368e0.tar.xz
manaverse-48cff567cb37f3ce18ee32e75bb7570db72368e0.zip
Split Being::setSprite into Being::setSprite and Being::setSpriteCards.
-rw-r--r--src/actormanager.cpp9
-rw-r--r--src/being/being.cpp127
-rw-r--r--src/being/being.h12
-rw-r--r--src/gui/windows/charcreatedialog.cpp6
-rw-r--r--src/net/eathena/beinghandler.cpp45
-rw-r--r--src/net/eathena/beingrecv.cpp35
-rw-r--r--src/net/eathena/charserverrecv.cpp33
-rw-r--r--src/net/tmwa/beinghandler.cpp15
-rw-r--r--src/net/tmwa/beingrecv.cpp39
-rw-r--r--src/net/tmwa/charserverrecv.cpp36
10 files changed, 197 insertions, 160 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 1d4416482..6bae927e9 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -2041,8 +2041,7 @@ Being *ActorManager::cloneBeing(const Being *const srcBeing,
dstBeing->setSprite(slot,
spriteId,
std::string(),
- color,
- zeroCards);
+ color);
}
const int hairSlot = charServerHandler->hairSprite();
const int hairStyle = -srcBeing->getSpriteID(hairSlot);
@@ -2052,16 +2051,14 @@ Being *ActorManager::cloneBeing(const Being *const srcBeing,
dstBeing->setSprite(hairSlot,
hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
else
{
dstBeing->setSprite(hairSlot,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
dstBeing->setHairColor(hairColor);
return dstBeing;
diff --git a/src/being/being.cpp b/src/being/being.cpp
index d8be9802a..889129cff 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -497,8 +497,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setSprite(charServerHandler->baseSprite(),
id,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
}
else
@@ -510,8 +509,7 @@ void Being::setSubtype(const BeingTypeId subtype,
setSprite(charServerHandler->baseSprite(),
id,
info.getColor(fromInt(mLook, ItemColor)),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
}
}
@@ -2485,14 +2483,115 @@ void Being::updateSprite(const unsigned int slot,
if (slot && mSlots[slot].spriteId == id)
return;
- setSprite(slot, id, color, colorId, mSlots[slot].cardsId);
+ setSpriteCards(slot,
+ id,
+ color,
+ colorId,
+ mSlots[slot].cardsId);
}
void Being::setSprite(const unsigned int slot,
const int id,
std::string color,
- ItemColor colorId,
- CardsList cards) restrict2
+ ItemColor colorId) restrict2
+{
+ if (!charServerHandler || slot >= charServerHandler->maxSprite())
+ return;
+
+ if (slot >= CAST_U32(mSprites.size()))
+ ensureSize(slot + 1);
+
+ if (slot >= CAST_U32(mSlots.size()))
+ mSlots.resize(slot + 1, BeingSlot());
+
+ // disabled for now, because it may broke replace/reorder sprites logic
+// if (slot && mSlots[slot].spriteId == id)
+// return;
+
+ // id = 0 means unequip
+ if (id == 0)
+ {
+ removeSprite(slot);
+ mSpriteDraw[slot] = 0;
+
+ const int id1 = mSlots[slot].spriteId;
+ if (id1)
+ {
+ const ItemInfo &info = ItemDB::get(id1);
+ if (mMap &&
+ mType == ActorType::Player)
+ {
+ const BeingId pet = fromInt(info.getPet(), BeingId);
+ if (pet != BeingId_zero)
+ removePet(pet);
+ }
+ removeItemParticles(id1);
+ }
+ }
+ else
+ {
+ const ItemInfo &info = ItemDB::get(id);
+ const std::string &restrict filename = info.getSprite(
+ mGender, mSubType);
+ int lastTime = 0;
+ int startTime = 0;
+ AnimatedSprite *restrict equipmentSprite = nullptr;
+
+ if (mType == ActorType::Player)
+ {
+ const BeingId pet = fromInt(info.getPet(), BeingId);
+ if (pet != BeingId_zero)
+ addPet(pet);
+ }
+
+ if (!filename.empty())
+ {
+ if (color.empty())
+ color = info.getDyeColorsString(colorId);
+
+ equipmentSprite = AnimatedSprite::delayedLoad(
+ paths.getStringValue("sprites").append(
+ combineDye(filename, color)));
+ }
+
+ if (equipmentSprite)
+ {
+ equipmentSprite->setSpriteDirection(getSpriteDirection());
+ startTime = getStartTime();
+ lastTime = getLastTime();
+ }
+
+ CompoundSprite::setSprite(slot, equipmentSprite);
+ mSpriteDraw[slot] = id;
+
+ addItemParticles(id, info.getDisplay());
+
+ setAction(mAction, 0);
+ if (equipmentSprite)
+ {
+ if (lastTime > 0)
+ {
+ equipmentSprite->setLastTime(startTime);
+ equipmentSprite->update(lastTime);
+ }
+ }
+ }
+
+ BeingSlot &beingSlot = mSlots[slot];
+ beingSlot.spriteId = id;
+ beingSlot.color = color;
+ beingSlot.colorId = colorId;
+ beingSlot.cardsId = CardsList(nullptr);
+ recalcSpritesOrder();
+ if (beingEquipmentWindow)
+ beingEquipmentWindow->updateBeing(this);
+}
+
+void Being::setSpriteCards(const unsigned int slot,
+ const int id,
+ std::string color,
+ ItemColor colorId,
+ CardsList cards) restrict2
{
if (!charServerHandler || slot >= charServerHandler->maxSprite())
return;
@@ -2675,15 +2774,14 @@ void Being::setSpriteID(const unsigned int slot,
setSprite(slot,
id,
beingSlot.color,
- ItemColor_one,
- beingSlot.cardsId);
+ ItemColor_one);
}
void Being::setSpriteColor(const unsigned int slot,
const std::string &restrict color) restrict2
{
BeingSlot &beingSlot = mSlots[slot];
- setSprite(slot,
+ setSpriteCards(slot,
beingSlot.spriteId,
color,
ItemColor_one,
@@ -2694,7 +2792,7 @@ void Being::setHairStyle(const unsigned int slot,
const int id) restrict2
{
// dumpSprites();
- setSprite(slot,
+ setSpriteCards(slot,
id,
ItemDB::get(id).getDyeColorsString(mHairColor),
ItemColor_one,
@@ -2710,7 +2808,7 @@ void Being::setHairColor(const unsigned int slot,
const int id = beingSlot.spriteId;
if (id != 0)
{
- setSprite(slot,
+ setSpriteCards(slot,
id,
ItemDB::get(id).getDyeColorsString(color),
ItemColor_one,
@@ -2898,7 +2996,7 @@ void Being::setGender(const GenderT gender) restrict2
BeingSlot &beingSlot = mSlots[i];
if (beingSlot.spriteId != 0)
{
- setSprite(i,
+ setSpriteCards(i,
beingSlot.spriteId,
beingSlot.color,
ItemColor_one,
@@ -3753,8 +3851,7 @@ void Being::undressItemById(const int id) restrict2
setSprite(CAST_U32(f),
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
break;
}
}
diff --git a/src/being/being.h b/src/being/being.h
index 7dbabd396..127385d16 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -315,14 +315,16 @@ class Being notfinal : public ActorSprite,
Party *getParty() const restrict2 noexcept2 A_WARN_UNUSED
{ return mParty; }
- /**
- * Sets visible equipments for this being.
- */
void setSprite(const unsigned int slot,
const int id,
std::string color,
- ItemColor colorId,
- CardsList cards) restrict2;
+ ItemColor colorId) restrict2;
+
+ void setSpriteCards(const unsigned int slot,
+ const int id,
+ std::string color,
+ ItemColor colorId,
+ CardsList cards) restrict2;
void setWeaponId(const int id) restrict2;
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index bf0352a17..c58be3e02 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -159,8 +159,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
mPlayer->setSprite(i,
*it,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
if (!maxHairColor)
@@ -772,8 +771,7 @@ void CharCreateDialog::updateHair()
mPlayer->setSprite(charServerHandler->hairSprite(),
mHairStyle * -1,
item.getDyeColorsString(fromInt(mHairColor, ItemColor)),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
void CharCreateDialog::updateRace()
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 49e96501e..0243f1899 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -53,78 +53,63 @@ void BeingHandler::undress(Being *const being) const
being->setSprite(SPRITE_WEAPON,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_HEAD_BOTTOM,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_HEAD_TOP,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_HEAD_MID,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_CLOTHES_COLOR,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_SHIELD,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_FLOOR,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_ROBE,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_EVOL2,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_EVOL3,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_EVOL4,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_EVOL5,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_EVOL6,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_HAIR,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_SHOES,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
void BeingHandler::requestRanks(const RankT rank) const
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 8f04c586a..b91737249 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -158,7 +158,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
dstBeing->setSpriteID(SPRITE_HAIR_COLOR, id * -1);
break;
case 2: // LOOK_WEAPON Weapon ID in id, Shield ID in id2
- dstBeing->setSprite(SPRITE_BODY,
+ dstBeing->setSpriteCards(SPRITE_BODY,
id,
"",
itemColor,
@@ -167,13 +167,12 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
dstBeing->setSprite(SPRITE_FLOOR,
id2,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 3: // LOOK_HEAD_BOTTOM
- dstBeing->setSprite(SPRITE_WEAPON,
+ dstBeing->setSpriteCards(SPRITE_WEAPON,
id,
color,
itemColor,
@@ -182,7 +181,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_WEAPON);
break;
case 4: // LOOK_HEAD_TOP Change upper headgear for eAthena, hat for us
- dstBeing->setSprite(SPRITE_CLOTHES_COLOR,
+ dstBeing->setSpriteCards(SPRITE_CLOTHES_COLOR,
id,
color,
itemColor,
@@ -192,7 +191,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
break;
case 5: // LOOK_HEAD_MID Change middle headgear for eathena,
// armor for us
- dstBeing->setSprite(SPRITE_HEAD_BOTTOM,
+ dstBeing->setSpriteCards(SPRITE_HEAD_BOTTOM,
id,
color,
itemColor,
@@ -211,7 +210,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
dstBeing->setLook(CAST_U8(id));
break;
case 8: // eAthena LOOK_SHIELD
- dstBeing->setSprite(SPRITE_FLOOR,
+ dstBeing->setSpriteCards(SPRITE_FLOOR,
id,
color,
itemColor,
@@ -220,7 +219,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 9: // eAthena LOOK_SHOES
- dstBeing->setSprite(SPRITE_HAIR,
+ dstBeing->setSpriteCards(SPRITE_HAIR,
id,
color,
itemColor,
@@ -229,7 +228,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR);
break;
case 10: // LOOK_GLOVES
- dstBeing->setSprite(SPRITE_SHOES,
+ dstBeing->setSpriteCards(SPRITE_SHOES,
id,
color,
itemColor,
@@ -238,7 +237,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES);
break;
case 11: // LOOK_FLOOR
- dstBeing->setSprite(SPRITE_SHIELD,
+ dstBeing->setSpriteCards(SPRITE_SHIELD,
id,
color,
itemColor,
@@ -247,7 +246,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
break;
case 12: // LOOK_ROBE
- dstBeing->setSprite(SPRITE_HEAD_TOP,
+ dstBeing->setSpriteCards(SPRITE_HEAD_TOP,
id,
color,
itemColor,
@@ -256,7 +255,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_TOP);
break;
case 13: // COSTUME_HEAD_TOP
- dstBeing->setSprite(SPRITE_HEAD_MID,
+ dstBeing->setSpriteCards(SPRITE_HEAD_MID,
id,
color,
itemColor,
@@ -265,7 +264,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_MID);
break;
case 14: // COSTUME_HEAD_MID
- dstBeing->setSprite(SPRITE_ROBE,
+ dstBeing->setSpriteCards(SPRITE_ROBE,
id,
color,
itemColor,
@@ -274,7 +273,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_ROBE);
break;
case 15: // COSTUME_HEAD_LOW
- dstBeing->setSprite(SPRITE_EVOL2,
+ dstBeing->setSpriteCards(SPRITE_EVOL2,
id,
color,
itemColor,
@@ -283,7 +282,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL2);
break;
case 16: // COSTUME_GARMENT
- dstBeing->setSprite(SPRITE_EVOL3,
+ dstBeing->setSpriteCards(SPRITE_EVOL3,
id,
color,
itemColor,
@@ -292,7 +291,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL3);
break;
case 17: // ARMOR
- dstBeing->setSprite(SPRITE_EVOL4,
+ dstBeing->setSpriteCards(SPRITE_EVOL4,
id,
color,
itemColor,
@@ -301,7 +300,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL4);
break;
case 18:
- dstBeing->setSprite(SPRITE_EVOL5,
+ dstBeing->setSpriteCards(SPRITE_EVOL5,
id,
color,
itemColor,
@@ -310,7 +309,7 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL5);
break;
case 19:
- dstBeing->setSprite(SPRITE_EVOL6,
+ dstBeing->setSpriteCards(SPRITE_EVOL6,
id,
color,
itemColor,
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index 8b9de16a9..321745312 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -132,8 +132,7 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
tempPlayer->setSprite(SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setWeaponId(weapon);
data.mAttributes[Attributes::LEVEL] = msg.readInt16("level");
@@ -151,8 +150,7 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
tempPlayer->setSprite(SPRITE_HAIR_COLOR,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
else
{
@@ -160,8 +158,7 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(
color),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
const uint16_t look = msg.readInt16("clothes color");
@@ -193,43 +190,35 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
tempPlayer->setSprite(SPRITE_HAIR,
shoes,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_SHOES,
gloves,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_SHIELD,
cape,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_HEAD_TOP,
misc1,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_WEAPON,
bottomClothes,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_FLOOR,
shield,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_CLOTHES_COLOR,
hat,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_HEAD_BOTTOM,
topClothes,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
// tempPlayer->setSprite(SPRITE_HEAD_MID, misc2);
}
if (packetVersion >= 20110928)
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 9a67b9358..159e56fb8 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -52,28 +52,23 @@ void BeingHandler::undress(Being *const being) const
being->setSprite(SPRITE_WEAPON,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_HEAD_BOTTOM,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_CLOTHES_COLOR,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_HAIR,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
being->setSprite(SPRITE_SHOES,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
#ifdef EATHENA_SUPPORT
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp
index 16c2f1599..d86d8b2ec 100644
--- a/src/net/tmwa/beingrecv.cpp
+++ b/src/net/tmwa/beingrecv.cpp
@@ -146,38 +146,33 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
dstBeing->setSprite(SPRITE_BODY,
id,
"",
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
dstBeing->setWeaponId(id);
dstBeing->setSprite(SPRITE_FLOOR,
id2,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 3: // Change lower headgear for eAthena, pants for us
dstBeing->setSprite(SPRITE_WEAPON,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
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,
- zeroCards);
+ ItemColor_one);
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,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
break;
case 6: // eAthena LOOK_HAIR_COLOR
@@ -191,64 +186,56 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
dstBeing->setSprite(SPRITE_FLOOR,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
case 9: // eAthena LOOK_SHOES
dstBeing->setSprite(SPRITE_HAIR,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR);
break;
case 10: // LOOK_GLOVES
dstBeing->setSprite(SPRITE_SHOES,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES);
break;
case 11: // LOOK_CAPE
dstBeing->setSprite(SPRITE_SHIELD,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
break;
case 12:
dstBeing->setSprite(SPRITE_HEAD_TOP,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_TOP);
break;
case 13:
dstBeing->setSprite(SPRITE_HEAD_MID,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_MID);
break;
case 14:
dstBeing->setSprite(SPRITE_ROBE,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_ROBE);
break;
case 15:
dstBeing->setSprite(SPRITE_EVOL2,
id,
color,
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL2);
break;
case 16:
diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp
index 2fd768870..982779a23 100644
--- a/src/net/tmwa/charserverrecv.cpp
+++ b/src/net/tmwa/charserverrecv.cpp
@@ -107,8 +107,7 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
tempPlayer->setSprite(SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setWeaponId(weapon);
data.mAttributes[Attributes::LEVEL] = msg.readInt16("level");
@@ -128,16 +127,14 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
tempPlayer->setSprite(SPRITE_HAIR_COLOR,
0,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
else
{
tempPlayer->setSprite(SPRITE_HAIR_COLOR,
hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
}
tempPlayer->setHairColor(hairColor);
@@ -156,48 +153,39 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
tempPlayer->setSprite(SPRITE_HAIR,
shoes,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_SHOES,
gloves,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_SHIELD,
cape,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_HEAD_TOP,
misc1,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_WEAPON,
bottomClothes,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_FLOOR,
shield,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_CLOTHES_COLOR,
hat,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_HEAD_BOTTOM,
topClothes,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
tempPlayer->setSprite(SPRITE_HEAD_MID,
misc2,
std::string(),
- ItemColor_one,
- zeroCards);
+ ItemColor_one);
character->slot = msg.readUInt8("slot");
const uint8_t sex = CAST_U8(msg.readUInt8("gender"));