summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.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/gui/popupmenu.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/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index c46f673c..6f2f9be4 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -38,6 +38,7 @@
#include "playerrelations.h"
#include "net/adminhandler.h"
+#include "net/inventoryhandler.h"
#include "net/net.h"
#include "resources/itemdb.h"
@@ -259,14 +260,10 @@ void PopupMenu::handleLink(const std::string &link)
assert(mItem);
if (mItem->isEquipment())
{
-#ifdef TMWSERV_SUPPORT
- player_node->equipItem(mItem);
-#else
if (mItem->isEquipped())
player_node->unequipItem(mItem);
else
player_node->equipItem(mItem);
-#endif
}
else
{
@@ -357,12 +354,10 @@ void PopupMenu::showPopup(int x, int y, Item *item, bool isInventory)
mBrowserBox->addRow(_("@@drop|Drop@@"));
-#ifdef TMWSERV_SUPPORT
- if (!item->isEquipment())
+ if (Net::getInventoryHandler()->canSplit(item))
{
mBrowserBox->addRow(_("@@split|Split@@"));
}
-#endif
if (player_node->getInStorage())
{