Re: [CODE IDEA] Object Timers

From: John Evans (evansj@HI-LINE.NET)
Date: 04/22/98

On Wed, 22 Apr 1998, Mark A. Heilpern wrote:

> The GET_OBJ_TIMER() field, as gest as I could see, was only
> being used for corpse removal (and, most portal spells make use
> of it to remove them as well). I started out my changes by creating
> a ITEM_DISAPPEARS flag, and in point_update() {limits.c, where
> corpse removal is handled} I search all objects, and those with this
> flag have the timer decremented and, upon zero, the item is extracted.

Save yourself the flag and decrement the timer if the timer is greater
than zero. If the timer is at zero, then assume the it should never
degrade and that the item is "permanent".

When decrementing the timer, as soon as the timer hits zero is vanishes,
transforms or does whatver it is the object should do when the timer
expires. If you don't handle the timer right away, then the object's
timer will hit zero and default into "permanent" status. All of this is
handled in limits.c in point_update().

I did this, and it works great!

John Evans <>  --

Any sufficiently advanced technology is indistinguishable from magic.
  -- Arthur C. Clarke

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST