summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWushin <pasekei@gmail.com>2014-10-01 12:27:37 -0500
committerWushin <pasekei@gmail.com>2014-10-01 12:27:37 -0500
commitb69dd0c31f57da89a930a12c07c878f6fe202cd2 (patch)
treec5968f56383a662fd3777d76faf51429836bddc2
parent9587006e8a2ff995438defaa388e77c00426f3f8 (diff)
parent2e1845c83146397a71d09685301246bc71c5712b (diff)
downloadmanamarket-b69dd0c31f57da89a930a12c07c878f6fe202cd2.tar.gz
manamarket-b69dd0c31f57da89a930a12c07c878f6fe202cd2.tar.bz2
manamarket-b69dd0c31f57da89a930a12c07c878f6fe202cd2.tar.xz
manamarket-b69dd0c31f57da89a930a12c07c878f6fe202cd2.zip
Merge pull request #4 from Rawng/moneygetback
Fix !money and !getback
-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: