summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-02-06 10:55:17 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-02-06 10:55:17 +0000
commit3682f65a24ccd98b51f076ab3b89866ab363dd95 (patch)
tree5a1a299ce3706159d2c0e705126b4b3d7cfb4464 /src/net
parenta626ab48948941c3ec86d3ee6a3ab3bc2a98538c (diff)
downloadmana-3682f65a24ccd98b51f076ab3b89866ab363dd95.tar.gz
mana-3682f65a24ccd98b51f076ab3b89866ab363dd95.tar.bz2
mana-3682f65a24ccd98b51f076ab3b89866ab363dd95.tar.xz
mana-3682f65a24ccd98b51f076ab3b89866ab363dd95.zip
Updated Dev-Cpp project file, fixed a gcc 3.4 issue.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tradehandler.cpp36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp
index 940c3e09..254ed3d1 100644
--- a/src/net/tradehandler.cpp
+++ b/src/net/tradehandler.cpp
@@ -66,25 +66,27 @@ void TradeHandler::handleMessage(MessageIn *msg)
switch (msg->getId())
{
case SMSG_TRADE_REQUEST:
- // If a trade window or request window is already open, send a
- // trade cancel to any other trade request.
- //
- // Note that it would be nice if the server would prevent this
- // situation, and that the requesting player would get a
- // special message about the player being occupied.
- if (!player_node->tradeRequestOk())
{
- player_node->tradeReply(false);
- break;
+ // If a trade window or request window is already open, send a
+ // trade cancel to any other trade request.
+ //
+ // Note that it would be nice if the server would prevent this
+ // situation, and that the requesting player would get a
+ // special message about the player being occupied.
+ if (!player_node->tradeRequestOk())
+ {
+ player_node->tradeReply(false);
+ break;
+ }
+
+ player_node->setTrading(true);
+ tradePartnerName = msg->readString(24);
+ ConfirmDialog *dlg;
+ dlg = new ConfirmDialog("Request for trade",
+ tradePartnerName +
+ " wants to trade with you, do you accept?");
+ dlg->addActionListener(&requestTradeListener);
}
-
- player_node->setTrading(true);
- tradePartnerName = msg->readString(24);
- ConfirmDialog *dlg;
- dlg = new ConfirmDialog("Request for trade",
- tradePartnerName +
- " wants to trade with you, do you accept?");
- dlg->addActionListener(&requestTradeListener);
break;
case SMSG_TRADE_RESPONSE: