diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 9 |
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 |