summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-21 01:13:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-21 01:13:46 +0300
commit76e55447563fae6f8d17f2fd90231c81e0b3f927 (patch)
treefa0b2b5daaa50149329f12b7f47b28901d95cc79 /src/gui
parent8d12abe6ff4114a04b8fc9549e8f44683fed9e3d (diff)
downloadplus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.gz
plus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.bz2
plus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.xz
plus-76e55447563fae6f8d17f2fd90231c81e0b3f927.zip
Add to item field identified.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/gui/windows/tradewindow.cpp26
-rw-r--r--src/gui/windows/tradewindow.h16
5 files changed, 34 insertions, 14 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 784fc56db..8f8f886da 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(),
- false, false);
+ item->getIdentified(), false, false);
}
return;
}
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 975cbbd20..31c6c8adc 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, false, false);
+ mItem = new Item(id, 10000, 0, 1, true, false, false);
if (mUsage == ShopBuyAdd)
mMax = 10000;
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index c0551299b..ff434c07c 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(),
- false, false);
+ item->getIdentified(), false, false);
}
}
}
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 1f4325413..34164758c 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -194,26 +194,38 @@ void TradeWindow::addItem(const int id,
const bool own,
const int quantity,
const uint8_t refine,
- const unsigned char color) const
+ const unsigned char color,
+ const bool identified) const
{
if (own)
- mMyInventory->addItem(id, quantity, refine, color, false, false);
+ {
+ mMyInventory->addItem(id, quantity, refine, color,
+ identified, false, false);
+ }
else
- mPartnerInventory->addItem(id, quantity, refine, color, false, false);
+ {
+ mPartnerInventory->addItem(id, quantity, refine, color,
+ identified, false, false);
+ }
}
-void TradeWindow::addItem2(const int id, const bool own, const int quantity,
- const uint8_t refine, const unsigned char color,
+void TradeWindow::addItem2(const int id,
+ const bool own,
+ const int quantity,
+ const uint8_t refine,
+ const unsigned char color,
+ const bool identified,
const bool equipment) const
{
if (own)
{
- mMyInventory->addItem(id, quantity, refine, color, equipment, false);
+ mMyInventory->addItem(id, quantity, refine, color,
+ identified, equipment, false);
}
else
{
mPartnerInventory->addItem(id, quantity, refine, color,
- equipment, false);
+ identified, equipment, false);
}
}
diff --git a/src/gui/windows/tradewindow.h b/src/gui/windows/tradewindow.h
index 0c01c81cd..ef60b051e 100644
--- a/src/gui/windows/tradewindow.h
+++ b/src/gui/windows/tradewindow.h
@@ -67,8 +67,12 @@ class TradeWindow final : public Window,
/**
* Add an item to the trade window.
*/
- void addItem(const int id, const bool own, const int quantity,
- const uint8_t refine, const unsigned char color) const;
+ void addItem(const int id,
+ const bool own,
+ const int quantity,
+ const uint8_t refine,
+ const unsigned char color,
+ const bool identified) const;
/**
* Reset both item containers
@@ -78,8 +82,12 @@ class TradeWindow final : public Window,
/**
* Add an item to the trade window.
*/
- void addItem2(const int id, const bool own, const int quantity,
- const uint8_t refine, const unsigned char color,
+ void addItem2(const int id,
+ const bool own,
+ const int quantity,
+ const uint8_t refine,
+ const unsigned char color,
+ const bool identified,
const bool equipment) const;
/**