summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJan-Fabian Humann <malastare@gmx.net>2005-04-07 20:43:13 +0000
committerJan-Fabian Humann <malastare@gmx.net>2005-04-07 20:43:13 +0000
commitf0f9ef367f769b861748595b6e67991cea4b1613 (patch)
treedcf67ec60aa2bd1f3c776e155a3dae32d9143b24 /src/game.cpp
parent0f25aa9db4ee635cd25d14b20e0c9cdee8c7702f (diff)
downloadmana-f0f9ef367f769b861748595b6e67991cea4b1613.tar.gz
mana-f0f9ef367f769b861748595b6e67991cea4b1613.tar.bz2
mana-f0f9ef367f769b861748595b6e67991cea4b1613.tar.xz
mana-f0f9ef367f769b861748595b6e67991cea4b1613.zip
trade updated: trade is now possible, but some bugs are still to be fixed by me and zeny and different amount trading will need to be implemented
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 3082ff05..40118805 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -799,6 +799,8 @@ void do_parse() {
break;
// Trade: Item add response
case 0x00ea:
+ tradeWindow->setTradeButton(false);
+ //chatWindow->chat_log("add response got", BY_SERVER);
switch (RFIFOB(4)) {
case 0:
// Successfully added item
@@ -827,13 +829,32 @@ void do_parse() {
break;
}
break;
-
+ // Trade: Received Ok message
+ case 0x00ec:
+ switch (RFIFOB(2)) {
+ // Received ok from myself
+ case 0:
+ tradeWindow->receivedOk(true);
+ break;
+ // Received ok from the other
+ case 1:
+ tradeWindow->receivedOk(false);
+ break;
+ }
+ break;
// Trade: Trade cancelled
case 0x00ee:
chatWindow->chat_log("Trade cancelled.", BY_SERVER);
tradeWindow->setVisible(false);
tradeWindow->reset();
break;
+
+ // Trade: Trade completed
+ case 0x00f0:
+ chatWindow->chat_log("Trade completed.", BY_SERVER);
+ tradeWindow->setVisible(false);
+ tradeWindow->reset();
+ break;
// Get the items
// Only called on map load / warp
@@ -854,6 +875,7 @@ void do_parse() {
chatWindow->chat_log(info, BY_SERVER);*/
}
break;
+
// Get the equipments
case 0x00a4:
for (int loop = 0; loop < (RFIFOW(2) - 4) / 20; loop++) {