summaryrefslogtreecommitdiff
path: root/src/itemshortcut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/itemshortcut.cpp')
-rw-r--r--src/itemshortcut.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/itemshortcut.cpp b/src/itemshortcut.cpp
index 0627ccda..2dea8c56 100644
--- a/src/itemshortcut.cpp
+++ b/src/itemshortcut.cpp
@@ -1,9 +1,8 @@
/*
- * Aethyra
+ * The Mana World
* Copyright (C) 2007 The Mana World Development Team
*
- * This file is part of Aethyra based on original code
- * from The Mana World.
+ * This file is part of The Mana World.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,14 +72,20 @@ void ItemShortcut::useItem(int index)
{
if (item->isEquipment())
{
+#ifdef EATHENA_SUPPORT
if (item->isEquipped())
player_node->unequipItem(item);
else
+#endif
player_node->equipItem(item);
}
else
{
+#ifdef TMWSERV_SUPPORT
+ player_node->useItem(item->getInvIndex());
+#else
player_node->useItem(item);
+#endif
}
}
}