summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-08 20:16:41 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-08 20:16:41 +0300
commit845a02e65d8077f4079724a106f75470984df8d2 (patch)
treee6ab2efdd3d408dbb235fc6b3f7591ac0b017a51 /src/net
parent93e5a6fbfba642e4e3ff85dcf7bc3c02bada5649 (diff)
downloadmanaverse-845a02e65d8077f4079724a106f75470984df8d2.tar.gz
manaverse-845a02e65d8077f4079724a106f75470984df8d2.tar.bz2
manaverse-845a02e65d8077f4079724a106f75470984df8d2.tar.xz
manaverse-845a02e65d8077f4079724a106f75470984df8d2.zip
Simplify set weapon sprite.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/beingrecv.cpp5
-rw-r--r--src/net/ea/beingrecv.h3
-rw-r--r--src/net/eathena/beinghandler.cpp15
-rw-r--r--src/net/eathena/beingrecv.cpp26
-rw-r--r--src/net/eathena/charserverrecv.cpp11
-rw-r--r--src/net/tmwa/beinghandler.cpp5
-rw-r--r--src/net/tmwa/beingrecv.cpp28
-rw-r--r--src/net/tmwa/charserverrecv.cpp12
8 files changed, 11 insertions, 94 deletions
diff --git a/src/net/ea/beingrecv.cpp b/src/net/ea/beingrecv.cpp
index 06739043b..10694a8e9 100644
--- a/src/net/ea/beingrecv.cpp
+++ b/src/net/ea/beingrecv.cpp
@@ -546,12 +546,11 @@ void BeingRecv::setSprite(Being *const being,
const unsigned int slot,
const int id,
const std::string &color,
- const ItemColor colorId,
- const IsWeapon isWeapon)
+ const ItemColor colorId)
{
if (!being)
return;
- being->updateSprite(slot, id, color, colorId, isWeapon);
+ being->updateSprite(slot, id, color, colorId);
}
} // namespace Ea
diff --git a/src/net/ea/beingrecv.h b/src/net/ea/beingrecv.h
index 0da890eb3..c167f174a 100644
--- a/src/net/ea/beingrecv.h
+++ b/src/net/ea/beingrecv.h
@@ -59,8 +59,7 @@ namespace Ea
const unsigned int slot,
const int id,
const std::string &color = "",
- const ItemColor colorId = ItemColor_one,
- const IsWeapon isWeapon = IsWeapon_false);
+ const ItemColor colorId = ItemColor_one);
} // namespace BeingRecv
} // namespace Ea
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index c4b8e85d5..f1f47ca61 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -54,91 +54,76 @@ void BeingHandler::undress(Being *const being) const
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_HEAD_BOTTOM,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_HEAD_TOP,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_HEAD_MID,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_CLOTHES_COLOR,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_SHIELD,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_FLOOR,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_ROBE,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_EVOL2,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_EVOL3,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_EVOL4,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_EVOL5,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_EVOL6,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_HAIR,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_SHOES,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
}
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index bcfaa06eb..83c6b9515 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -164,14 +164,12 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
"",
itemColor,
- IsWeapon_true,
cards);
dstBeing->setWeaponId(id);
dstBeing->setSprite(SPRITE_FLOOR,
id2,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
@@ -181,7 +179,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_WEAPON);
@@ -191,7 +188,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_CLOTHES_COLOR);
@@ -202,7 +198,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
@@ -222,7 +217,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
@@ -232,7 +226,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR);
@@ -242,7 +235,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES);
@@ -252,7 +244,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
@@ -262,7 +253,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_TOP);
@@ -272,7 +262,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_MID);
@@ -282,7 +271,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_ROBE);
@@ -292,7 +280,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL2);
@@ -302,7 +289,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL3);
@@ -312,7 +298,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL4);
@@ -322,7 +307,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL5);
@@ -332,7 +316,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
itemColor,
- IsWeapon_false,
cards);
if (localPlayer)
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL6);
@@ -489,8 +472,7 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
@@ -696,8 +678,7 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
}
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
@@ -901,8 +882,7 @@ void BeingRecv::processBeingSpawn(Net::MessageIn &msg)
SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
// Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index 796be90ca..d3300f092 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -133,7 +133,6 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
weapon,
"",
ItemColor_one,
- IsWeapon_true,
nullptr);
tempPlayer->setWeaponId(weapon);
@@ -153,7 +152,6 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
}
else
@@ -163,7 +161,6 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
ItemDB::get(-hairStyle).getDyeColorsString(
color),
ItemColor_one,
- IsWeapon_false,
nullptr);
}
@@ -197,49 +194,41 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
shoes,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_SHOES,
gloves,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_SHIELD,
cape,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_HEAD_TOP,
misc1,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_WEAPON,
bottomClothes,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_FLOOR,
shield,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_CLOTHES_COLOR,
hat,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_HEAD_BOTTOM,
topClothes,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
// tempPlayer->setSprite(SPRITE_HEAD_MID, misc2);
}
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index c479e4ced..8aa01bb9c 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -53,31 +53,26 @@ void BeingHandler::undress(Being *const being) const
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_HEAD_BOTTOM,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_CLOTHES_COLOR,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_HAIR,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
being->setSprite(SPRITE_SHOES,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
}
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp
index a219203cc..73fa7b87c 100644
--- a/src/net/tmwa/beingrecv.cpp
+++ b/src/net/tmwa/beingrecv.cpp
@@ -147,14 +147,12 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
"",
ItemColor_one,
- IsWeapon_true,
nullptr);
dstBeing->setWeaponId(id);
dstBeing->setSprite(SPRITE_FLOOR,
id2,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
@@ -163,7 +161,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_WEAPON);
break;
@@ -172,7 +169,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_CLOTHES_COLOR);
break;
@@ -181,7 +177,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
break;
@@ -197,7 +192,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_FLOOR);
break;
@@ -206,7 +200,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_HAIR);
break;
@@ -215,7 +208,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_SHOES);
break;
@@ -224,7 +216,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_SHIELD);
break;
@@ -233,7 +224,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_TOP);
break;
@@ -242,7 +232,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_MID);
break;
@@ -251,7 +240,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_ROBE);
break;
@@ -260,7 +248,6 @@ void BeingRecv::processBeingChangeLookContinue(const Net::MessageIn &msg,
id,
color,
ItemColor_one,
- IsWeapon_false,
nullptr);
localPlayer->imitateOutfit(dstBeing, SPRITE_EVOL2);
break;
@@ -369,8 +356,7 @@ void BeingRecv::processPlayerUpdate1(Net::MessageIn &msg)
dstBeing->updateSprite(SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
dstBeing->updateSprite(SPRITE_FLOOR, shield);
dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
@@ -516,8 +502,7 @@ void BeingRecv::processPlayerUpdate2(Net::MessageIn &msg)
dstBeing->updateSprite(SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
dstBeing->updateSprite(SPRITE_FLOOR, shield);
dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
@@ -663,8 +648,7 @@ void BeingRecv::processPlayerMove(Net::MessageIn &msg)
dstBeing->updateSprite(SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
dstBeing->updateSprite(SPRITE_FLOOR, shield);
dstBeing->updateSprite(SPRITE_WEAPON, headBottom);
@@ -918,8 +902,7 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
@@ -1136,8 +1119,7 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
SPRITE_BODY,
weapon,
"",
- ItemColor_one,
- IsWeapon_true);
+ ItemColor_one);
dstBeing->setWeaponId(weapon);
Ea::BeingRecv::setSprite(dstBeing, SPRITE_FLOOR, shield);
}
diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp
index fdc24cf7a..7a5c6adae 100644
--- a/src/net/tmwa/charserverrecv.cpp
+++ b/src/net/tmwa/charserverrecv.cpp
@@ -108,7 +108,6 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
weapon,
"",
ItemColor_one,
- IsWeapon_true,
nullptr);
tempPlayer->setWeaponId(weapon);
@@ -130,7 +129,6 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
0,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
}
else
@@ -139,7 +137,6 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
hairStyle * -1,
ItemDB::get(-hairStyle).getDyeColorsString(hairColor),
ItemColor_one,
- IsWeapon_false,
nullptr);
}
tempPlayer->setHairColor(hairColor);
@@ -160,55 +157,46 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
shoes,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_SHOES,
gloves,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_SHIELD,
cape,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_HEAD_TOP,
misc1,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_WEAPON,
bottomClothes,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_FLOOR,
shield,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_CLOTHES_COLOR,
hat,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_HEAD_BOTTOM,
topClothes,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
tempPlayer->setSprite(SPRITE_HEAD_MID,
misc2,
std::string(),
ItemColor_one,
- IsWeapon_false,
nullptr);
character->slot = msg.readUInt8("slot");