[wpdev-commits] xmlscripts/scripts/magic spell.py,1.12,1.13 utilities.py,1.9,1.10
Brought to you by:
rip,
thiagocorrea
From: Correa <thi...@us...> - 2004-08-07 04:03:02
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10742/magic Modified Files: spell.py utilities.py Log Message: fix for bug 190. ( cast command broken ) Index: spell.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/spell.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** spell.py 22 Jul 2004 17:22:06 -0000 1.12 --- spell.py 7 Aug 2004 04:02:53 -0000 1.13 *************** *** 107,115 **** # Casting from a scroll and no scroll was passed ! if mode == 1 and not item: return # Casting from a wand and no wand was passed ! if mode == 2 and not item: return --- 107,115 ---- # Casting from a scroll and no scroll was passed ! if mode == MODE_SCROLL and not item: return # Casting from a wand and no wand was passed ! if mode == MODE_WAND and not item: return *************** *** 126,130 **** # If we are using a spellbook to cast, check if we do have # the spell in our spellbook (0-based index) ! if not self.inherent and mode == 0 and not hasSpell(char, self.spellid - 1): char.message("You don't know the spell you want to cast.") return 0 --- 126,130 ---- # If we are using a spellbook to cast, check if we do have # the spell in our spellbook (0-based index) ! if not self.inherent and mode == MODE_BOOK and not hasSpell(char, self.spellid - 1): char.message("You don't know the spell you want to cast.") return 0 *************** *** 155,158 **** --- 155,160 ---- elif mode == MODE_WAND: source = 'wand (0x%x)' % item + elif mode == MODE_CMD: + source = 'command' char.log(LOG_MESSAGE, "Casting spell %u (%s) from %s.\n" % (self.spellid, self.__class__.__name__, source)) Index: utilities.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/utilities.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** utilities.py 20 Jul 2004 20:55:13 -0000 1.9 --- utilities.py 7 Aug 2004 04:02:53 -0000 1.10 *************** *** 44,47 **** --- 44,48 ---- MODE_SCROLL = 1 MODE_WAND = 2 + MODE_CMD = 3 # |