summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-31 21:29:00 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-07-31 21:29:00 +0000
commit36d28236321b6a2824ad4f394faeabbf79626808 (patch)
tree7d2475acf84852f2a21cc29eecbf7524cd58ff52 /src/localplayer.cpp
parentc9f930c759004e179545c3b82992e3f8a12345f2 (diff)
downloadmana-client-36d28236321b6a2824ad4f394faeabbf79626808.tar.gz
mana-client-36d28236321b6a2824ad4f394faeabbf79626808.tar.bz2
mana-client-36d28236321b6a2824ad4f394faeabbf79626808.tar.xz
mana-client-36d28236321b6a2824ad4f394faeabbf79626808.zip
Removed legacy inventory code. Added display of equipment.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 5945127f..b4fc5957 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -95,16 +95,6 @@ void LocalPlayer::clearInventory()
mInventory->clear();
}
-void LocalPlayer::addInvItem(int id, int quantity, bool equipment)
-{
- mInventory->addItem(id, quantity, equipment);
-}
-
-void LocalPlayer::addInvItem(int index, int id, int quantity, bool equipment)
-{
- mInventory->addItem(index, id, quantity, equipment);
-}
-
Item* LocalPlayer::getInvItem(int index)
{
return mInventory->getItem(index);
@@ -115,11 +105,8 @@ void LocalPlayer::equipItem(Item *item)
Net::GameServer::Player::equip(item->getInvIndex());
}
-void LocalPlayer::unequipItem(Item *item)
+void LocalPlayer::unequipItem(int slot)
{
- if (!item)
- return;
-
// XXX Convert for new server
/*
MessageOut outMsg(CMSG_PLAYER_UNEQUIP);
@@ -127,7 +114,7 @@ void LocalPlayer::unequipItem(Item *item)
*/
// Tidy equipment directly to avoid weapon still shown bug, by instance
- mEquipment->removeEquipment(item);
+ mEquipment->setEquipment(slot, 0);
}
void LocalPlayer::useItem(Item *item)