From 8870b4636513947b35348fde6903a712475e81e3 Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Sun, 29 May 2011 17:50:39 +0000 Subject: [PATCH] Quanties can be 0 for non merging, take that into account. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@14497 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/dialog/pre/item.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/dialog/pre/item.py b/python/dialog/pre/item.py index bf3d84c89..eb020cb28 100644 --- a/python/dialog/pre/item.py +++ b/python/dialog/pre/item.py @@ -29,7 +29,10 @@ if itemname == "money": else: inv = character.CheckInventory(itemname) if inv: - if inv.Quantity < int(quantity): + q = inv.Quantity + if q == 0: + q = 1 + if q < int(quantity): verdict = False else: verdict = False \ No newline at end of file