From 4b0f30b1e1879cee6d65394d826bba21eca6c40b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Apr 2015 01:36:13 +0300 Subject: Allos send items by mail. --- src/gui/widgets/itemcontainer.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 6d2c72c5c..723f043d7 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -421,6 +421,11 @@ void ItemContainer::mousePressed(MouseEvent &event) case InventoryType::CART: src = DRAGDROP_SOURCE_CART; break; +#ifdef EATHENA_SUPPORT + case InventoryType::MAIL: + src = DRAGDROP_SOURCE_MAIL; + break; +#endif default: #ifdef EATHENA_SUPPORT case InventoryType::VENDING: @@ -520,6 +525,11 @@ void ItemContainer::mouseReleased(MouseEvent &event) case InventoryType::NPC: dst = DRAGDROP_SOURCE_NPC; break; +#ifdef EATHENA_SUPPORT + case InventoryType::MAIL: + dst = DRAGDROP_SOURCE_MAIL; + break; +#endif case InventoryType::CART: dst = DRAGDROP_SOURCE_CART; break; @@ -585,7 +595,8 @@ void ItemContainer::mouseReleased(MouseEvent &event) inventory = PlayerInfo::getInventory(); } else if (src == DRAGDROP_SOURCE_INVENTORY - && dst == DRAGDROP_SOURCE_NPC) + && (dst == DRAGDROP_SOURCE_NPC + || dst == DRAGDROP_SOURCE_MAIL)) { inventory = PlayerInfo::getInventory(); const Item *const item = inventory->getItem(dragDrop.getTag()); @@ -603,7 +614,7 @@ void ItemContainer::mouseReleased(MouseEvent &event) } return; } - else if (src == DRAGDROP_SOURCE_NPC) + else if (src == DRAGDROP_SOURCE_NPC || src == DRAGDROP_SOURCE_MAIL) { inventory = PlayerInfo::getInventory(); const Item *const item = inventory->getItem(dragDrop.getTag()); -- cgit v1.2.3-70-g09d2