Ensure items were removed.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@14501 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
955102cc66
commit
0737416c01
|
@ -30,9 +30,11 @@ else:
|
|||
inv = character.CheckInventory(itemname)
|
||||
if inv:
|
||||
if quantity == 0:
|
||||
CFItemBroker.Item(inv).subtract(inv.Quantity)
|
||||
inv.Remove()
|
||||
else:
|
||||
CFItemBroker.Item(inv).subtract(int(quantity))
|
||||
status = CFItemBroker.Item(inv).subtract(int(quantity))
|
||||
if status == 0:
|
||||
Crossfire.Log(Crossfire.LogError, "Dialog script tried to remove more items than available from player %s" %(character.Name))
|
||||
# we might have been wearing an item that was taken.
|
||||
character.Fix()
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue