Update of /cvsroot/wpdev/xmlscripts/scripts/commands
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10742/commands
Modified Files:
cast.py decoration.py
Log Message:
fix for bug 190. ( cast command broken )
Index: decoration.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/decoration.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** decoration.py 7 Aug 2004 00:28:22 -0000 1.8
--- decoration.py 7 Aug 2004 04:02:53 -0000 1.9
***************
*** 67,72 ****
item.moveto( x, y, z, map )
item.movable = 3 # not movable
- item.update()
item.decay = 0 # no decay
--- 67,72 ----
item.moveto( x, y, z, map )
item.movable = 3 # not movable
item.decay = 0 # no decay
+ item.update()
***************
*** 101,111 ****
file.write("<decoration>\n")
for id in self.maps[map]:
! tiledata = wolfpack.tiledata(id)
! file.write("""\t<!-- %s -->\n""" % tiledata["name"] )
! file.write("""\t<item id="0x%x">\n""" % id )
for item in self.maps[map][id]:
! pos = item.pos
! file.write("""\t\t<pos x="%i" y="%i" z="%i" map="%i">\n""" % (pos.x, pos.y, pos.z, pos.map) )
! file.write("\t</item>\n")
file.write("</decoration>\n")
file.close()
--- 101,120 ----
file.write("<decoration>\n")
for id in self.maps[map]:
! itemsbyhue = {}
for item in self.maps[map][id]:
! if not itemsbyhue.has_key(item.color):
! itemsbyhue[item.color] = []
! itemsbyhue[item.color].append(item)
! tiledata = wolfpack.tiledata(id)
! for hue in itemsbyhue:
! file.write("""\t<!-- %s -->\n""" % tiledata["name"] )
! if hue != 0:
! file.write("""\t<item id="0x%x" hue="0x%x">\n""" % (id, hue) )
! else:
! file.write("""\t<item id="0x%x">\n""" % id )
! for item in itemsbyhue[hue]:
! pos = item.pos
! file.write("""\t\t<pos x="%i" y="%i" z="%i" map="%i">\n""" % (pos.x, pos.y, pos.z, pos.map) )
! file.write("\t</item>\n")
file.write("</decoration>\n")
file.close()
Index: cast.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/cast.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** cast.py 15 Jul 2004 01:17:11 -0000 1.4
--- cast.py 7 Aug 2004 04:02:53 -0000 1.5
***************
*** 14,18 ****
try:
args = int( args );
! castSpell( socket.player, args, 1 )
except:
socket.sysmessage( "Usage: cast <spell-id>" )
--- 14,18 ----
try:
args = int( args );
! castSpell( socket.player, args, MODE_CMD )
except:
socket.sysmessage( "Usage: cast <spell-id>" )
|