Update of /cvsroot/wpdev/xmlscripts/scripts/commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21842/commands
Modified Files:
wipe.py
Log Message:
fix for wipe all
Index: wipe.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/wipe.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** wipe.py 23 Sep 2004 00:27:55 -0000 1.7
--- wipe.py 11 Oct 2004 20:24:22 -0000 1.8
***************
*** 65,75 ****
iterator = wolfpack.itemiterator()
item = iterator.first
! count = 0
while item:
if item.container == None:
! item.delete()
! count += 1
item = iterator.next
! player.socket.sysmessage( "%i items have been removed from world" % count )
return
--- 65,79 ----
iterator = wolfpack.itemiterator()
item = iterator.first
! serials = []
while item:
if item.container == None:
! serials.append(item.serial)
item = iterator.next
! for serial in serials:
! item = wolfpack.finditem(serial)
! if item:
! item.delete()
!
! player.socket.sysmessage( "%i items have been removed from world" % len(serials) )
return
|