summaryrefslogtreecommitdiff
path: root/src/net/tmwa/tradehandler.cpp
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/net/tmwa/tradehandler.cpp
parent8d12abe6ff4114a04b8fc9549e8f44683fed9e3d (diff)
downloadmanaverse-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.gz
manaverse-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.bz2
manaverse-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.xz
manaverse-76e55447563fae6f8d17f2fd90231c81e0b3f927.zip
Add to item field identified.
Diffstat (limited to 'src/net/tmwa/tradehandler.cpp')
-rw-r--r--src/net/tmwa/tradehandler.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp
index 12e6b94ab..5598d3781 100644
--- a/src/net/tmwa/tradehandler.cpp
+++ b/src/net/tmwa/tradehandler.cpp
@@ -30,6 +30,8 @@
#include "gui/windows/tradewindow.h"
+#include "net/serverfeatures.h"
+
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocol.h"
@@ -178,8 +180,16 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
}
else
{
- tradeWindow->addItem2(type, false, amount,
- refine, identify, false);
+ if (serverFeatures->haveItemColors())
+ {
+ tradeWindow->addItem2(type, false, amount,
+ refine, identify, true, false);
+ }
+ else
+ {
+ tradeWindow->addItem2(type, false, amount,
+ refine, 1, identify != 0, false);
+ }
}
}
}
@@ -209,7 +219,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
{
tradeWindow->addItem2(item->getId(), true,
quantity, item->getRefine(), item->getColor(),
- item->isEquipment());
+ item->getIdentified(), item->isEquipment());
}
item->increaseQuantity(-quantity);
break;