[wpdev-commits] xmlscripts/scripts equipment.py,1.47,1.48
Brought to you by:
rip,
thiagocorrea
From: Klaus M. <nad...@us...> - 2004-10-28 16:04:49
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13538/scripts Modified Files: equipment.py Log Message: equip bugfix (bug #0000369) Index: equipment.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/equipment.py,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** equipment.py 13 Oct 2004 18:45:42 -0000 1.47 --- equipment.py 28 Oct 2004 16:04:40 -0000 1.48 *************** *** 388,392 **** else: player.socket.clilocmessage(500213) ! return 1 if wearer.dexterity < req_dex: --- 388,392 ---- else: player.socket.clilocmessage(500213) ! return True if wearer.dexterity < req_dex: *************** *** 395,399 **** else: player.socket.clilocmessage(502077) ! return 1 if wearer.intelligence < req_int: --- 395,399 ---- else: player.socket.clilocmessage(502077) ! return True if wearer.intelligence < req_int: *************** *** 402,406 **** else: player.socket.sysmessage('You are not ingellgent enough to equip this item.') ! return 1 # Reject equipping an item with durability 1 or less --- 402,406 ---- else: player.socket.sysmessage('You are not ingellgent enough to equip this item.') ! return True # Reject equipping an item with durability 1 or less *************** *** 412,418 **** if (armor or weapon or shield) and item.health < 1: player.socket.sysmessage('You need to repair this before using it again.') ! return 1 ! return 0 # --- 412,418 ---- if (armor or weapon or shield) and item.health < 1: player.socket.sysmessage('You need to repair this before using it again.') ! return True ! return False # *************** *** 667,682 **** # Try to equip an item after calling onWearItem for it def onUse(player, item): if item.container == player: ! return 0 tile = wolfpack.tiledata(item.id) if not tile.has_key('layer'): ! return 0 layer = tile['layer'] if layer == 0 or not (tile['flag3'] & 0x40): ! return 0 previous = player.itemonlayer(layer) --- 667,686 ---- # Try to equip an item after calling onWearItem for it def onUse(player, item): + if not char.gm and item.movable == 3: + player.objectdelay = 0 + return True + if item.container == player: ! return False tile = wolfpack.tiledata(item.id) if not tile.has_key('layer'): ! return False layer = tile['layer'] if layer == 0 or not (tile['flag3'] & 0x40): ! return False previous = player.itemonlayer(layer) *************** *** 703,707 **** # Check if there is another dclick handler # in the eventchain somewhere. if not, ! # return 1 to handle the equip event. scripts = item.scripts --- 707,711 ---- # Check if there is another dclick handler # in the eventchain somewhere. if not, ! # return True to handle the equip event. scripts = item.scripts *************** *** 710,714 **** result = wolfpack.callevent(script, EVENT_WEARITEM, (player, player, item, layer)) if result: ! return 1 player.additem(layer, item) --- 714,718 ---- result = wolfpack.callevent(script, EVENT_WEARITEM, (player, player, item, layer)) if result: ! return True player.additem(layer, item) *************** *** 722,726 **** for script in scripts[scripts.index("equipment")+1:]: if wolfpack.hasevent(script, EVENT_USE): ! return 0 ! return 1 --- 726,730 ---- for script in scripts[scripts.index("equipment")+1:]: if wolfpack.hasevent(script, EVENT_USE): ! return False ! return True |