--- deliantra/server/common/item.C 2006/08/29 08:01:35 1.2 +++ deliantra/server/common/item.C 2006/09/03 00:18:40 1.3 @@ -1,6 +1,6 @@ /* * static char *rcsid_item_c = - * "$Id: item.C,v 1.2 2006/08/29 08:01:35 root Exp $"; + * "$Id: item.C,v 1.3 2006/09/03 00:18:40 root Exp $"; */ /* @@ -481,7 +481,7 @@ } } if(op->stats.exp) - sprintf(buf+strlen(buf), "(speed %+lld)", op->stats.exp); + sprintf(buf+strlen(buf), "(speed %+lld)", (long long)op->stats.exp); if(op->stats.wc) sprintf(buf+strlen(buf), "(wc%+d)", op->stats.wc); if(op->stats.dam) @@ -563,7 +563,7 @@ if (op->inv) safe_strcat(buf,op->inv->name, &len, HUGE_BUF); else - LOG(llevError,"Spellbook %s lacks inventory\n", op->name); + LOG(llevError,"Spellbook %s lacks inventory\n", &op->name); } if(op->type != SPELLBOOK) { sprintf(buf2, " (lvl %d)", op->level); @@ -760,7 +760,7 @@ if (op->inv) safe_strcat(buf,op->inv->name, &len, MAX_BUF); else - LOG(llevError,"Spellbook %s lacks inventory\n", op->name); + LOG(llevError,"Spellbook %s lacks inventory\n", &op->name); } if(op->type != SPELLBOOK) { sprintf(buf2, " (lvl %d)", op->level); @@ -1083,7 +1083,7 @@ } if(op->stats.exp) { - sprintf(buf,"(speed %+lld)",op->stats.exp); + sprintf(buf,"(speed %+lld)", (long long)op->stats.exp); strcat(retbuf,buf); } @@ -1233,7 +1233,7 @@ if(QUERY_FLAG(op,FLAG_STEALTH)) strcat(retbuf,"(stealth)"); if(op->slaying!=NULL && op->type != FOOD) { - sprintf(buf,"(slay %s)",op->slaying); + sprintf(buf,"(slay %s)", &op->slaying); strcat(retbuf,buf); } DESCRIBE_ABILITY(retbuf, op->attacktype, "Attacks"); @@ -1392,15 +1392,13 @@ SET_FLAG(op,FLAG_KNOWN_CURSED); if (op->type == POTION) { - if (op->inv && op->randomitems) { - if (op->title) free_string(op->title); - op->title = add_refcount(op->inv->name); - } else if (op->arch) { - free_string(op->name); - op->name = add_refcount(op->arch->clone.name); - free_string(op->name_pl); - op->name_pl = add_refcount(op->arch->clone.name_pl); - } + if (op->inv && op->randomitems) + op->title = op->inv->name; + else if (op->arch) + { + op->name = op->arch->clone.name; + op->name_pl = op->arch->clone.name_pl; + } } /* If the object is on a map, make sure we update its face */