[wpdev-commits] xmlscripts/scripts/commands wipe.py,1.8,1.9
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-10-14 01:59:16
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15464/commands Modified Files: wipe.py Log Message: hunger fix Index: wipe.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/wipe.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wipe.py 11 Oct 2004 20:24:22 -0000 1.8 --- wipe.py 14 Oct 2004 01:59:00 -0000 1.9 *************** *** 35,47 **** #from wolfpack.utilities import * ! def getBoundingBox( socket, callback ) : ! socket.attachtarget( "commands.wipe.getBoundingBoxResponse", [0, callback] ) return def getBoundingBoxResponse( char, args, target ): if args[0] == 0: ! char.socket.attachtarget("commands.wipe.getBoundingBoxResponse", [1, args[1], target] ) else: ! args[1]( char.socket, args[2], target ) return --- 35,47 ---- #from wolfpack.utilities import * ! def getBoundingBox( socket, callback, args ) : ! socket.attachtarget( "commands.wipe.getBoundingBoxResponse", [0, callback, None, args] ) return def getBoundingBoxResponse( char, args, target ): if args[0] == 0: ! char.socket.attachtarget("commands.wipe.getBoundingBoxResponse", [1, args[1], target, args[3]] ) else: ! args[1]( char.socket, args[2], target, args[3] ) return *************** *** 49,58 **** if len( argstring ) > 0: if argstring.lower() == "all": ! gump = WarningGump( 1060635, 30720, "Wipping <i>all</i> items in the world.<br>Do you wish to proceed?", 0xFFC000, 420, 400, wipeAllWorld, [] ) gump.send( socket ) else: ! socket.sysmessage("Select the area to remove") ! getBoundingBox( socket, wipeBoundingBox ) ! return 1 --- 49,62 ---- if len( argstring ) > 0: if argstring.lower() == "all": ! gump = WarningGump( 1060635, 30720, "Wiping <i>all</i> items in the world.<br>Do you wish to proceed?", 0xFFC000, 420, 400, wipeAllWorld, [] ) gump.send( socket ) + return + else: + baseid = argstring else: ! baseid = None ! ! socket.sysmessage("Select the area to remove") ! getBoundingBox( socket, wipeBoundingBox, baseid ) return 1 *************** *** 78,82 **** return ! def wipeBoundingBox( socket, target1, target2 ): if target1.pos.map != target2.pos.map: return False --- 82,86 ---- return ! def wipeBoundingBox( socket, target1, target2, baseid ): if target1.pos.map != target2.pos.map: return False *************** *** 90,95 **** count = 0 while item: ! item.delete() ! count += 1 item = iterator.next socket.sysmessage( "%i items removed" % count ) --- 94,100 ---- count = 0 while item: ! if not baseid or item.baseid == baseid: ! item.delete() ! count += 1 item = iterator.next socket.sysmessage( "%i items removed" % count ) |