summaryrefslogtreecommitdiff
path: root/src/gui/windows/itemamountwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-23 18:42:30 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-23 20:55:58 +0300
commitbfdee54a34531631a021f9f112186504cebde4c7 (patch)
treee49dfa982d7724497c8a7a433285e833410a0bb1 /src/gui/windows/itemamountwindow.cpp
parent79864826790a33a3583819fe02893eed010381d9 (diff)
downloadmv-bfdee54a34531631a021f9f112186504cebde4c7.tar.gz
mv-bfdee54a34531631a021f9f112186504cebde4c7.tar.bz2
mv-bfdee54a34531631a021f9f112186504cebde4c7.tar.xz
mv-bfdee54a34531631a021f9f112186504cebde4c7.zip
Add partial adding items into new mail message.
Diffstat (limited to 'src/gui/windows/itemamountwindow.cpp')
-rw-r--r--src/gui/windows/itemamountwindow.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index d31e263c4..100ad748a 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -22,6 +22,8 @@
#include "gui/windows/itemamountwindow.h"
+#include "settings.h"
+
#include "being/playerinfo.h"
#include "input/keyboardconfig.h"
@@ -47,6 +49,7 @@
#include "gui/widgets/slider.h"
#include "net/inventoryhandler.h"
+#include "net/mail2handler.h"
#include "net/npchandler.h"
#include "resources/item/item.h"
@@ -104,8 +107,14 @@ void ItemAmountWindow::finish(Item *const item,
item->getInvIndex(), amount, InventoryType::Inventory);
break;
case ItemAmountWindowUsage::MailAdd:
- if (mailEditWindow != nullptr)
+ if (settings.enableNewMailSystem)
+ {
+ mail2Handler->addItem(item, amount);
+ }
+ else if (mailEditWindow != nullptr)
+ {
mailEditWindow->addItem(item, amount);
+ }
break;
case ItemAmountWindowUsage::CraftAdd:
{