forked from github/server
"Wirkungsdauer von Wasserelementar anzeigen" curseinfos fuer schiffe u.a. repariert.
This commit is contained in:
parent
c61249cea4
commit
a80d69ceb5
|
@ -256,8 +256,7 @@ print_curses(FILE * F, const faction * viewer, const void * obj, typ_t typ)
|
|||
} else {
|
||||
sprintf(buf, "an unknown curse lies on the region. (%s)", itoa36(c->no));
|
||||
}
|
||||
}
|
||||
if (dh==1) {
|
||||
} else {
|
||||
if (!header) {
|
||||
header = 1;
|
||||
fputs("EFFECTS\n", F);
|
||||
|
|
|
@ -46,9 +46,13 @@ cinfo_building(const struct locale * lang, const void * obj, typ_t typ, curse *c
|
|||
} else { /* outside */
|
||||
msg = msg_message(mkname("curseinfo", "buildingunknown"), "id", c->no);
|
||||
}
|
||||
if (msg) {
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
return 1;
|
||||
}
|
||||
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* CurseInfo mit Spezialabfragen */
|
||||
|
|
|
@ -46,16 +46,20 @@ cinfo_ship(const struct locale * lang, const void * obj, typ_t typ, curse *c, in
|
|||
} else {
|
||||
msg = msg_message(mkname("curseinfo", "shipunknown"), "id", c->no);
|
||||
}
|
||||
if (msg) {
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
return 1;
|
||||
}
|
||||
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* CurseInfo mit Spezialabfragen */
|
||||
|
||||
/* C_SHIP_NODRIFT */
|
||||
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;
|
||||
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",
|
||||
CURSETYP_NORM, 0, NO_MERGE,
|
||||
"",
|
||||
NULL
|
||||
"", cinfo_ship
|
||||
};
|
||||
static struct curse_type ct_flyingship = { "flyingship",
|
||||
CURSETYP_NORM, 0, NO_MERGE,
|
||||
"",
|
||||
NULL
|
||||
"", cinfo_ship
|
||||
};
|
||||
static struct curse_type ct_nodrift = { "nodrift",
|
||||
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",
|
||||
CURSETYP_NORM, 0, NO_MERGE,
|
||||
"Dieses Schiff hat sich verfahren."
|
||||
"Dieses Schiff hat sich verfahren.", cinfo_ship
|
||||
};
|
||||
static struct curse_type ct_shipspeedup = { "shipspeedup",
|
||||
CURSETYP_NORM, 0, 0,
|
||||
NULL
|
||||
NULL, cinfo_ship
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
@ -49,11 +49,12 @@ cinfo_unit(const struct locale * lang, const void * obj, typ_t typ, struct curse
|
|||
assert(typ == TYP_UNIT);
|
||||
|
||||
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
|
||||
if (msg==NULL) {
|
||||
if (msg) {
|
||||
nr_render(msg, lang, buf, sizeof(buf), NULL);
|
||||
msg_release(msg);
|
||||
return 1;
|
||||
}
|
||||
log_warning(("There is no curseinfo for %s.\n", c->type->cname));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue