ZEDIT Fix for Oasis and OLC+

From: Tony Robbins [Kupek] (tonyr@NWPACLINK.COM)
Date: 09/20/98


I found a little bug in zedit when creating new zones that appears to be
in Oasis and OLC+.  Simple enough, all rooms in all zones after the zone
created are wrong.

If you have zones 0, 1, 10, 50, and 200, and create a new zone #2.
0 and 1 are fine.
Rooms in zone 10 believe they're in zone 2 (stat room).
Rooms in zone 50 believe they're in zone 10.
Rooms in zone 200 believe they're in zone 50.

The reason is that "zone" on struct room_data is a rnum, and is never
updated when a new zone is made.  To fix, add an 'int j' to the top of
zedit_new_zone, then, down where it says:
  /*
   * Copy remaining zones into the table one higher, unless of course we
   * are appending to the end in which case this loop will not be used.
   */
Delete the for loop there (it's just a for() then one line), and then put
this in its place:
  for (; i <= top_of_zone_table; i++) {
    new_table[i + 1] = zone_table[i];
    for (j = zone_table[i].number * 100; j <= zone_table[i].top; j++)
      /* increment the zone number */
      world[real_room(j)].zone++;
  }

This has worked fine for me now.  My problem was when I was using a room's
zone to get information, for zone flags and such.

[-------------------------------------------]
  Tony Robbins, <tonyr@nwpaclink.com>
  LakeView Technologies, Inc.
[-------------------------------------------]


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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