summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dragdrop.h2
-rw-r--r--src/enums/dragdropsource.h4
-rw-r--r--src/gui/widgets/itemcontainer.cpp13
3 files changed, 15 insertions, 4 deletions
diff --git a/src/dragdrop.h b/src/dragdrop.h
index 773d26553..814434124 100644
--- a/src/dragdrop.h
+++ b/src/dragdrop.h
@@ -225,7 +225,9 @@ class DragDrop final
{
return mSource == DRAGDROP_SOURCE_INVENTORY
|| mSource == DRAGDROP_SOURCE_STORAGE
+#ifdef EATHENA_SUPPORT
|| mSource == DRAGDROP_SOURCE_CART
+#endif
|| mSource == DRAGDROP_SOURCE_TRADE
|| mSource == DRAGDROP_SOURCE_OUTFIT
|| mSource == DRAGDROP_SOURCE_GROUND
diff --git a/src/enums/dragdropsource.h b/src/enums/dragdropsource.h
index aecd46287..37ec91d79 100644
--- a/src/enums/dragdropsource.h
+++ b/src/enums/dragdropsource.h
@@ -26,7 +26,6 @@ enum DragDropSource
DRAGDROP_SOURCE_EMPTY = 0,
DRAGDROP_SOURCE_INVENTORY,
DRAGDROP_SOURCE_STORAGE,
- DRAGDROP_SOURCE_CART,
DRAGDROP_SOURCE_TRADE,
DRAGDROP_SOURCE_OUTFIT,
DRAGDROP_SOURCE_SPELLS,
@@ -37,7 +36,10 @@ enum DragDropSource
DRAGDROP_SOURCE_CRAFT,
DRAGDROP_SOURCE_NPC,
DRAGDROP_SOURCE_EQUIPMENT,
+#ifdef EATHENA_SUPPORT
+ DRAGDROP_SOURCE_CART,
DRAGDROP_SOURCE_MAIL
+#endif
};
#endif // ENUMS_DRAGDROPSOURCE_H
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 723f043d7..f7dec4452 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -418,10 +418,10 @@ void ItemContainer::mousePressed(MouseEvent &event)
case InventoryType::NPC:
src = DRAGDROP_SOURCE_NPC;
break;
+#ifdef EATHENA_SUPPORT
case InventoryType::CART:
src = DRAGDROP_SOURCE_CART;
break;
-#ifdef EATHENA_SUPPORT
case InventoryType::MAIL:
src = DRAGDROP_SOURCE_MAIL;
break;
@@ -529,10 +529,10 @@ void ItemContainer::mouseReleased(MouseEvent &event)
case InventoryType::MAIL:
dst = DRAGDROP_SOURCE_MAIL;
break;
-#endif
case InventoryType::CART:
dst = DRAGDROP_SOURCE_CART;
break;
+#endif
default:
#ifdef EATHENA_SUPPORT
case InventoryType::VENDING:
@@ -596,7 +596,10 @@ void ItemContainer::mouseReleased(MouseEvent &event)
}
else if (src == DRAGDROP_SOURCE_INVENTORY
&& (dst == DRAGDROP_SOURCE_NPC
- || dst == DRAGDROP_SOURCE_MAIL))
+#ifdef EATHENA_SUPPORT
+ || dst == DRAGDROP_SOURCE_MAIL
+#endif
+ ))
{
inventory = PlayerInfo::getInventory();
const Item *const item = inventory->getItem(dragDrop.getTag());
@@ -614,7 +617,11 @@ void ItemContainer::mouseReleased(MouseEvent &event)
}
return;
}
+#ifdef EATHENA_SUPPORT
else if (src == DRAGDROP_SOURCE_NPC || src == DRAGDROP_SOURCE_MAIL)
+#else
+ else if (src == DRAGDROP_SOURCE_NPC)
+#endif
{
inventory = PlayerInfo::getInventory();
const Item *const item = inventory->getItem(dragDrop.getTag());