diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-21 12:30:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-21 12:30:17 +0300 |
commit | 40a60a7bb7fd3291fde0a2a689f674a8169c7b64 (patch) | |
tree | 9410a23feea6c6248612afdc8968a1c04306e5b0 /src/gui | |
parent | 76e55447563fae6f8d17f2fd90231c81e0b3f927 (diff) | |
download | manaverse-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.gz manaverse-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.bz2 manaverse-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.xz manaverse-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.zip |
Add to item field damaged.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.h | 4 |
5 files changed, 13 insertions, 9 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 8f8f886da..87c599fb6 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -553,7 +553,7 @@ void ItemContainer::mouseReleased(MouseEvent &event) if (item && !PlayerInfo::isItemProtected(item->getId())) { mInventory->addItem(item->getId(), 1, 1, item->getColor(), - item->getIdentified(), false, false); + item->getIdentified(), item->getDamaged(), false, false); } return; } diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index 31c6c8adc..c301e14ee 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, 0, 1, true, false, false); + mItem = new Item(id, 10000, 0, 1, true, false, false, false); if (mUsage == ShopBuyAdd) mMax = 10000; diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index ff434c07c..5360489cb 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -468,7 +468,7 @@ void NpcDialog::action(const ActionEvent &event) if (item) { mInventory->addItem(item->getId(), 1, 1, item->getColor(), - item->getIdentified(), false, false); + item->getIdentified(), item->getDamaged(), false, false); } } } diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 34164758c..0ffbcd34a 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -195,17 +195,18 @@ void TradeWindow::addItem(const int id, const int quantity, const uint8_t refine, const unsigned char color, - const bool identified) const + const bool identified, + const bool damaged) const { if (own) { mMyInventory->addItem(id, quantity, refine, color, - identified, false, false); + identified, damaged, false, false); } else { mPartnerInventory->addItem(id, quantity, refine, color, - identified, false, false); + identified, damaged, false, false); } } @@ -215,17 +216,18 @@ void TradeWindow::addItem2(const int id, const uint8_t refine, const unsigned char color, const bool identified, + const bool damaged, const bool equipment) const { if (own) { mMyInventory->addItem(id, quantity, refine, color, - identified, equipment, false); + identified, damaged, equipment, false); } else { mPartnerInventory->addItem(id, quantity, refine, color, - identified, equipment, false); + identified, damaged, equipment, false); } } diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h index ef60b051e..2efe5cde7 100644 --- a/src/gui/windows/tradewindow.h +++ b/src/gui/windows/tradewindow.h @@ -72,7 +72,8 @@ class TradeWindow final : public Window, const int quantity, const uint8_t refine, const unsigned char color, - const bool identified) const; + const bool identified, + const bool damaged) const; /** * Reset both item containers @@ -88,6 +89,7 @@ class TradeWindow final : public Window, const uint8_t refine, const unsigned char color, const bool identified, + const bool damaged, const bool equipment) const; /** |