[wpdev-commits] xmlscripts/scripts/magic circle2.py,1.9,1.10 circle3.py,1.8,1.9
Brought to you by:
rip,
thiagocorrea
From: Jorge P. <ke...@us...> - 2004-08-24 18:11:12
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28093/magic Modified Files: circle2.py circle3.py Log Message: - Replaced access to .events with the calls hasevent/addevent/removeevent in all relevant places. Notice that addevent() is expected to add the event to the head of the list. I recognized no situation (of those changed) where it would make a difference adding the event to the end of the list, so in those cases used addevent aswell. - Fixed a copy&paste error in trap.py on removing the tags (pointed out by Incannus). note: .events can now be made read only, bearing in mind that in doing so there is no way to make a distinction between adding an event at the top or at the end of the event list. Index: circle3.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle3.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** circle3.py 24 Aug 2004 17:18:26 -0000 1.8 --- circle3.py 24 Aug 2004 18:10:28 -0000 1.9 *************** *** 180,188 **** char.turnto(target) - events = target.events hasevent = 0 # Check if there is an event handling onUse but not onTelekinesis ! for event in events: if wolfpack.hasevent(event, EVENT_TELEKINESIS): hasevent = 1 # The object has at least one telekinesis handler --- 180,187 ---- char.turnto(target) hasevent = 0 # Check if there is an event handling onUse but not onTelekinesis ! for event in target.events: if wolfpack.hasevent(event, EVENT_TELEKINESIS): hasevent = 1 # The object has at least one telekinesis handler Index: circle2.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/circle2.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** circle2.py 24 Aug 2004 17:18:26 -0000 1.9 --- circle2.py 24 Aug 2004 18:10:28 -0000 1.10 *************** *** 119,125 **** # Remove the Trap Properties from the Item target.removeevent( 'magic.trap' ) ! target.deltag('trap_owner', char.serial) ! target.deltag('trap_damage', random.randint(10, 50)) ! target.deltag('trap_type', 'magic') class Protection(Spell): --- 119,125 ---- # Remove the Trap Properties from the Item target.removeevent( 'magic.trap' ) ! target.deltag('trap_owner') ! target.deltag('trap_damage') ! target.deltag('trap_type') class Protection(Spell): |