summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrej Sinicyn <andrej4000@gmail.com>2005-08-02 22:42:21 +0000
committerAndrej Sinicyn <andrej4000@gmail.com>2005-08-02 22:42:21 +0000
commitffce96d70949fa57cf512edcd3429b0fdf71a61b (patch)
tree2b72c5b4d7c12b19c2286523034ebfb6b11c511f /src/game.cpp
parentbb2a8884e394094da40f82886eacb21c1f798eaf (diff)
downloadmana-ffce96d70949fa57cf512edcd3429b0fdf71a61b.tar.gz
mana-ffce96d70949fa57cf512edcd3429b0fdf71a61b.tar.bz2
mana-ffce96d70949fa57cf512edcd3429b0fdf71a61b.tar.xz
mana-ffce96d70949fa57cf512edcd3429b0fdf71a61b.zip
Fix my previous fix because it broke my own code.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp
index f18dc6f6..7fb031e5 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -80,7 +80,7 @@ ConfirmDialog *exitConfirm = NULL;
Being *target = NULL;
Inventory *inventory = NULL;
-RequestTradeDialog *requestTradeDialog = NULL;
+bool requestTradeDialogOpen = false;
const int EMOTION_TIME = 150; /**< Duration of emotion icon */
const int MAX_TIME = 10000;
@@ -1094,12 +1094,12 @@ void do_parse()
WFIFOSET(3);
break;
}
- if (requestTradeDialog == NULL)
+ if (!requestTradeDialogOpen)
{
+ requestTradeDialogOpen = true;
strcpy(tradePartnerName, RFIFOP(2));
- requestTradeDialog = new RequestTradeDialog(RFIFOP(2));
+ new RequestTradeDialog(RFIFOP(2));
}
- requestTradeDialog = NULL;
break;
// Trade: Response
@@ -1123,6 +1123,7 @@ void do_parse()
tradeWindow->reset();
tradeWindow->setCaption((std::string)"Trade: You and " + (std::string)tradePartnerName);
tradeWindow->setVisible(true);
+ requestTradeDialogOpen = false;
break;
case 4:
// Trade cancelled