Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Adorment fix for rings/amulets



This diff fixes the (adorment) text that appear in rings and amulets when
you are using FULL_RING_DESCRIPTION.  Also fixes the (adorment) for amulets
when you are not using FRD.


*** item.OLD	Mon May 30 23:50:28 1994
--- item.c	Tue May 31 00:03:07 1994
***************
*** 212,219 ****
--- 212,221 ----
  #ifdef FULL_RING_DESCRIPTION
      if (QUERY_FLAG(op, FLAG_IDENTIFIED)) {
      int attr, val;
+     char *buf_add;
  
      strcat(buf, " ");
+     buf_add = buf + strlen(buf);
      for (attr=0; attr<6; attr++) {
  	if ((val=get_attr_value(&(op->stats),attr))!=0) {
  	    sprintf(buf2,"(%s%+d)", short_stat_name[attr],val);
***************
*** 272,277 ****
--- 274,281 ----
      DESCRIBE_PATH(buf, op->path_attuned, "Attuned");
      DESCRIBE_PATH(buf, op->path_repelled, "Repelled");
      DESCRIBE_PATH(buf, op->path_denied, "Denied");
+     if(buf_add[0]=='\0')
+       strcat(buf,"(adorment)");
      }
  #endif
      break;
***************
*** 537,545 ****
      }
  #ifdef FULL_RING_DESCRIPTION
      }
! #endif
!     if(retbuf[0]=='\0'&&op->type==RING)
        strcat(retbuf,"(adorment)");
    }
    if(QUERY_FLAG(op,FLAG_MONSTER)) {
      if(QUERY_FLAG(op,FLAG_UNDEAD))
--- 541,550 ----
      }
  #ifdef FULL_RING_DESCRIPTION
      }
! #else
!     if(retbuf[0]=='\0'&& (op->type==RING || op->type==AMULET))
        strcat(retbuf,"(adorment)");
+ #endif
    }
    if(QUERY_FLAG(op,FLAG_MONSTER)) {
      if(QUERY_FLAG(op,FLAG_UNDEAD))