summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Sinicyn <andrej4000@gmail.com>2005-07-31 15:19:13 +0000
committerAndrej Sinicyn <andrej4000@gmail.com>2005-07-31 15:19:13 +0000
commit51bfbd368cc455b037393d3383346640113e915b (patch)
tree7b6bffca7782b557218d481ae47f7d72e530b64c
parent2ec5340b9c5f80094fdce43fa7735d3af5d5982f (diff)
downloadmana-client-51bfbd368cc455b037393d3383346640113e915b.tar.gz
mana-client-51bfbd368cc455b037393d3383346640113e915b.tar.bz2
mana-client-51bfbd368cc455b037393d3383346640113e915b.tar.xz
mana-client-51bfbd368cc455b037393d3383346640113e915b.zip
Don't allow more than one request trade dialog at once.
-rw-r--r--ChangeLog5
-rw-r--r--src/game.cpp6
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f47d6fd..2d643abd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,7 @@
2005-07-31 Andrej Sinicyn <andrej4000@gmail.com>
- * src/game.cpp: Don't allow more than one trade dialog at once; if a
- trade is canceled on the other side, close the trade
- window.
+ * src/game.cpp: Don't allow more than one trade dialog or requesting it at
+ once; if a trade is canceled on the other side, close the trade window.
2005-07-30 Andrej Sinicyn <andrej4000@gmail.com>
diff --git a/src/game.cpp b/src/game.cpp
index 24fe3723..b550bc43 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -79,6 +79,7 @@ ConfirmDialog *exitConfirm = NULL;
Being *target = NULL;
Inventory *inventory = NULL;
+RequestTradeDialog *requestTradeDialog = NULL;
const int EMOTION_TIME = 150; /**< Duration of emotion icon */
const int MAX_TIME = 10000;
@@ -1090,7 +1091,10 @@ void do_parse()
WFIFOSET(3);
break;
}
- new RequestTradeDialog(RFIFOP(2));
+ if (requestTradeDialog == NULL)
+ {
+ requestTradeDialog = new RequestTradeDialog(RFIFOP(2));
+ }
break;
// Trade: Response