wpdev-commits Mailing List for Wolfpack Emu (Page 10)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
From: Sebastian H. <dar...@us...> - 2004-10-17 23:32:35
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23043 Modified Files: basechar.cpp Log Message: Fixes Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** basechar.cpp 16 Oct 2004 18:19:40 -0000 1.165 --- basechar.cpp 17 Oct 2004 23:32:27 -0000 1.166 *************** *** 3349,3353 **** if ( hasTag( "regenmana" ) ) { ! points = getTag( "regenmana" ).toInt(); } --- 3349,3353 ---- if ( hasTag( "regenmana" ) ) { ! points += getTag( "regenmana" ).toInt(); } |
From: Sebastian H. <dar...@us...> - 2004-10-17 23:11:49
|
Update of /cvsroot/wpdev/xmlscripts/scripts/magic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17442/magic Modified Files: runebook.py Log Message: runebook fix Index: runebook.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/magic/runebook.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** runebook.py 27 Sep 2004 22:41:29 -0000 1.10 --- runebook.py 17 Oct 2004 23:11:40 -0000 1.11 *************** *** 39,42 **** --- 39,45 ---- def onDropOnItem( book, item ): + if book.layer != 0 or isrunebook(item): + return False # Don't handle if book is being dragged + char = item.container |
From: Sebastian H. <dar...@us...> - 2004-10-17 22:20:34
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv841/skills Modified Files: inscription.py Log Message: inscription fix Index: inscription.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/inscription.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** inscription.py 13 Oct 2004 18:45:42 -0000 1.9 --- inscription.py 17 Oct 2004 22:20:25 -0000 1.10 *************** *** 262,269 **** self.parent.send(player, args) return False - player.mana = player.mana - self.mana self.consumematerial(player, args, 0) success = self.checkskills( player, args, 1) if success: item = wolfpack.additem(self.definition) if not item: --- 262,269 ---- self.parent.send(player, args) return False self.consumematerial(player, args, 0) success = self.checkskills( player, args, 1) if success: + player.mana = player.mana - self.mana item = wolfpack.additem(self.definition) if not item: |
From: Incanus <inc...@us...> - 2004-10-17 20:04:50
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28840/scripts/system Modified Files: hunger.py Log Message: fixed typo Index: hunger.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/hunger.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** hunger.py 17 Oct 2004 15:52:54 -0000 1.7 --- hunger.py 17 Oct 2004 20:04:42 -0000 1.8 *************** *** 25,28 **** player.damage( 3, random.randint( 0, hungerdamage ) ) player.socket.sysmessage( tr("Your stomach hurts from the lack of food...") ) ! playet.settag('lasthunger', wolfpack.time.minutes()) return False --- 25,28 ---- player.damage( 3, random.randint( 0, hungerdamage ) ) player.socket.sysmessage( tr("Your stomach hurts from the lack of food...") ) ! player.settag('lasthunger', wolfpack.time.minutes()) return False |
From: Sebastian H. <dar...@us...> - 2004-10-17 18:07:42
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29387/commands Added Files: spawn.py Log Message: Spawning commands --- NEW FILE: spawn.py --- import wolfpack from wolfpack import tr from wolfpack.gumps import WarningGump """ \command spawn \description Adds a spawngem with the given parameters at the target location. \usage - <code>spawn npc range mintime maxtime</code> Npc is the definition id of the npc to spawn. Range is the wander range for the spawned npc. Mintime is the minimum interval in minutes between spawns. Maxtime is the maximum interval in minutes between spawns. """ def addSpawn(player, ok, args): if not ok: return (pos, npc, radius, mintime, maxtime) = args player.socket.sysmessage(tr('Adding %s spawn at %s.') % (npc, pos)) item = wolfpack.additem('spawngem') # Set tag info item.settag('spawntype', 1) item.settag('spawndef', npc) item.settag('area', radius) item.settag('mininterval', mintime) item.settag('maxinterval', maxtime) item.moveto(pos) item.name = tr('a %s spawn') % npc item.update() def callback(player, arguments, target): pos = None (npc, radius, mintime, maxtime) = arguments if target.item and not target.item.container: pos = target.item.pos elif target.char: pos = target.char.pos else: pos = target.pos args = [pos, npc, radius, mintime, maxtime] # Check Distance. If more than 30 tiles away, warn the user if player.distanceto(pos) > 30: gump = WarningGump( 1060635, 30720, tr("The position (%s) you targetted is more than 30 tiles away. Are you sure to add a spawn there?") % pos, 0xFFFFFF, 420, 250, addSpawn, args ) gump.send( player.socket ) else: addSpawn(player, True, args) # # Usage: .spawn <creature> <radius> <mintime> <maxtime> # def spawn(socket, command, arguments): arguments = arguments.split(' ') if len(arguments) != 4: socket.sysmessage(tr('Usage: spawn npc radius mintime maxtime')) return (npc, radius, mintime, maxtime) = arguments try: radius = int(radius) mintime = int(mintime) maxtime = int(maxtime) except: socket.sysmessage(tr('Usage: npc spawn radius mintime maxtime')) return socket.sysmessage(tr('Where do you want to spawn npc %s.') % npc) socket.attachtarget("commands.spawn.callback", [npc, radius, mintime, maxtime]) def onLoad(): wolfpack.registercommand('spawn', spawn) |
From: Sebastian H. <dar...@us...> - 2004-10-17 18:07:42
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29387 Modified Files: spawngem.py Log Message: Spawning commands Index: spawngem.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/spawngem.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** spawngem.py 11 Jul 2004 02:47:25 -0000 1.4 --- spawngem.py 17 Oct 2004 18:07:33 -0000 1.5 *************** *** 21,24 **** --- 21,39 ---- # + # Tooltips + # + # Show a nice tooltip + def onShowTooltip(sender, target, tooltip): + if target.hastag('mininterval') and target.hastag('maxinterval') and target.hastag('area'): + area = target.gettag('area') + mininterval = target.gettag('mininterval') + maxinterval = target.gettag('maxinterval') + + appendix = 'Radius: %s\nInterval: %s to %s minutes' % (area, mininterval, maxinterval) + + tooltip.add(1060847, "%s\t\n" % appendix) + + + # # Gump configuration response # |
From: Sebastian H. <dar...@us...> - 2004-10-17 17:45:47
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23051/system Modified Files: spawns.py Log Message: spawning fixes Index: spawns.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/spawns.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** spawns.py 27 Sep 2004 00:23:03 -0000 1.8 --- spawns.py 17 Oct 2004 17:45:36 -0000 1.9 *************** *** 12,33 **** # def spawn(spawner, spawntype, spawndef, current, area): ! try: ! if spawntype == 1: ! npc = wolfpack.addnpc(spawndef, spawner.pos) ! npc.settag('spawner', spawner.serial) ! npc.wandertype = 3 ! npc.wanderx1 = spawner.pos.x ! npc.wandery1 = spawner.pos.y ! npc.wanderradius = area ! npc.addscript( 'system.spawns' ) ! npc.update() ! elif spawntype == 0: ! pass ! except: ! if( spawner ): ! console.log(LOG_WARNING, "Invalid spawner: 0x%x.\n" % spawner.serial) ! return ! spawner.settag('current', current + 1) # --- 12,127 ---- # def spawn(spawner, spawntype, spawndef, current, area): ! try: ! if spawntype == 1: ! npc = wolfpack.addnpc(spawndef, spawner.pos) ! npc.settag('spawner', spawner.serial) ! npc.wandertype = 3 ! npc.wanderx1 = spawner.pos.x ! npc.wandery1 = spawner.pos.y ! npc.wanderradius = area ! npc.addscript( 'system.spawns' ) ! npc.update() ! elif spawntype == 0: ! pass ! except: ! if( spawner ): ! console.log(LOG_WARNING, "Invalid spawner: 0x%x.\n" % spawner.serial) ! return ! spawner.settag('current', current + 1) ! ! # ! # Run this in the mainloop ! # ! def processSpawns(process): ! # Process the designated partition ! for i in range(0, len(process)): ! item = wolfpack.finditem(process[i]) ! ! # Check if the spawn is valid. ! valid = item != None ! if valid and not item.hasscript( 'spawngem' ): ! valid = 0 ! if valid and not item.hastag('spawntype') or not item.hastag('spawndef'): ! valid = 0 ! ! if not valid: ! if DEBUG_SPAWNS == 1: ! console.log(LOG_WARNING, "Invalid spawn item: 0x%x.\n" % item.serial) ! pass ! else: ! spawntype = int(item.gettag('spawntype')) # 0: Items, 1: NPCs ! spawndef = str(item.gettag('spawndef')) # Definition ! ! # This is either how far the npcs will wander ! # or how far from the spawn the items will be spawned. ! area = 0 ! if item.hastag('area'): ! area = int(item.gettag('area')) ! ! # This is a minimum/maximum spawn interval in minutes ! mininterval = 1 ! maxinterval = 1 ! if item.hastag('interval'): ! interval = item.gettag('interval') ! if ',' in interval: ! (mininterval, maxinterval) = interval.split(',', 1) ! try: ! mininterval = max(1, int(mininterval)) ! maxinterval = max(1, int(maxinterval)) ! if maxinterval < mininterval: ! temp = mininterval ! mininterval = maxinterval ! maxinterval = temp ! except: ! mininterval = 1 ! maxinterval = 1 ! ! # Currently / Maximimum spawned by this gem ! current = 0 ! if item.hastag('current'): ! try: ! current = int(item.gettag('current')) ! except: ! current = 0 ! ! maximum = 1 ! if item.hastag('maximum'): ! try: ! maximum = int(item.gettag('maximum')) ! except: ! maximum = 1 ! ! nextspawn = 0 ! if item.hastag('nextspawn'): ! try: ! nextspawn = int(item.gettag('nextspawn')) ! except: ! nextspawn = 0 ! ! currenttime = wolfpack.tickcount() ! ! # It's possible that the spawntime got too far into the future (server-reload etc.) ! # reset it here. ! if nextspawn - currenttime > maxinterval * 60 * 1000: ! nextspawn = 0 ! ! # If we didn't have a spawntime set yet. ! if nextspawn == 0 and current < maximum: ! item.settag('nextspawn', currenttime + random.randint(mininterval, maxinterval) * 60 * 1000) ! continue ! ! elif current >= maximum: ! item.deltag('nextspawn') ! continue ! ! if nextspawn <= currenttime: ! spawn(item, spawntype, spawndef, current, area) ! #console.log(LOG_MESSAGE, "SPAWNTIME REACHED!") ! item.deltag('nextspawn') ! ! if DEBUG_SPAWNS == 1: ! console.log(LOG_MESSAGE, "Valid Spawnpoint: %x, Cur/Max: %u/%u, Def: %s, Type: %u, Interval: %u,%u, Time: %d/%d" % \ ! (item.serial, current, maximum, spawndef, spawntype, mininterval, maxinterval, currenttime, nextspawn)) # *************** *** 35,177 **** # class SpawnThread(Thread): ! # ! # Initialize the thread. ! # ! def __init__(self): ! Thread.__init__(self) ! self.stopped = Event() ! self.mlock = Lock() ! self.unprocessed = [] # List of serials ! self.processed = [] # List of processed spawngems ! ! # ! # Lock the thread-own mutex. ! # ! def lock(self): ! self.mlock.acquire() ! ! # ! # Unlock the thread own mutex. ! # ! def unlock(self): ! self.mlock.release() ! ! # ! # Cancel the thread. ! # ! def cancel(self): ! self.stopped.set() ! ! # ! # Run the spawnloop ! # ! def run(self): ! while not self.stopped.isSet(): ! self.lock() ! ! process = self.unprocessed[:100] ! self.unprocessed = self.unprocessed[100:] ! ! if DEBUG_SPAWNS == 1: ! console.log(LOG_MESSAGE, "Found %u spawn items." % len(process)) ! ! # Process the designated partition ! for i in range(0, len(process)): ! item = wolfpack.finditem(process[i]) ! ! # Check if the spawn is valid. ! valid = item != None ! if valid and not item.hasscript( 'spawngem' ): ! valid = 0 ! if valid and not item.hastag('spawntype') or not item.hastag('spawndef'): ! valid = 0 ! ! if not valid: ! if DEBUG_SPAWNS == 1: ! console.log(LOG_WARNING, "Invalid spawn item: 0x%x.\n" % item.serial) ! pass ! else: ! spawntype = int(item.gettag('spawntype')) # 0: Items, 1: NPCs ! spawndef = str(item.gettag('spawndef')) # Definition ! ! # This is either how far the npcs will wander ! # or how far from the spawn the items will be spawned. ! area = 0 ! if item.hastag('area'): ! area = int(item.gettag('area')) ! ! # This is a minimum/maximum spawn interval in minutes ! mininterval = 1 ! maxinterval = 1 ! if item.hastag('interval'): ! interval = item.gettag('interval') ! if ',' in interval: ! (mininterval, maxinterval) = interval.split(',', 1) ! try: ! mininterval = max(1, int(mininterval)) ! maxinterval = max(1, int(maxinterval)) ! if maxinterval < mininterval: ! temp = mininterval ! mininterval = maxinterval ! maxinterval = temp ! except: ! mininterval = 1 ! maxinterval = 1 ! ! # Currently / Maximimum spawned by this gem ! current = 0 ! if item.hastag('current'): ! try: ! current = int(item.gettag('current')) ! except: ! current = 0 ! ! maximum = 1 ! if item.hastag('maximum'): ! try: ! maximum = int(item.gettag('maximum')) ! except: ! maximum = 1 ! nextspawn = 0 ! if item.hastag('nextspawn'): ! try: ! nextspawn = int(item.gettag('nextspawn')) ! except: ! nextspawn = 0 ! currenttime = wolfpack.tickcount() ! # It's possible that the spawntime got too far into the future (server-reload etc.) ! # reset it here. ! if nextspawn - currenttime > maxinterval * 60 * 1000: ! nextspawn = 0 ! # If we didn't have a spawntime set yet. ! if nextspawn == 0 and current < maximum: ! item.settag('nextspawn', currenttime + random.randint(mininterval, maxinterval) * 60 * 1000) ! continue ! elif current >= maximum: ! item.deltag('nextspawn') ! continue ! if nextspawn <= currenttime: ! spawn(item, spawntype, spawndef, current, area) ! #console.log(LOG_MESSAGE, "SPAWNTIME REACHED!") ! item.deltag('nextspawn') ! if DEBUG_SPAWNS == 1: ! console.log(LOG_MESSAGE, "Valid Spawnpoint: %x, Cur/Max: %u/%u, Def: %s, Type: %u, Interval: %u,%u, Time: %d/%d" % \ ! (item.serial, current, maximum, spawndef, spawntype, mininterval, maxinterval, nextspawn, currenttime)) ! self.processed += process ! if len(self.unprocessed) == 0: ! self.unprocessed = self.processed ! self.processed = [] ! self.unlock() ! self.stopped.wait(15.0) # Every 15 seconds. # --- 129,183 ---- # class SpawnThread(Thread): ! # ! # Initialize the thread. ! # ! def __init__(self): ! Thread.__init__(self) ! self.stopped = Event() ! self.mlock = Lock() ! self.unprocessed = [] # List of serials ! self.processed = [] # List of processed spawngems ! # ! # Lock the thread-own mutex. ! # ! def lock(self): ! self.mlock.acquire() ! # ! # Unlock the thread own mutex. ! # ! def unlock(self): ! self.mlock.release() ! # ! # Cancel the thread. ! # ! def cancel(self): ! self.stopped.set() ! # ! # Run the spawnloop ! # ! def run(self): ! while not self.stopped.isSet(): ! self.lock() ! process = self.unprocessed[:50] ! self.unprocessed = self.unprocessed[50:] ! if DEBUG_SPAWNS == 1: ! console.log(LOG_MESSAGE, "Found %u spawn items." % len(process)) ! wolfpack.queuecode(processSpawns, (process, )) ! self.processed += process ! if len(self.unprocessed) == 0: ! self.unprocessed = self.processed ! self.processed = [] ! self.unlock() ! self.stopped.wait(15.0) # Every 15 seconds. # *************** *** 184,190 **** # def onLoad(): ! global thread ! thread = SpawnThread() ! thread.start() # --- 190,196 ---- # def onLoad(): ! global thread ! thread = SpawnThread() ! thread.start() # *************** *** 192,201 **** # def onUnload(): ! global thread ! if thread: ! thread.cancel() ! time.sleep(0.03) ! thread.join() ! thread = None # --- 198,207 ---- # def onUnload(): ! global thread ! if thread: ! thread.cancel() ! time.sleep(0.03) ! thread.join() ! thread = None # *************** *** 203,213 **** # def register(spawn): ! global thread ! if thread: ! serial = spawn.serial ! thread.lock() ! if serial not in thread.unprocessed and serial not in thread.processed: ! thread.unprocessed.append(spawn.serial) ! thread.unlock() # --- 209,219 ---- # def register(spawn): ! global thread ! if thread: ! serial = spawn.serial ! thread.lock() ! if serial not in thread.unprocessed and serial not in thread.processed: ! thread.unprocessed.append(spawn.serial) ! thread.unlock() # *************** *** 215,227 **** # def unregister(spawn): ! global thread ! if thread: ! serial = spawn.serial ! thread.lock() ! while serial in thread.unprocessed: ! thread.unprocessed.remove(serial) ! while serial in thread.processed: ! thread.processed.remove(serial) ! thread.unlock() # --- 221,233 ---- # def unregister(spawn): ! global thread ! if thread: ! serial = spawn.serial ! thread.lock() ! while serial in thread.unprocessed: ! thread.unprocessed.remove(serial) ! while serial in thread.processed: ! thread.processed.remove(serial) ! thread.unlock() # *************** *** 231,249 **** # def onDelete(object): ! if not object.hastag('spawner'): ! return 0 ! try: ! spawner = wolfpack.finditem(int(object.gettag('spawner'))) ! if spawner and spawner.hastag('current'): ! current = int(spawner.gettag('current')) ! current -= 1 ! if current <= 0: ! spawner.deltag('current') ! else: ! spawner.settag('current', current) ! except: ! return 0 ! return 0 --- 237,255 ---- # def onDelete(object): ! if not object.hastag('spawner'): ! return 0 ! try: ! spawner = wolfpack.finditem(int(object.gettag('spawner'))) ! if spawner and spawner.hastag('current'): ! current = int(spawner.gettag('current')) ! current -= 1 ! if current <= 0: ! spawner.deltag('current') ! else: ! spawner.settag('current', current) ! except: ! return 0 ! return 0 |
From: Sebastian H. <dar...@us...> - 2004-10-17 17:45:31
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22989 Modified Files: scripts.xml Log Message: spawns Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.170 retrieving revision 1.171 diff -C2 -d -r1.170 -r1.171 *** scripts.xml 17 Oct 2004 01:19:33 -0000 1.170 --- scripts.xml 17 Oct 2004 17:45:22 -0000 1.171 *************** *** 122,125 **** --- 122,126 ---- <script>commands.skill</script> <script>commands.sound</script> + <script>commands.spawn</script> <script>commands.stat</script> <script>commands.tags</script> |
From: Sebastian H. <dar...@us...> - 2004-10-17 17:45:31
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22989/items Modified Files: system.xml Log Message: spawns Index: system.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/system.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** system.xml 27 Aug 2004 14:43:26 -0000 1.11 --- system.xml 17 Oct 2004 17:45:22 -0000 1.12 *************** *** 32,36 **** <scripts>spawngem</scripts> <nodecay /> ! <movable>2</movable> </item> --- 32,36 ---- <scripts>spawngem</scripts> <nodecay /> ! <movable>3</movable> </item> |
From: spddmn <xxx...@us...> - 2004-10-17 16:02:19
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25831 Modified Files: wolf.dsp Log Message: release build fix for "had to fix VC6 compiler issue" Index: wolf.dsp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolf.dsp,v retrieving revision 1.276 retrieving revision 1.277 diff -C2 -d -r1.276 -r1.277 *** wolf.dsp 16 Oct 2004 18:20:37 -0000 1.276 --- wolf.dsp 17 Oct 2004 16:02:11 -0000 1.277 *************** *** 43,47 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "lib/Python/PC" /I "sqlite" /I "lib/Python/include" /I "lib\ZThread\include" /I "$(QTDIR)\include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /Fr /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" --- 43,47 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "lib/Python/PC" /I "sqlite" /I "lib/Python/include" /I "lib\ZThread\include" /I "$(QTDIR)\include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "__VC6" /Fr /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" *************** *** 108,120 **** # Begin Source File ! SOURCE=.\ai\ai_mage.cpp # End Source File # Begin Source File ! SOURCE=.\ai\ai_animals.cpp # End Source File # Begin Source File ! SOURCE=.\ai\ai_humans.cpp # End Source File # Begin Source File --- 108,120 ---- # Begin Source File ! SOURCE=.\ai\ai_animals.cpp # End Source File # Begin Source File ! SOURCE=.\ai\ai_humans.cpp # End Source File # Begin Source File ! SOURCE=.\ai\ai_mage.cpp # End Source File # Begin Source File |
From: Sebastian H. <dar...@us...> - 2004-10-17 15:53:03
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23548/system Modified Files: hunger.py Log Message: hunger fix Index: hunger.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/hunger.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** hunger.py 14 Oct 2004 01:59:00 -0000 1.6 --- hunger.py 17 Oct 2004 15:52:54 -0000 1.7 *************** *** 17,21 **** lasthunger = int(player.gettag('lasthunger')) ! if lasthunger + 2 < wolfpack.time.minutes(): if player.socket and not player.gm: if player.hunger >= 1 and player.hunger <= 6: --- 17,21 ---- lasthunger = int(player.gettag('lasthunger')) ! if lasthunger + hungerrate < wolfpack.time.minutes(): if player.socket and not player.gm: if player.hunger >= 1 and player.hunger <= 6: *************** *** 25,27 **** --- 25,28 ---- player.damage( 3, random.randint( 0, hungerdamage ) ) player.socket.sysmessage( tr("Your stomach hurts from the lack of food...") ) + playet.settag('lasthunger', wolfpack.time.minutes()) return False |
From: Sebastian H. <dar...@us...> - 2004-10-17 15:49:06
|
Update of /cvsroot/wpdev/wolfpack/ai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22651/ai Modified Files: ai_mage.cpp Log Message: speed fix Index: ai_mage.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai_mage.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ai_mage.cpp 16 Oct 2004 20:01:39 -0000 1.5 --- ai_mage.cpp 17 Oct 2004 15:48:56 -0000 1.6 *************** *** 306,309 **** --- 306,313 ---- virtual float preCondition() { + if (m_npc->nextMoveTime() > Server::instance()->time()) { + return 0.0f; // We can't move yet. + } + Monster_Aggressive *ai = static_cast<Monster_Aggressive*>(m_ai); *************** *** 321,324 **** --- 325,330 ---- return; + m_npc->setNextMoveTime(); + // If we're not casting a spell and waiting for a new one, move toward the target if (!m_npc->hasScript("magic")) { |
From: Sebastian H. <dar...@us...> - 2004-10-17 10:27:22
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/monsters/daemonic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7969/npcs/monsters/daemonic Modified Files: arcane_daemon.xml Log Message: lootpack fix Index: arcane_daemon.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/monsters/daemonic/arcane_daemon.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** arcane_daemon.xml 17 Oct 2004 10:24:42 -0000 1.11 --- arcane_daemon.xml 17 Oct 2004 10:27:13 -0000 1.12 *************** *** 42,46 **** <!-- Loot Packs --> <!-- Missing: --> ! <lootpacks>gold_good;gold_good</lootpacks> <!-- Misc. --> <category>Monsters\Daemonic\Arcane Daemon</category> --- 42,46 ---- <!-- Loot Packs --> <!-- Missing: --> ! <lootpacks>gold_good;lootpack_average</lootpacks> <!-- Misc. --> <category>Monsters\Daemonic\Arcane Daemon</category> |
From: Sebastian H. <dar...@us...> - 2004-10-17 10:24:50
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/monsters/daemonic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7490/npcs/monsters/daemonic Modified Files: arcane_daemon.xml Log Message: lootpack fix Index: arcane_daemon.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/monsters/daemonic/arcane_daemon.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** arcane_daemon.xml 16 Oct 2004 20:15:48 -0000 1.10 --- arcane_daemon.xml 17 Oct 2004 10:24:42 -0000 1.11 *************** *** 42,46 **** <!-- Loot Packs --> <!-- Missing: --> ! <lootpacks>lootpack_average</lootpacks> <!-- Misc. --> <category>Monsters\Daemonic\Arcane Daemon</category> --- 42,46 ---- <!-- Loot Packs --> <!-- Missing: --> ! <lootpacks>gold_good;gold_good</lootpacks> <!-- Misc. --> <category>Monsters\Daemonic\Arcane Daemon</category> |
From: Thiago B. <hel...@us...> - 2004-10-17 03:56:15
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15536/documentation/webroot Modified Files: ChangeLog.wolfpack Log Message: Defined a few unscripted items (non UOSE related) Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 *** ChangeLog.wolfpack 16 Oct 2004 18:19:21 -0000 1.160 --- ChangeLog.wolfpack 17 Oct 2004 03:56:06 -0000 1.161 *************** *** 24,27 **** --- 24,28 ---- - Fixed bug #0000242 (Missing Vendor: Mapmaker) - Corrected Evaluating Intelligence for all NPCs. + - Defined a few unscripted items (non UOSE related). * Python Script Changes: - Fixed BONUS* properties. |
From: Thiago B. <hel...@us...> - 2004-10-17 03:56:15
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/buildings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15536/definitions/items/buildings Modified Files: fireplaces.xml Log Message: Defined a few unscripted items (non UOSE related) Index: fireplaces.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/buildings/fireplaces.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** fireplaces.xml 21 Jul 2004 04:18:27 -0000 1.7 --- fireplaces.xml 17 Oct 2004 03:56:06 -0000 1.8 *************** *** 213,216 **** --- 213,222 ---- </item> + <item id="932"> + <id>0x932</id> + <nodecay /> + <category>Decoration\Fireplaces & Ovens\Empty Stone Fireplace 2 (N/S) (1/2)</category> + </item> + <item id="935"> <id>0x935</id> *************** *** 310,313 **** --- 316,325 ---- </item> + <item id="95d"> + <id>0x95d</id> + <nodecay /> + <category>Decoration\Fireplaces & Ovens\Empty Stone Fireplace 3 (W/E) (2/2)</category> + </item> + <item id="95f"> <id>0x95f</id> *************** *** 328,331 **** --- 340,349 ---- </item> + <item id="964"> + <id>0x964</id> + <nodecay /> + <category>Decoration\Fireplaces & Ovens\Stone Fireplace 2 (N/S) (1/2)</category> + </item> + <item id="967"> <id>0x967</id> *************** *** 334,337 **** --- 352,361 ---- </item> + <item id="96c"> + <id>0x96c</id> + <nodecay /> + <category>Decoration\Fireplaces & Ovens\Stone Fireplace 3 (N/S) (1/2)</category> + </item> + <!-- Small Stone Fireplace --> <item id="11ec"> |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:20:49
|
Update of /cvsroot/wpdev/xmlscripts/scripts/housing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24789 Added Files: __init__.py consts.py deed.py house.py security.py sign.py Log Message: started housing --- NEW FILE: consts.py --- # Access levels for housing ACCESS_OWNER = 0 ACCESS_COOWNER = 1 ACCESS_FRIEND = 2 ACCESS_ANYONE = 3 --- NEW FILE: sign.py --- import housing.house def escapeHtml(text): text = text.replace('<', '<') text = text.replace('>', '>') return text # # Show a special tooltip for house signs # def onShowTooltip(player, sign, tooltip): tooltip.reset() tooltip.add(1061638, "") # A house sign if not sign.multi: return name = 'nothing' if len(sign.name) != 0: name = escapeHtml(sign.name) tooltip.add(1061639, name) owner = sign.multi.owner if not owner: tooltip.add(1061640, "nobody") else: tooltip.add(1061640, owner.orgname) public = housing.house.isPublic(sign.multi) if public: tooltip.add(1061641, "") else: tooltip.add(1061642, "") --- NEW FILE: security.py --- import wolfpack.gumps from housing.house import checkAccess from housing.consts import * # # Security settings can only be changed by the house owner # def onContextCheckVisible(player, item, tag): return checkAccess(player, item.multi, ACCESS_OWNER) # # Show the security setting gump # def onContextEntry(player, item, entry): if entry != 67: return False if not checkAccess(player, item.multi, ACCESS_OWNER): return False showGump(player, item) return True # # Get the security level for the given item # 0 Owner Only # 1 Co Owners # 2 Friends # 3 Anyone # def getLevel(item): if item.hastag('security_level'): return int(item.gettag('security_level')) return 0 # # Show the gump for a given securable item # def showGump(player, item): if not item.multi: return owner = item.multi.owner level = getLevel(item) dialog = wolfpack.gumps.cGump() dialog.startPage(0) dialog.addBackground(5054, 220, 160) dialog.addTiledGump( 10, 10, 200, 20, 5124 ) dialog.addTiledGump( 10, 40, 200, 20, 5124 ) dialog.addTiledGump( 10, 70, 200, 80, 5124 ) dialog.addCheckerTrans( 10, 10, 200, 140 ) dialog.addXmfHtmlGump( 10, 10, 200, 20, 1061276, False, False, 32767 ) dialog.addXmfHtmlGump( 10, 40, 100, 20, 1041474, False, False, 32767 ) if not owner: dialog.addText( 110, 40, "", 1152 ) else: dialog.addText( 110, 40, owner.name, 1152 ) if level == 0: dialog.addButton( 10, 70, 4006, 4007, 1 ) dialog.addXmfHtmlGump( 45, 70, 150, 20, 1061277, False, False, 0x7F18 ) else: dialog.addButton( 10, 70, 4005, 4007, 1 ) dialog.addXmfHtmlGump( 45, 70, 150, 20, 1061277, False, False, 0x7FFF ) if level == 1: dialog.addButton( 10, 90, 4006, 4007, 2 ) dialog.addXmfHtmlGump( 45, 90, 150, 20, 1061278, False, False, 0x7F18 ) else: dialog.addButton( 10, 90, 4005, 4007, 2 ) dialog.addXmfHtmlGump( 45, 90, 150, 20, 1061278, False, False, 0x7FFF ) if level == 2: dialog.addButton( 10, 110, 4006, 4007, 3 ) dialog.addXmfHtmlGump( 45, 110, 150, 20, 1061279, False, False, 0x7F18 ) else: dialog.addButton( 10, 110, 4005, 4007, 3 ) dialog.addXmfHtmlGump( 45, 110, 150, 20, 1061279, False, False, 0x7FFF ) if level == 3: dialog.addButton( 10, 130, 4006, 4007, 4 ) dialog.addXmfHtmlGump( 45, 130, 150, 20, 1061626, False, False, 0x7F18 ) else: dialog.addButton( 10, 130, 4005, 4007, 4 ) dialog.addXmfHtmlGump( 45, 130, 150, 20, 1061626, False, False, 0x7FFF ) dialog.setArgs([item.serial]) dialog.setCallback("housing.security.callback") dialog.send(player) # # Gump callback # def callback(player, arguments, response): if response.button <= 0 or response.button >= 5: return item = wolfpack.finditem(arguments[0]) if item and item.hasscript('housing.security'): level = response.button - 1 current_level = getLevel(item) if level == current_level: player.socket.clilocmessage(1061281) else: if level == 0: item.deltag('security_level') else: item.settag('security_level', level) player.socket.clilocmessage(1061280) --- NEW FILE: house.py --- import wolfpack from wolfpack import console from wolfpack.consts import * from wolfpack.utilities import hex2dec import housing # # Is the given house public or private? # def isPublic(house): return True # TODO: Public or Private # # Register house # def onAttach(house): housing.registerHouse(house) # # Unregister house # def onDetach(house): housing.unregisterHouse(house) # # Create the housing items # def onCreate(house, definition): buildHouse(house, definition) # # Is the given character the owner of the given house? # def isOwner(house, player): if not house: return False if player.gm or house.owner == player: return True else: return False # # Place items in the house based on a given house definition # def buildHouse(house, definition): node = wolfpack.getdefinition(WPDT_MULTI, definition) if not node: return if node.hasattribute('inherit'): value = str(node.getattribute('inherit')) buildHouse(house, value) # Recursion for i in range(0, node.childcount): child = node.getchild(i) # Inherit another definition if child.name == 'inherit': if child.hasattribute('id'): buildHouse(house, child.getattribute('id')) else: buildHouse(house, child.value) # Add a normal item to the house elif child.name == 'item': x = int(child.getattribute('x', '0')) y = int(child.getattribute('y', '0')) z = int(child.getattribute('z', '0')) id = str(child.getattribute('id', '')) item = wolfpack.additem(id) item.moveto(house.pos.x + x, house.pos.y + y, house.pos.z + z, house.pos.map) item.update() # Add a house door to the house elif child.name == 'door': x = int(child.getattribute('x', '0')) y = int(child.getattribute('y', '0')) z = int(child.getattribute('z', '0')) id = hex2dec(child.getattribute('id', '')) item = wolfpack.additem('housedoor') item.id = id item.moveto(house.pos.x + x, house.pos.y + y, house.pos.z + z, house.pos.map) item.update() # Add a sign to the house elif child.name == 'sign': x = int(child.getattribute('x', '0')) y = int(child.getattribute('y', '0')) z = int(child.getattribute('z', '0')) sign = wolfpack.additem('housesign') sign.moveto(house.pos.x + x, house.pos.y + y, house.pos.z + z, house.pos.map) sign.update() # # Check if access in this house is allowed to the given item # def onCheckSecurity(player, house, item): if not item.hasscript('housing.security'): return False else: level = housing.security.getLevel(item) if not checkAccess(player, house, level): if item.type == 1: # Container player.socket.clilocmessage(501647) # It's secure else: player.socket.clilocmessage(1061637) # It's not accessable return True return False # # Checks if the given player is an owner of the given house # NOTE: This does not check higher access levels. # def isOwner(player, house): return player == house.owner # # Checks if the given player is an co-owner of the given house # NOTE: This does not check higher access levels. # def isCoOwner(player, house): return False # # Checks if the given player is a friend of the house. # NOTE: This does not check higher access levels. # def isFriend(player, house): return False # # Check the access level of the given char for this house # def checkAccess(player, house, level): if not player or not house or level < 0 or level > 3: return False # Error Checks if player.gm or level == ACCESS_ANYONE: return True if level >= ACCESS_OWNER and isOwner(player, house): return True elif level >= ACCESS_COOWNER and isCoOwner(player, house): return True elif level >= ACCESS_FRIEND and isFriend(player, house): return True return False --- NEW FILE: deed.py --- --- NEW FILE: __init__.py --- # # Global house registry # HOUSES = {} # # Register a house in the global registry # def registerHouse(house): if house.owner: HOUSES[house.owner.serial] = house.serial # # Unregister a house from the global registry # def unregisterHouse(house): if house.owner: serial = house.owner.serial if serial in HOUSES: del HOUSES[serial] |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:20:36
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24730/wolfpack Modified Files: consts.py Log Message: started housing Index: consts.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/consts.py,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** consts.py 10 Oct 2004 19:56:43 -0000 1.89 --- consts.py 17 Oct 2004 01:20:26 -0000 1.90 *************** *** 417,421 **** EVENT_SHOWVIRTUEGUMP = 46 EVENT_RESURRECT = 47 ! EVENT_COUNT = 48 """ \end --- 417,422 ---- EVENT_SHOWVIRTUEGUMP = 46 EVENT_RESURRECT = 47 ! EVENT_CHECKSECURITY = 48 ! EVENT_COUNT = 49 """ \end |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:20:36
|
Update of /cvsroot/wpdev/xmlscripts/scripts/skills In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24730/skills Modified Files: mining.py Log Message: started housing Index: mining.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/mining.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** mining.py 13 Oct 2004 19:47:48 -0000 1.40 --- mining.py 17 Oct 2004 01:20:26 -0000 1.41 *************** *** 45,48 **** --- 45,50 ---- def mining( char, pos, tool ): + if not tool: + return False char.addtimer( 1300, "skills.mining.domining", [ tool.serial, pos ] ) char.socket.settag( 'is_mining', ( wolfpack.time.currenttime() + miningdelay ) ) |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:20:29
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24680 Modified Files: ChangeLog contextmenu.cpp dragdrop.cpp pythonscript.cpp pythonscript.h Log Message: housing updates Index: contextmenu.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/contextmenu.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** contextmenu.cpp 5 Sep 2004 21:54:07 -0000 1.24 --- contextmenu.cpp 17 Oct 2004 01:20:19 -0000 1.25 *************** *** 53,57 **** ushort color = Tag->getAttribute( "color" ).toUShort( &ok ); if ( !ok ) ! color = 0x7FE0; // Default bool checkenabled = Tag->getAttribute( "checkenabled", "false" ).lower() == "true"; bool checkvisible = Tag->getAttribute( "checkvisible", "false" ).lower() == "true"; --- 53,57 ---- ushort color = Tag->getAttribute( "color" ).toUShort( &ok ); if ( !ok ) ! color = 0; // Default bool checkenabled = Tag->getAttribute( "checkenabled", "false" ).lower() == "true"; bool checkvisible = Tag->getAttribute( "checkvisible", "false" ).lower() == "true"; Index: pythonscript.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/pythonscript.h,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** pythonscript.h 26 Sep 2004 21:36:23 -0000 1.43 --- pythonscript.h 17 Oct 2004 01:20:19 -0000 1.44 *************** *** 89,92 **** --- 89,93 ---- EVENT_SHOWVIRTUEGUMP, EVENT_RESURRECT, + EVENT_CHECKSECURITY, EVENT_COUNT, }; Index: dragdrop.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v retrieving revision 1.247 retrieving revision 1.248 diff -C2 -d -r1.247 -r1.248 *** dragdrop.cpp 12 Oct 2004 12:55:05 -0000 1.247 --- dragdrop.cpp 17 Oct 2004 01:20:19 -0000 1.248 *************** *** 32,35 **** --- 32,36 ---- #include "serverconfig.h" #include "skills.h" + #include "multi.h" #include "muls/maps.h" #include "network/network.h" *************** *** 80,83 **** --- 81,99 ---- } + P_ITEM outmostCont = pItem->getOutmostItem(); + + cMulti *multi = outmostCont->multi(); + // Check security if using items within a multi + if (multi && multi->canHandleEvent(EVENT_CHECKSECURITY)) { + PyObject *args = Py_BuildValue("(NNN)", pChar->getPyObject(), multi->getPyObject(), outmostCont->getPyObject()); + bool result = multi->callEventHandler(EVENT_CHECKSECURITY, args); + Py_DECREF(args); + + if (result) { + socket->bounceItem( pItem, BR_NO_REASON ); + return; // Access Denied + } + } + if ( pItem->onPickup( pChar ) ) return; *************** *** 117,122 **** }*/ - P_ITEM outmostCont = pItem->getOutmostItem(); - // If the top-most container ( thats important ) is a corpse // and looting is a crime, flag the character criminal. --- 133,136 ---- *************** *** 651,654 **** --- 665,682 ---- } + P_ITEM outmostCont = pCont->getOutmostItem(); + cMulti *multi = outmostCont->multi(); + // Check security if using items within a multi + if (multi && multi->canHandleEvent(EVENT_CHECKSECURITY)) { + PyObject *args = Py_BuildValue("(NNN)", pChar->getPyObject(), multi->getPyObject(), outmostCont->getPyObject()); + bool result = multi->callEventHandler(EVENT_CHECKSECURITY, args); + Py_DECREF(args); + + if (result) { + socket->bounceItem( socket->dragging(), BR_NO_REASON ); + return; // Access Denied + } + } + if ( pItem->onDropOnItem( pCont ) ) { Index: pythonscript.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/pythonscript.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** pythonscript.cpp 9 Oct 2004 14:28:59 -0000 1.54 --- pythonscript.cpp 17 Oct 2004 01:20:19 -0000 1.55 *************** *** 547,550 **** --- 547,561 ---- "onResurrect", + /* + \event onCheckSecurity + \param player The player who is seeking access to an item. + \param multi The multi the object or the object is in. + \param item The item the player is seeking access to. + \condition Triggered when a player tries to use an item that is within a multi, tries to drop an item into a container that is within a multi or tries to grab + an item that is in a container that is in a multi. + \notes Return True to deny access to the item. + */ + "onCheckSecurity", + 0 }; Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** ChangeLog 16 Oct 2004 19:42:55 -0000 1.117 --- ChangeLog 17 Oct 2004 01:20:19 -0000 1.118 *************** *** 60,63 **** --- 60,65 ---- - Added AI Monster_Mage. - Hitpoints are now unsigned. + - Empty context menus are no longer send to the client. + - Added the onCheckSecurity event for housing. Wolfpack 12.9.11 Beta (26. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:20:29
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24680/python Modified Files: item.cpp Log Message: housing updates Index: item.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** item.cpp 12 Oct 2004 23:59:28 -0000 1.138 --- item.cpp 17 Oct 2004 01:20:20 -0000 1.139 *************** *** 748,771 **** } - // If we are in a multi, return the multi object for it - // otherwise pynone - /* - \method item.multi - \description Checks if the item is a multi object, - \return Returns true or false if a multi. - */ - static PyObject* wpItem_multi( wpItem* self, PyObject* args ) - { - Q_UNUSED( args ); - /* - if( self->pItem->free ) - { - Py_RETURN_NONE; - } - return PyGetMultiObject( dynamic_cast< cMulti* >( FindItemBySerial( self->pItem->multis() ) ) - */ - Py_RETURN_NONE; - } - /* \method item.lightning --- 748,751 ---- *************** *** 1213,1217 **** { "getoutmostitem", ( getattrofunc ) wpItem_getoutmostitem, METH_VARARGS, "Get the outmost item." }, { "getname", ( getattrofunc ) wpItem_getname, METH_VARARGS, "Get item name." }, - { "multi", ( getattrofunc ) wpItem_multi, METH_VARARGS, 0 }, { "lightning", ( getattrofunc ) wpItem_lightning, METH_VARARGS, 0 }, { "resendtooltip", ( getattrofunc ) wpItem_resendtooltip, METH_VARARGS, 0 }, --- 1193,1196 ---- |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:20:29
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24680/network Modified Files: uosocket.cpp Log Message: housing updates Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.430 retrieving revision 1.431 diff -C2 -d -r1.430 -r1.431 *** uosocket.cpp 16 Oct 2004 14:06:31 -0000 1.430 --- uosocket.cpp 17 Oct 2004 01:20:20 -0000 1.431 *************** *** 1459,1462 **** --- 1459,1463 ---- contextMenu_.clear(); unsigned int i = 0; + unsigned int totalCount = 0; for ( ; menuIt != bindMenus.end(); ++menuIt ) { *************** *** 1481,1487 **** enabled = false; menuPacket.addEntry( i, ( *it )->cliloc(), enabled ? ( *it )->flags() : ( *it )->flags() | 0x0001, ( *it )->color() ); } } ! if ( i ) // Won't send empty menus send( &menuPacket ); } --- 1482,1489 ---- enabled = false; menuPacket.addEntry( i, ( *it )->cliloc(), enabled ? ( *it )->flags() : ( *it )->flags() | 0x0001, ( *it )->color() ); + totalCount++; } } ! if ( i && totalCount ) // Won't send empty menus send( &menuPacket ); } *************** *** 3098,3101 **** --- 3100,3118 ---- bool cUOSocket::useItem( P_ITEM item ) { + P_ITEM outmostItem = item->getOutmostItem(); + + cMulti *multi = outmostItem->multi(); + + // Check security if using items within a multi + if (multi && multi->canHandleEvent(EVENT_CHECKSECURITY)) { + PyObject *args = Py_BuildValue("(NNN)", _player->getPyObject(), multi->getPyObject(), outmostItem->getPyObject()); + bool result = multi->callEventHandler(EVENT_CHECKSECURITY, args); + Py_DECREF(args); + + if (result) { + return false; // Access Denied + } + } + if (item->type() != 1 && !item->corpse()) { if ( !_player->isGM() && _player->objectDelay() >= Server::instance()->time() ) *************** *** 3161,3174 **** } - // Secure containers - if ( item->isLockedDown() && item->secured() ) - { - if ( !_player->owns( item ) && !_player->isGM() ) - { - sysMessage( tr( "That is a secured chest!" ) ); - return true; - } - } - // Dead ppl can only use ankhs if ( _player->isDead() && item->type() != 16 ) --- 3178,3181 ---- |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:19:42
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24506 Modified Files: scripts.xml Log Message: started housing Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -d -r1.169 -r1.170 *** scripts.xml 13 Oct 2004 00:17:19 -0000 1.169 --- scripts.xml 17 Oct 2004 01:19:33 -0000 1.170 *************** *** 14,17 **** --- 14,23 ---- --> <definitions> + <!-- Housing --> + <script>housing</script> + <script>housing.deed</script> + <script>housing.house</script> + <script>housing.sign</script> + <script>housing.security</script> <script>archery_butte</script> |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:19:42
|
Update of /cvsroot/wpdev/xmlscripts/definitions/multis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24506/multis Modified Files: houses.xml Log Message: started housing Index: houses.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/multis/houses.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** houses.xml 20 Sep 2004 03:56:23 -0000 1.8 --- houses.xml 17 Oct 2004 01:19:33 -0000 1.9 *************** *** 8,11 **** --- 8,31 ---- --> <definitions> + <!-- Context Menu for securables --> + <contextmenu id="security_menu"> + <scripts>housing.security</scripts> + <option tag="67" msgid="6203" checkvisible="true" color="0" /> + </contextmenu> + + <item id="housedoor"> + <nodecay /> + <movable>3</movable> + <basescripts>housing.security,door</basescripts> + <bindmenu>security_menu</bindmenu> + </item> + + <item id="housesign"> + <id>0xbd2</id> + <nodecay /> + <movable>3</movable> + <basescripts>housing.sign</basescripts> + </item> + <multi id="4064"> <name>Small Stone and Plaster House</name> *************** *** 13,16 **** --- 33,50 ---- <nodecay /> </multi> + + <!-- Base for small houses --> + <multi id="smallhouse_items"> + <door x="0" y="3" z="7" id="0x6a5" /> <!-- Wooden door facing south --> + <sign x="2" y="4" z="5" /> + </multi> + + <multi id="small_stone_and_plaster_house"> + <inherit id="smallhouse_items" /> + <name>Small Stone and Plaster House</name> + <id>0x4064</id> + <nodecay /> + <scripts>housing.house</scripts> <!-- Because of onAttach this is not a basescript --> + </multi> <multi id="4065"> |
From: Sebastian H. <dar...@us...> - 2004-10-17 01:19:38
|
Update of /cvsroot/wpdev/xmlscripts/scripts/housing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24486/housing Log Message: Directory /cvsroot/wpdev/xmlscripts/scripts/housing added to the repository |