forked from github/server
%s for %u
This commit is contained in:
parent
18c1971e2e
commit
eeac273e97
1 changed files with 7 additions and 7 deletions
|
@ -677,11 +677,11 @@ check_mages(void)
|
||||||
attrib * a = a_find(u->attribs, &at_eventhandler);
|
attrib * a = a_find(u->attribs, &at_eventhandler);
|
||||||
trigger ** triggers = NULL;
|
trigger ** triggers = NULL;
|
||||||
if (a==NULL) {
|
if (a==NULL) {
|
||||||
log_error(("%u is a familar, but has no eventhandler.\n", unitname(u)));
|
log_error(("%s is a familar, but has no eventhandler.\n", unitname(u)));
|
||||||
} else {
|
} else {
|
||||||
triggers = get_triggers(a, "destroy");
|
triggers = get_triggers(a, "destroy");
|
||||||
if (!triggers) {
|
if (!triggers) {
|
||||||
log_error(("%u is a familiar, but has no 'destroy' events.\n", unitname(u)));
|
log_error(("%s is a familiar, but has no 'destroy' events.\n", unitname(u)));
|
||||||
} else {
|
} else {
|
||||||
while (*triggers) {
|
while (*triggers) {
|
||||||
trigger * t = *triggers;
|
trigger * t = *triggers;
|
||||||
|
@ -689,7 +689,7 @@ check_mages(void)
|
||||||
triggers = &t->next;
|
triggers = &t->next;
|
||||||
}
|
}
|
||||||
if (*triggers == NULL) {
|
if (*triggers == NULL) {
|
||||||
log_error(("%u is a familiar, but has no 'destroy/shock' event.\n", unitname(u)));
|
log_error(("%s is a familiar, but has no 'destroy/shock' event.\n", unitname(u)));
|
||||||
triggers = NULL;
|
triggers = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -698,7 +698,7 @@ check_mages(void)
|
||||||
add_trigger(&u->attribs, "destroy", trigger_shock(mage));
|
add_trigger(&u->attribs, "destroy", trigger_shock(mage));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log_error(("%u is a familiar, but has no mage - removing mage-attribute.\n", unitname(u)));
|
log_error(("%s is a familiar, but has no mage - removing mage-attribute.\n", unitname(u)));
|
||||||
a_removeall(&u->attribs, &at_mage);
|
a_removeall(&u->attribs, &at_mage);
|
||||||
set_level(u, SK_MAGIC, 0);
|
set_level(u, SK_MAGIC, 0);
|
||||||
}
|
}
|
||||||
|
@ -708,11 +708,11 @@ check_mages(void)
|
||||||
attrib * a = a_find(u->attribs, &at_eventhandler);
|
attrib * a = a_find(u->attribs, &at_eventhandler);
|
||||||
trigger ** triggers = NULL;
|
trigger ** triggers = NULL;
|
||||||
if (a==NULL) {
|
if (a==NULL) {
|
||||||
log_error(("%u is a mage with a familiar, but has no eventhandler.\n", unitname(u)));
|
log_error(("%s is a mage with a familiar, but has no eventhandler.\n", unitname(u)));
|
||||||
} else {
|
} else {
|
||||||
triggers = get_triggers(a, "destroy");
|
triggers = get_triggers(a, "destroy");
|
||||||
if (!triggers) {
|
if (!triggers) {
|
||||||
log_error(("%u is a mage with a familiar, but has no 'destroy' events.\n", unitname(u)));
|
log_error(("%s is a mage with a familiar, but has no 'destroy' events.\n", unitname(u)));
|
||||||
} else {
|
} else {
|
||||||
while (*triggers) {
|
while (*triggers) {
|
||||||
trigger * t = *triggers;
|
trigger * t = *triggers;
|
||||||
|
@ -720,7 +720,7 @@ check_mages(void)
|
||||||
triggers = &t->next;
|
triggers = &t->next;
|
||||||
}
|
}
|
||||||
if (*triggers == NULL) {
|
if (*triggers == NULL) {
|
||||||
log_error(("%u is a mage with a familiar, but has no 'destroy/killunit' event.\n", unitname(u)));
|
log_error(("%s is a mage with a familiar, but has no 'destroy/killunit' event.\n", unitname(u)));
|
||||||
triggers = NULL;
|
triggers = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue