summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRawng <rawng.github@gmail.com>2014-09-28 02:42:49 -0400
committerRawng <rawng.github@gmail.com>2014-09-28 02:42:49 -0400
commit2e1845c83146397a71d09685301246bc71c5712b (patch)
tree38f63e2798a3d13224b1a8b075a3630f38700309
parent614446a1858001fe3b3055296e2a6e2f526b8394 (diff)
downloadmanamarket-2e1845c83146397a71d09685301246bc71c5712b.tar.gz
manamarket-2e1845c83146397a71d09685301246bc71c5712b.tar.bz2
manamarket-2e1845c83146397a71d09685301246bc71c5712b.tar.xz
manamarket-2e1845c83146397a71d09685301246bc71c5712b.zip
Fix !money and !getback This addresses issue #2 and has only been tested(lightly) in conjunction with pull request #3
-rwxr-xr-xmain.py4
1 files 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: