diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-21 14:40:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-21 14:40:14 +0300 |
commit | 0875a6ddfda9ece1af4a818e38be1f99e578c59a (patch) | |
tree | 7bef19d2a2f41f090be11dfe5a8af88716e7b21c /src/gui | |
parent | 40a60a7bb7fd3291fde0a2a689f674a8169c7b64 (diff) | |
download | plus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.tar.gz plus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.tar.bz2 plus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.tar.xz plus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.zip |
Add to item field favorite.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/widgets/itemcontainer.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/tradewindow.h | 4 |
5 files changed, 17 insertions, 9 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp index 87c599fb6..732e9e738 100644 --- a/src/gui/widgets/itemcontainer.cpp +++ b/src/gui/widgets/itemcontainer.cpp @@ -553,7 +553,9 @@ void ItemContainer::mouseReleased(MouseEvent &event) if (item && !PlayerInfo::isItemProtected(item->getId())) { mInventory->addItem(item->getId(), 1, 1, item->getColor(), - item->getIdentified(), item->getDamaged(), false, false); + item->getIdentified(), item->getDamaged(), + item->getFavorite(), + false, false); } return; } diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index c301e14ee..6eb51de98 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, false); + mItem = new Item(id, 10000, 0, 1, true, false, false, false, false); if (mUsage == ShopBuyAdd) mMax = 10000; diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index 5360489cb..e547e9abd 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -468,7 +468,9 @@ void NpcDialog::action(const ActionEvent &event) if (item) { mInventory->addItem(item->getId(), 1, 1, item->getColor(), - item->getIdentified(), item->getDamaged(), false, false); + item->getIdentified(), item->getDamaged(), + item->getFavorite(), + false, false); } } } diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp index 0ffbcd34a..6bf091625 100644 --- a/src/gui/windows/tradewindow.cpp +++ b/src/gui/windows/tradewindow.cpp @@ -196,17 +196,18 @@ void TradeWindow::addItem(const int id, const uint8_t refine, const unsigned char color, const bool identified, - const bool damaged) const + const bool damaged, + const bool favorite) const { if (own) { mMyInventory->addItem(id, quantity, refine, color, - identified, damaged, false, false); + identified, damaged, favorite, false, false); } else { mPartnerInventory->addItem(id, quantity, refine, color, - identified, damaged, false, false); + identified, damaged, favorite, false, false); } } @@ -217,17 +218,18 @@ void TradeWindow::addItem2(const int id, const unsigned char color, const bool identified, const bool damaged, + const bool favorite, const bool equipment) const { if (own) { mMyInventory->addItem(id, quantity, refine, color, - identified, damaged, equipment, false); + identified, damaged, favorite, equipment, false); } else { mPartnerInventory->addItem(id, quantity, refine, color, - identified, damaged, equipment, false); + identified, damaged, favorite, equipment, false); } } diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h index 2efe5cde7..8f8067902 100644 --- a/src/gui/windows/tradewindow.h +++ b/src/gui/windows/tradewindow.h @@ -73,7 +73,8 @@ class TradeWindow final : public Window, const uint8_t refine, const unsigned char color, const bool identified, - const bool damaged) const; + const bool damaged, + const bool favorite) const; /** * Reset both item containers @@ -90,6 +91,7 @@ class TradeWindow final : public Window, const unsigned char color, const bool identified, const bool damaged, + const bool favorite, const bool equipment) const; /** |