Re: proposal for function for stock circle

From: Brian Orlick (
Date: 05/14/03

Quoting Thomas Arp <>:
> From: "Edward J Glamkowski" <>
> > So clearly we need:
> > send_to_zone
> You mean like this ?
>     if (IN_ROOM(i->character) == NOWHERE ||
>         world[IN_ROOM(i->character)].zone != zrnum)
>       continue;

Looking at this, there apepars to be a small bug in it.  Namely, you disregard
rooms which may be part of more than one zone.  Your method would prevent a zone
which is wholly contained inside of another zone from being sent anything.  Upon
further research, the same bug exists in is_empty() in db.c, causing a "reset
only when empty" zone in the same state to always reset when time is due, even
if it is not empty.

In your case, the above (non-snipped) code would have to be replaced by:

 if (world[IN_ROOM(i->character)].number > zone_table[zrnum].top ||
     world[IN_ROOM(i->character)].number < zone_table[zrnum].bot)

For is_empty():

- if (world[IN_ROOM(i->character)].zone != zone_nr)
-      continue;
+ if (world[IN_ROOM(i->character)].number > zone_table[zone_nr].top ||
+     world[IN_ROOM(i->character)].number < zone_table[zone_nr].bot)
+     continue;

Feel free to correct me.  Otherwise, change should probably be added to next
revision of Circle.

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/26/03 PDT