[Question] dig/bury

From: Edward Felch (dustlos@hotmail.com)
Date: 04/02/01


I noticed an odd bug in digging/searching up buried items recently, it seems
to search the entire world for buried items and uncovers them, can anybody
help me with where the loop or whatnot is going wrong?


  obj = world[IN_ROOM(ch)].contents;

  while (obj != NULL) {
    if (IS_BURIED(obj)) {
       /* Remove the buried bit so the player can see it. */
       REMOVE_BIT(GET_OBJ_EXTRA(obj), ITEM_BURIED);
       if (CAN_SEE_OBJ(ch, obj)) {
          found_item = 1;     /* player found something */
          act("You found $a $o buried here.\r\n", TRUE, ch, obj, NULL,
TO_CHAR);
          act("$n has found $a $o buried here.\r\n", TRUE, ch, obj,
NULL,TO_ROOM);
          GET_OBJ_WEAR(obj) += ITEM_WEAR_TAKE;
          obj_from_room(obj);
          obj_to_char(obj, ch);
       }
       else {
          SET_BIT(GET_OBJ_EXTRA(obj), ITEM_BURIED);
       }
    }
    /* go to the next obj */
    obj = obj->next;
  }

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/05/01 PST