From 0875a6ddfda9ece1af4a818e38be1f99e578c59a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Oct 2014 14:40:14 +0300 Subject: Add to item field favorite. --- src/gui/windows/itemamountwindow.cpp | 2 +- src/gui/windows/npcdialog.cpp | 4 +++- src/gui/windows/tradewindow.cpp | 12 +++++++----- src/gui/windows/tradewindow.h | 4 +++- 4 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/gui/windows') 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; /** -- cgit v1.2.3-70-g09d2