"Wirkungsdauer von Wasserelementar anzeigen"

curseinfos fuer schiffe u.a. repariert.
This commit is contained in:
Enno Rehling 2007-02-11 12:10:51 +00:00
parent c61249cea4
commit a80d69ceb5
4 changed files with 405 additions and 399 deletions

View File

@ -256,8 +256,7 @@ print_curses(FILE * F, const faction * viewer, const void * obj, typ_t typ)
} else { } else {
sprintf(buf, "an unknown curse lies on the region. (%s)", itoa36(c->no)); sprintf(buf, "an unknown curse lies on the region. (%s)", itoa36(c->no));
} }
} } else {
if (dh==1) {
if (!header) { if (!header) {
header = 1; header = 1;
fputs("EFFECTS\n", F); fputs("EFFECTS\n", F);

View File

@ -46,9 +46,13 @@ cinfo_building(const struct locale * lang, const void * obj, typ_t typ, curse *c
} else { /* outside */ } else { /* outside */
msg = msg_message(mkname("curseinfo", "buildingunknown"), "id", c->no); msg = msg_message(mkname("curseinfo", "buildingunknown"), "id", c->no);
} }
if (msg) {
nr_render(msg, lang, buf, sizeof(buf), NULL); nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg); msg_release(msg);
return 1; return 1;
}
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
return 0;
} }
/* CurseInfo mit Spezialabfragen */ /* CurseInfo mit Spezialabfragen */

View File

@ -46,16 +46,20 @@ cinfo_ship(const struct locale * lang, const void * obj, typ_t typ, curse *c, in
} else { } else {
msg = msg_message(mkname("curseinfo", "shipunknown"), "id", c->no); msg = msg_message(mkname("curseinfo", "shipunknown"), "id", c->no);
} }
if (msg) {
nr_render(msg, lang, buf, sizeof(buf), NULL); nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg); msg_release(msg);
return 1; return 1;
}
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
return 0;
} }
/* CurseInfo mit Spezialabfragen */ /* CurseInfo mit Spezialabfragen */
/* C_SHIP_NODRIFT */ /* C_SHIP_NODRIFT */
static int static int
cinfo_shipnodrift(const struct locale * lang, void * obj, typ_t typ, curse *c, int self) cinfo_shipnodrift(const struct locale * lang, const void * obj, typ_t typ, curse *c, int self)
{ {
ship * sh; ship * sh;
unused(typ); unused(typ);
@ -80,13 +84,11 @@ cinfo_shipnodrift(const struct locale * lang, void * obj, typ_t typ, curse *c, i
static struct curse_type ct_stormwind = { "stormwind", static struct curse_type ct_stormwind = { "stormwind",
CURSETYP_NORM, 0, NO_MERGE, CURSETYP_NORM, 0, NO_MERGE,
"", "", cinfo_ship
NULL
}; };
static struct curse_type ct_flyingship = { "flyingship", static struct curse_type ct_flyingship = { "flyingship",
CURSETYP_NORM, 0, NO_MERGE, CURSETYP_NORM, 0, NO_MERGE,
"", "", cinfo_ship
NULL
}; };
static struct curse_type ct_nodrift = { "nodrift", static struct curse_type ct_nodrift = { "nodrift",
CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ), CURSETYP_NORM, 0, ( M_DURATION | M_VIGOUR ),
@ -98,11 +100,11 @@ static struct curse_type ct_nodrift = { "nodrift",
}; };
static struct curse_type ct_shipdisorientation = { "shipdisorientation", static struct curse_type ct_shipdisorientation = { "shipdisorientation",
CURSETYP_NORM, 0, NO_MERGE, CURSETYP_NORM, 0, NO_MERGE,
"Dieses Schiff hat sich verfahren." "Dieses Schiff hat sich verfahren.", cinfo_ship
}; };
static struct curse_type ct_shipspeedup = { "shipspeedup", static struct curse_type ct_shipspeedup = { "shipspeedup",
CURSETYP_NORM, 0, 0, CURSETYP_NORM, 0, 0,
NULL NULL, cinfo_ship
}; };
void void

View File

@ -49,11 +49,12 @@ cinfo_unit(const struct locale * lang, const void * obj, typ_t typ, struct curse
assert(typ == TYP_UNIT); assert(typ == TYP_UNIT);
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no); msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
if (msg==NULL) { if (msg) {
nr_render(msg, lang, buf, sizeof(buf), NULL); nr_render(msg, lang, buf, sizeof(buf), NULL);
msg_release(msg); msg_release(msg);
return 1; return 1;
} }
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
return 0; return 0;
} }