summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDipesh Amin <yaypunkrock@gmail.com>2011-08-25 23:48:40 +0100
committerDipesh Amin <yaypunkrock@gmail.com>2011-08-25 23:48:40 +0100
commitffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52 (patch)
treeab361c93afc6c82d91efa735a1c1ea19e8772c21
parent182c9f5454157f09d8ea0ce4e24561f1e2060038 (diff)
downloadmanamarket-ffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52.tar.gz
manamarket-ffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52.tar.bz2
manamarket-ffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52.tar.xz
manamarket-ffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52.zip
Remove some surpurfulous code - the else: item_id == 0 would never be called.
-rwxr-xr-xmain.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/main.py b/main.py
index 124f433..4d2ddcc 100755
--- a/main.py
+++ b/main.py
@@ -851,16 +851,13 @@ def main():
mapserv.sendall(str(PacketOut(CMSG_TRADE_CANCEL_REQUEST)))
elif trader_state.item.get == 0: # buy
- if amount == trader_state.item.price * trader_state.item.amount and item_id == 0:
+ if item_id == 0 and amount == trader_state.item.price * trader_state.item.amount:
mapserv.sendall(str(PacketOut(CMSG_TRADE_OK)))
trader_state.complete = 1
elif item_id == 0 and amount != trader_state.item.price * trader_state.item.amount:
trader_state.complete = 0
else:
- if item_id == 0:
- mapserv.sendall(whisper(trader_state.item.player, "Please verify you have the correct amount of money and try again."))
- else:
- mapserv.sendall(whisper(trader_state.item.player, "Don't give me your itenz."))
+ mapserv.sendall(whisper(trader_state.item.player, "Don't give me your itenz."))
mapserv.sendall(str(PacketOut(CMSG_TRADE_CANCEL_REQUEST)))
elif trader_state.money: # money