[wpdev-commits] xmlscripts/scripts spellbook.py,1.1,1.2 errorhandler.py,1.2,NONE
Brought to you by:
rip,
thiagocorrea
|
From: <dar...@us...> - 2003-09-20 01:07:36
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1:/tmp/cvs-serv26302 Modified Files: spellbook.py Removed Files: errorhandler.py Log Message: Removed errorhandler.py Preparing for magic update. Index: spellbook.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/spellbook.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** spellbook.py 26 Jul 2003 01:09:25 -0000 1.1 --- spellbook.py 20 Sep 2003 01:07:32 -0000 1.2 *************** *** 56,59 **** --- 56,72 ---- socket.sysmessage( 'Select the spellbook you want to remove the spell from.' ) socket.attachtarget( "spellbook.removespelltarget", [ spell ] ) + + # Does the Spellbook have a specific spell? + def hasspell( item, spell ): + if item and 'spellbook' in items.events: + circle = int( floor( spell / 8 ) ) + 1 # 0 for first circle + spell = spell % 8 + + if item.hastag( 'circle' + str( circle ) ): + spells = int( item.gettag( 'circle' + str( circle ) ) ) + + return spells & ( 0x01 << spell ) + + return 0 # Adds the specified spell to the specified spellbook --- errorhandler.py DELETED --- |