summaryrefslogtreecommitdiff
path: root/src/net/tmwa/tradehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-10 13:44:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-10 22:49:59 +0300
commitf3f7879c48fe8e202c3519cd465225645949167e (patch)
tree898a86c3446d988e86d7c3f160036533bdfd6475 /src/net/tmwa/tradehandler.cpp
parent37d7bd3163ad58391df36363b6f0135c638fbeb8 (diff)
downloadmv-f3f7879c48fe8e202c3519cd465225645949167e.tar.gz
mv-f3f7879c48fe8e202c3519cd465225645949167e.tar.bz2
mv-f3f7879c48fe8e202c3519cd465225645949167e.tar.xz
mv-f3f7879c48fe8e202c3519cd465225645949167e.zip
Add typed bool type Identified.
Diffstat (limited to 'src/net/tmwa/tradehandler.cpp')
-rw-r--r--src/net/tmwa/tradehandler.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/net/tmwa/tradehandler.cpp b/src/net/tmwa/tradehandler.cpp
index f16ee8c1f..53336bb24 100644
--- a/src/net/tmwa/tradehandler.cpp
+++ b/src/net/tmwa/tradehandler.cpp
@@ -29,6 +29,8 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
+#include "enums/simpletypes.h"
+
#include "gui/windows/confirmdialog.h"
#include "gui/windows/tradewindow.h"
@@ -192,14 +194,18 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg)
tradeWindow->addItem2(type, 0,
cards, 4,
false, amount,
- refine, identify, true, false, false, false);
+ refine,
+ identify,
+ Identified_True, false, false, false);
}
else
{
tradeWindow->addItem2(type, 0,
cards, 4,
false, amount,
- refine, 1, identify != 0, false, false, false);
+ refine, 1,
+ fromBool(identify, Identified),
+ false, false, false);
}
}
}
@@ -228,11 +234,18 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg)
// Successfully added item
if (tradeWindow)
{
- tradeWindow->addItem2(item->getId(), item->getType(),
- item->getCards(), 4,
- true, quantity, item->getRefine(), item->getColor(),
- item->getIdentified(), item->getDamaged(),
- item->getFavorite(), item->isEquipment());
+ tradeWindow->addItem2(item->getId(),
+ item->getType(),
+ item->getCards(),
+ 4,
+ true,
+ quantity,
+ item->getRefine(),
+ item->getColor(),
+ item->getIdentified(),
+ item->getDamaged(),
+ item->getFavorite(),
+ item->isEquipment());
}
item->increaseQuantity(-quantity);
break;