summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-06 08:22:19 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-06 08:22:19 -0600
commit429e82f91487d48ecb5a1742ec6fb6987a2bc9bd (patch)
treed3789c7ef91680ba6a6a0eee56664ba3de690d94 /src/localplayer.cpp
parent678c2316e34021bb16ac08eb48186f5570dc691b (diff)
downloadmana-429e82f91487d48ecb5a1742ec6fb6987a2bc9bd.tar.gz
mana-429e82f91487d48ecb5a1742ec6fb6987a2bc9bd.tar.bz2
mana-429e82f91487d48ecb5a1742ec6fb6987a2bc9bd.tar.xz
mana-429e82f91487d48ecb5a1742ec6fb6987a2bc9bd.zip
Remove more inventory handling support #ifdefs
This also fixes some minor bugs and centralizes some logic.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 11c142cc..afd7f0eb 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -348,15 +348,7 @@ void LocalPlayer::inviteToParty(Player *player)
void LocalPlayer::moveInvItem(Item *item, int newIndex)
{
- // special case, the old and new cannot copy over each other.
- if (item->getInvIndex() == newIndex)
- return;
-
-#ifdef TMWSERV_SUPPORT
- Net::GameServer::Player::moveItem(
- item->getInvIndex(), newIndex, item->getQuantity());
-#endif
- // TODO: eAthena support
+ Net::getInventoryHandler()->moveItem(item->getInvIndex(), newIndex);
}
void LocalPlayer::equipItem(Item *item)
@@ -386,17 +378,10 @@ void LocalPlayer::dropItem(Item *item, int quantity)
Net::getInventoryHandler()->dropItem(item, quantity);
}
-#ifdef TMWSERV_SUPPORT
void LocalPlayer::splitItem(Item *item, int quantity)
{
- int newIndex = mInventory->getFreeSlot();
- if (newIndex > Inventory::NO_SLOT_INDEX)
- {
- Net::GameServer::Player::moveItem(
- item->getInvIndex(), newIndex, quantity);
- }
+ Net::getInventoryHandler()->splitItem(item, quantity);
}
-#endif
void LocalPlayer::pickUp(FloorItem *item)
{