diff options
author | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-25 23:48:40 +0100 |
---|---|---|
committer | Dipesh Amin <yaypunkrock@gmail.com> | 2011-08-25 23:48:40 +0100 |
commit | ffe3dc92e9f1fcac871e6d79e8fe3b7e57986d52 (patch) | |
tree | ab361c93afc6c82d91efa735a1c1ea19e8772c21 | |
parent | 182c9f5454157f09d8ea0ce4e24561f1e2060038 (diff) | |
download | manamarket-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-x | main.py | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 |