[CF-Devel] CVS update: crossfire/common
Crossfire CVS devel
mwedel at scruznet.com
Wed Oct 18 15:00:39 CDT 2000
Date: Wednesday October 18, 2000 @ 13:00
Author: peterm
Update of /home/cvs/CVS/crossfire/common
In directory boltzmann.eecs.berkeley.edu:/tmp/cvs-serv27542
Modified Files:
item.c
Log Message:
Map.c was NOT changed.
item.c was changed to use op->slaying for spellbooks.
****************************************
Index: crossfire/common/item.c
diff -u crossfire/common/item.c:1.9 crossfire/common/item.c:1.10
--- crossfire/common/item.c:1.9 Sun Aug 6 22:16:34 2000
+++ crossfire/common/item.c Wed Oct 18 13:00:39 2000
@@ -1,6 +1,6 @@
/*
* static char *rcsid_item_c =
- * "$Id: item.c,v 1.9 2000/08/07 05:16:34 cvs Exp $";
+ * "$Id: item.c,v 1.10 2000/10/18 20:00:39 peterm Exp $";
*/
/*
@@ -244,9 +244,23 @@
}
switch(op->type) {
+ case SPELLBOOK:
+ if (QUERY_FLAG(op,FLAG_IDENTIFIED)||QUERY_FLAG(op,FLAG_BEEN_APPLIED)) {
+ if(!op->title) {
+ safe_strcat(buf," of ", &len, HUGE_BUF);
+ if(op->slaying) safe_strcat(buf,op->slaying, &len, HUGE_BUF);
+ else
+ safe_strcat(buf,spells[op->stats.sp].name, &len, HUGE_BUF);
+ if(op->type != SPELLBOOK) {
+ sprintf(buf2, " (lvl %d)", op->level);
+ safe_strcat(buf, buf2, &len, HUGE_BUF);
+ }
+ }
+ }
+
+ break;
case SCROLL:
case WAND:
- case SPELLBOOK:
case ROD:
if (QUERY_FLAG(op,FLAG_IDENTIFIED)||QUERY_FLAG(op,FLAG_BEEN_APPLIED)) {
if(!op->title) {
@@ -427,9 +441,21 @@
}
switch(op->type) {
+ case SPELLBOOK:
+ if (QUERY_FLAG(op,FLAG_IDENTIFIED)||QUERY_FLAG(op,FLAG_BEEN_APPLIED)) {
+ if(!op->title) {
+ strcat(buf," of ");
+ if(op->slaying) strcat(buf,op->slaying);
+ else
+ strcat(buf,spells[op->stats.sp].name);
+ if(op->type != SPELLBOOK)
+ sprintf(buf+strlen(buf), " (lvl %d)", op->level);
+ }
+ }
+ break;
case SCROLL:
case WAND:
- case SPELLBOOK:
+
case ROD:
if (QUERY_FLAG(op,FLAG_IDENTIFIED)||QUERY_FLAG(op,FLAG_BEEN_APPLIED)) {
if(!op->title) {
More information about the crossfire
mailing list