summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-08 05:35:20 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-08 05:35:20 +0200
commit871fb6eee49c142be78315cc97c1c8e29daf7d61 (patch)
tree30d2570ad862817d278e88edda9e4c6028d3c85a /src
parentef7f53e43ce4306080efae3b86443a6016a3e66a (diff)
downloadmv-871fb6eee49c142be78315cc97c1c8e29daf7d61.tar.gz
mv-871fb6eee49c142be78315cc97c1c8e29daf7d61.tar.bz2
mv-871fb6eee49c142be78315cc97c1c8e29daf7d61.tar.xz
mv-871fb6eee49c142be78315cc97c1c8e29daf7d61.zip
Add support for drawing new slots as sprites.
Diffstat (limited to 'src')
-rw-r--r--src/localplayer.cpp3
-rw-r--r--src/net/tmwa/beinghandler.cpp8
-rw-r--r--src/net/tmwa/inventoryhandler.cpp4
-rw-r--r--src/net/tmwa/protocol.h2
4 files changed, 14 insertions, 3 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index edff2ce67..207e71bf5 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -3344,6 +3344,7 @@ void LocalPlayer::imitateOutfit(Being *player, int sprite)
if (mImitationMode == 1 && !player_imitated.empty()
&& player->getName() == player_imitated)
{
+// logger->log("have equip %d", sprite);
// std::string filename = ItemDB::get(
// player->getId()).getSprite(mGender);
// logger->log("LocalPlayer::imitateOutfit sprite: " + toString(sprite));
@@ -3383,7 +3384,7 @@ void LocalPlayer::imitateOutfit(Being *player, int sprite)
}
else
{
-// logger->log("have unequip");
+// logger->log("have unequip %d", sprite);
int equipmentSlot = Net::getInventoryHandler()
->convertFromServerSlot(sprite);
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index ea4978a20..9c75689a4 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -674,6 +674,14 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
dstBeing->setSprite(SPRITE_MISC2, id);
player_node->imitateOutfit(dstBeing, SPRITE_MISC2);
break;
+ case 14:
+ dstBeing->setSprite(SPRITE_EVOL1, id);
+ player_node->imitateOutfit(dstBeing, SPRITE_EVOL1);
+ break;
+ case 15:
+ dstBeing->setSprite(SPRITE_EVOL2, id);
+ player_node->imitateOutfit(dstBeing, SPRITE_EVOL2);
+ break;
default:
logger->log("QQQ3 CHANGE_LOOKS: unsupported type: "
"%d, id: %d", type, id);
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index b4b38e623..3cc0e9ce0 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -77,8 +77,8 @@ const Equipment::Slot EQUIP_CONVERT[] =
Equipment::EQUIP_GLOVES_SLOT, // SPRITE_GLOVES
Equipment::EQUIP_FIGHT1_SLOT, // SPRITE_WEAPON
Equipment::EQUIP_FIGHT2_SLOT, // SPRITE_SHIELD
- Equipment::EQUIP_PROJECTILE_SLOT, // 0
- Equipment::EQUIP_PROJECTILE_SLOT, // 0
+ Equipment::EQUIP_EVOL_RING1_SLOT, // SPRITE_EVOL1
+ Equipment::EQUIP_EVOL_RING2_SLOT, // SPRITE_EVOL2
Equipment::EQUIP_PROJECTILE_SLOT, // 0
};
diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h
index 6001fae3b..83854c4c6 100644
--- a/src/net/tmwa/protocol.h
+++ b/src/net/tmwa/protocol.h
@@ -59,6 +59,8 @@ enum
SPRITE_GLOVES,
SPRITE_WEAPON,
SPRITE_SHIELD,
+ SPRITE_EVOL1,
+ SPRITE_EVOL2,
SPRITE_VECTOREND
};