forked from github/server
remove deprecated report functions
This commit is contained in:
parent
d4400bb583
commit
11ce5a2f32
|
@ -164,16 +164,6 @@ void report_status(const unit * u, const struct locale *lang, struct sbstring *s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t report_status_depr(const unit * u, const struct locale *lang, char *fsbuf, size_t buflen)
|
|
||||||
{
|
|
||||||
sbstring sbs;
|
|
||||||
|
|
||||||
sbs_init(&sbs, fsbuf, buflen);
|
|
||||||
report_status(u, lang, &sbs);
|
|
||||||
return sbs_length(&sbs);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const char *hp_status(const unit * u)
|
const char *hp_status(const unit * u)
|
||||||
{
|
{
|
||||||
double p;
|
double p;
|
||||||
|
@ -2276,13 +2266,6 @@ void report_race_skills(const race *rc, const struct locale *lang, sbstring *sbp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void report_race_skills_depr(const race *rc, char *zText, size_t length, const struct locale *lang)
|
|
||||||
{
|
|
||||||
sbstring sbs;
|
|
||||||
sbs_init(&sbs, zText, length);
|
|
||||||
report_race_skills(rc, lang, &sbs);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void eval_direction(struct opstack **stack, const void *userdata)
|
static void eval_direction(struct opstack **stack, const void *userdata)
|
||||||
{
|
{
|
||||||
const faction *report = (const faction *)userdata;
|
const faction *report = (const faction *)userdata;
|
||||||
|
|
|
@ -78,8 +78,6 @@ extern "C" {
|
||||||
|
|
||||||
const char *trailinto(const struct region *r,
|
const char *trailinto(const struct region *r,
|
||||||
const struct locale *lang);
|
const struct locale *lang);
|
||||||
size_t report_status_depr(const struct unit *u,
|
|
||||||
const struct locale *lang, char *buf, size_t siz);
|
|
||||||
void report_battle_start(struct battle * b);
|
void report_battle_start(struct battle * b);
|
||||||
|
|
||||||
void register_reports(void);
|
void register_reports(void);
|
||||||
|
@ -102,8 +100,9 @@ extern "C" {
|
||||||
int report_items(const struct unit *u, struct item *result, int size,
|
int report_items(const struct unit *u, struct item *result, int size,
|
||||||
const struct unit *owner, const struct faction *viewer);
|
const struct unit *owner, const struct faction *viewer);
|
||||||
void report_warnings(struct faction *f, int now);
|
void report_warnings(struct faction *f, int now);
|
||||||
|
void report_status(const struct unit * u, const struct locale *lang, struct sbstring *sbp);
|
||||||
void report_raceinfo(const struct race *rc, const struct locale *lang, struct sbstring *sbp);
|
void report_raceinfo(const struct race *rc, const struct locale *lang, struct sbstring *sbp);
|
||||||
void report_race_skills_depr(const struct race *rc, char *zText, size_t length, const struct locale *lang);
|
void report_race_skills(const struct race *rc, const struct locale *lang, struct sbstring *sbp);
|
||||||
void report_item(const struct unit *owner, const struct item *i,
|
void report_item(const struct unit *owner, const struct item *i,
|
||||||
const struct faction *viewer, const char **name, const char **basename,
|
const struct faction *viewer, const char **name, const char **basename,
|
||||||
int *number, bool singular);
|
int *number, bool singular);
|
||||||
|
|
|
@ -560,6 +560,7 @@ static int sp_summon_familiar(castorder * co)
|
||||||
const race *rc;
|
const race *rc;
|
||||||
message *msg;
|
message *msg;
|
||||||
char zText[2048];
|
char zText[2048];
|
||||||
|
sbstring sbs;
|
||||||
|
|
||||||
if (get_familiar(caster) != NULL) {
|
if (get_familiar(caster) != NULL) {
|
||||||
cmistake(caster, co->order, 199, MSG_MAGIC);
|
cmistake(caster, co->order, 199, MSG_MAGIC);
|
||||||
|
@ -600,7 +601,8 @@ static int sp_summon_familiar(castorder * co)
|
||||||
msg_release(msg);
|
msg_release(msg);
|
||||||
make_familiar(caster, r, rc, zText);
|
make_familiar(caster, r, rc, zText);
|
||||||
|
|
||||||
report_race_skills_depr(rc, zText, sizeof(zText), caster->faction->locale);
|
sbs_init(&sbs, zText, sizeof(zText));
|
||||||
|
report_race_skills(rc, caster->faction->locale, &sbs);
|
||||||
ADDMSG(&caster->faction->msgs, msg_message("familiar_describe",
|
ADDMSG(&caster->faction->msgs, msg_message("familiar_describe",
|
||||||
"mage race skills", caster, rc, zText));
|
"mage race skills", caster, rc, zText));
|
||||||
return cast_level;
|
return cast_level;
|
||||||
|
|
|
@ -48,8 +48,10 @@
|
||||||
void spy_message(int spy, const unit * u, const unit * target)
|
void spy_message(int spy, const unit * u, const unit * target)
|
||||||
{
|
{
|
||||||
char status[32];
|
char status[32];
|
||||||
|
sbstring sbs;
|
||||||
|
|
||||||
report_status_depr(target, u->faction->locale, status, sizeof(status));
|
sbs_init(&sbs, status, sizeof(status));
|
||||||
|
report_status(u, u->faction->locale, &sbs);
|
||||||
|
|
||||||
ADDMSG(&u->faction->msgs, msg_message("spyreport", "spy target status", u,
|
ADDMSG(&u->faction->msgs, msg_message("spyreport", "spy target status", u,
|
||||||
target, status));
|
target, status));
|
||||||
|
|
Loading…
Reference in New Issue