[CODE] IN_ROOM & the new DG_Scripts Patch

From: Phillip Cowan (pcowan@ASAPINTRA.NET)
Date: 05/06/99


Hey, all

     I have just added the DG_6_to_7.Patch for dg_scripts to my Circle30bpl15
MUD, and I have traced an issue to this problem.

     DG_Scripts added this line to the equip mob area of reset_zone in db.c:

+++
     case 'E':   /* object to equipment list */
      if (!mob) {
 ZONE_ERROR("trying to equip non-existant mob, command disabled");
 ZCMD.command = '*';
 break;
      }
        if ((obj_index[ZCMD.arg1].number < ZCMD.arg2) &&
           mob_load && (number(1, 100) <= ZCMD.arg4)) {
        if (ZCMD.arg3 < 0 || ZCMD.arg3 >= NUM_WEARS) {
          ZONE_ERROR("invalid equipment pos number");
        } else {
   obj = read_object(ZCMD.arg1, REAL);
+   IN_ROOM(obj) = IN_ROOM(mob);
   load_otrigger(obj);
       if (wear_otrigger(obj, mob, ZCMD.arg3))
     equip_char(mob, obj, ZCMD.arg3);
          else
            obj_to_char(obj, mob);
          tobj = obj;
   last_cmd = 1;
 }
      } else
 last_cmd = 0;
 tmob = NULL;
      break;

+++

     This then triggers this error in equip_char in handler.c:
          if (obj->in_room != NOWHERE) {
            log("SYSERR: EQUIP: Obj is in_room when equip.");
            return;
          }

     So now I get thousands of those error messages and also I assume my mobs
are not equiped.
     Here's what I did to fix this.  I just comented out this in db.c and the
error codes go away.
        /* IN_ROOM(obj) = IN_ROOM(mob); */

     So, of course, my issue then is this.  Why is the code in there?  Do I need it?  By
commenting it out, is this going to affect other areas I have not seen yet?

     Thanks,
        -p


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



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