diff options
author | Dipesh Amin <yaypunkrock@gmail.com> | 2011-11-05 23:42:54 +0000 |
---|---|---|
committer | Dipesh Amin <yaypunkrock@gmail.com> | 2011-11-05 23:42:54 +0000 |
commit | a91e699353fc5fde38583b6be21b5a454a66eac2 (patch) | |
tree | ae8669e66bfeeaa6d5de1da9059ac04e749bf1ce | |
parent | 9524a159f1756bd3c5a1a531eef263f7996eede0 (diff) | |
download | manamarket-a91e699353fc5fde38583b6be21b5a454a66eac2.tar.gz manamarket-a91e699353fc5fde38583b6be21b5a454a66eac2.tar.bz2 manamarket-a91e699353fc5fde38583b6be21b5a454a66eac2.tar.xz manamarket-a91e699353fc5fde38583b6be21b5a454a66eac2.zip |
Fix: Player trade/logoff.
-rwxr-xr-x | main.py | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -755,6 +755,17 @@ def main(): trader_state.timer = time.time() mapserv.sendall(str(PacketOut(CMSG_TRADE_CANCEL_REQUEST))) + # If a player has logged off/left the map. + nick = '' + if trader_state.item: + nick = trader_state.item.player + elif trader_state.money: + nick = trader_state.money + + player_id = beingManager.findId(nick) + if player_id == -10: + trader_state.reset() + for packet in pb: if packet.is_type(SMSG_MAP_LOGIN_SUCCESS): # connected logging.info("Map login success.") |