Obj Stacking

From: Edgar Watson (pidarve@yahoo.com)
Date: 02/05/00


When ever the room desc is too long, not exactly sure on the byte size,
and there are ojbects in the room,
often the stacking does work, and objects "disappear" from the look
screen.  Here is my list_obj_to_char

void list_obj_to_char(struct obj_data * list, struct char_data * ch, int
mode, bool show)
{
  struct obj_data *i, *j;
  char buf[10];
  bool found;
  int num;

  found = FALSE;
  for (i = list; i; i = i->next_content) {
    num = 0;
    for (j = list; j != i; j = j->next_content)
      if (j->item_number==NOTHING) {
        if (strcmp(j->short_description,i->short_description)==0) break;

      } else if (j->item_number==i->item_number) break;
    if (j!=i) continue;
    for (j = i; j; j = j->next_content)
      if (j->item_number==NOTHING) {
        if (strcmp(j->short_description,i->short_description)==0) num++;

      } else if (j->item_number==i->item_number) num++;
    if (CAN_SEE_OBJ(ch, i)) {
      if (num!=1) {
        *buf = '\0';
        sprintf(buf,"(%2i) ",num);
        send_to_char(buf,ch);
      }
    show_obj_to_char(i, ch, mode);
    found = TRUE;
    }
  }
  if (!found && show)
  send_to_char(" Nothing.\r\n", ch);
}



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


     +------------------------------------------------------------+
     | 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 : 04/10/01 PDT