diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-20 18:43:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-20 18:43:00 +0300 |
commit | a9877525597aa94f1d974b8f45567b4168cf6c8e (patch) | |
tree | 56673d8e770302a2846f1d1db0db1a890bba95cd /src/gui | |
parent | 2ce675592a1a96cc9960082485797045a921676d (diff) | |
download | plus-a9877525597aa94f1d974b8f45567b4168cf6c8e.tar.gz plus-a9877525597aa94f1d974b8f45567b4168cf6c8e.tar.bz2 plus-a9877525597aa94f1d974b8f45567b4168cf6c8e.tar.xz plus-a9877525597aa94f1d974b8f45567b4168cf6c8e.zip |
Remove item default parameters.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.cpp | 13 |
4 files changed, 18 insertions, 7 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 0ea19ea59..784fc56db 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -551,7 +551,10 @@ void ItemContainer::mouseReleased(MouseEvent &event) inventory = PlayerInfo::getInventory(); const Item *const item = inventory->getItem(dragDrop.getTag()); if (item && !PlayerInfo::isItemProtected(item->getId())) - mInventory->addItem(item->getId(), 1, 1, item->getColor()); + { + mInventory->addItem(item->getId(), 1, 1, item->getColor(), + false, false); + } return; } else if (src == DRAGDROP_SOURCE_NPC) diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 03bb4feb1..975cbbd20 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -319,7 +319,7 @@ void ItemAmountWindow::action(const ActionEvent &event) const int id = ItemDB::get(mItemsModal->getElementAt( mItemDropDown->getSelected())).getId(); - mItem = new Item(id, 10000); + mItem = new Item(id, 10000, 0, 1, false, false); if (mUsage == ShopBuyAdd) mMax = 10000; diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index cca950a66..c0551299b 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -466,7 +466,10 @@ void NpcDialog::action(const ActionEvent &event) { const Item *const item = inventoryWindow->getSelectedItem(); if (item) - mInventory->addItem(item->getId(), 1, 1, item->getColor()); + { + mInventory->addItem(item->getId(), 1, 1, item->getColor(), + false, false); + } } } } diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index a3a6781ef..1f4325413 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -197,9 +197,9 @@ void TradeWindow::addItem(const int id, const unsigned char color) const { if (own) - mMyInventory->addItem(id, quantity, refine, color); + mMyInventory->addItem(id, quantity, refine, color, false, false); else - mPartnerInventory->addItem(id, quantity, refine, color); + mPartnerInventory->addItem(id, quantity, refine, color, false, false); } void TradeWindow::addItem2(const int id, const bool own, const int quantity, @@ -207,9 +207,14 @@ void TradeWindow::addItem2(const int id, const bool own, const int quantity, const bool equipment) const { if (own) - mMyInventory->addItem(id, quantity, refine, color, equipment); + { + mMyInventory->addItem(id, quantity, refine, color, equipment, false); + } else - mPartnerInventory->addItem(id, quantity, refine, color, equipment); + { + mPartnerInventory->addItem(id, quantity, refine, color, + equipment, false); + } } void TradeWindow::changeQuantity(const int index, const bool own, |