From 2e1845c83146397a71d09685301246bc71c5712b Mon Sep 17 00:00:00 2001 From: Rawng Date: Sun, 28 Sep 2014 02:42:49 -0400 Subject: Fix !money and !getback This addresses issue #2 and has only been tested(lightly) in conjunction with pull request #3 --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index eda5f64..9c863a8 100755 --- a/main.py +++ b/main.py @@ -453,7 +453,7 @@ def process_whisper(nick, msg, mapserv): elif item_id in config.nosell: mapserv.sendall(whisper(nick, "That item can't be added to ManaMarket, as its too heavy.")) return - elif weight + player_node.WEIGHT > player_node.MaxWEIGHT: + elif int(weight) + player_node.WEIGHT > player_node.MaxWEIGHT: mapserv.sendall(whisper(nick, "I've not got enough room left to carry those. Please try again later. ")) return elif ItemDB.item_names[item_id].weight > 10 and amount > 150: @@ -1015,7 +1015,7 @@ def main(): #mapserv.sendall(str(PacketOut(CMSG_TRADE_CANCEL_REQUEST))) # If Trade item add successful - Remove the item from the inventory state. - if index != 0-inventory_offset: # If it's not money + if index != 0: # If it's not money logger.info("Remove item: %s, Amount: %s, Index: %s", ItemDB.getItem(player_node.inventory[index].itemId).name, str(amount),str(index)) player_node.remove_item(index, amount) else: -- cgit v1.2.3-60-g2f50