forked from github/server
"Übergaben haben teilweise geklappt trotz fehlendem helfestatus"
This commit is contained in:
parent
d7be4a21c2
commit
111051a580
5 changed files with 20 additions and 27 deletions
|
@ -603,6 +603,7 @@ give_cmd(unit * u, order * ord)
|
|||
s = getstrtoken();
|
||||
p = findparam(s, u->faction->locale);
|
||||
|
||||
/* first, do all the ones that do not require HELP_GIVE or CONTACT */
|
||||
if (p == P_CONTROL) {
|
||||
message * msg;
|
||||
|
||||
|
@ -633,7 +634,7 @@ give_cmd(unit * u, order * ord)
|
|||
freset(u, UFL_OWNER);
|
||||
fset(u2, UFL_OWNER);
|
||||
|
||||
msg = msg_message("givecommand", "unit receipient", u, u2);
|
||||
msg = msg_message("givecommand", "unit recipient", u, u2);
|
||||
add_message(&u->faction->msgs, msg);
|
||||
if (u->faction != u2->faction) {
|
||||
add_message(&u2->faction->msgs, msg);
|
||||
|
@ -647,21 +648,17 @@ give_cmd(unit * u, order * ord)
|
|||
return;
|
||||
}
|
||||
|
||||
/* if ((u->race->ec_flags & NOGIVE) || fval(u,UFL_LOCKED)) {*/
|
||||
else if (u->race->ec_flags & NOGIVE && u2!=NULL) {
|
||||
else if (u2 && !alliedunit(u2, u->faction, HELP_GIVE) && !ucontact(u2, u)) {
|
||||
cmistake(u, ord, 40, MSG_COMMERCE);
|
||||
return;
|
||||
}
|
||||
|
||||
else if (u2 && u->race->ec_flags & NOGIVE) {
|
||||
ADDMSG(&u->faction->msgs,
|
||||
msg_feedback(u, ord, "race_nogive", "race", u->race));
|
||||
return;
|
||||
}
|
||||
/* sperrt hier auch personenübergaben!
|
||||
else if (u2 && !(u2->race->ec_flags & GETITEM)) {
|
||||
ADDMSG(&u->faction->msgs,
|
||||
msg_feedback(u, ord, "race_notake", "race", u2->race));
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Übergabe aller Kräuter */
|
||||
else if (p == P_HERBS) {
|
||||
boolean given = false;
|
||||
if (!(u->race->ec_flags & GIVEITEM) && u2!=NULL) {
|
||||
|
@ -713,10 +710,6 @@ give_cmd(unit * u, order * ord)
|
|||
return;
|
||||
}
|
||||
|
||||
if (u2 && !alliedunit(u2, u->faction, HELP_GIVE) && !ucontact(u2, u)) {
|
||||
cmistake(u, ord, 40, MSG_COMMERCE);
|
||||
return;
|
||||
}
|
||||
give_unit(u, u2, ord);
|
||||
return;
|
||||
}
|
||||
|
@ -726,11 +719,6 @@ give_cmd(unit * u, order * ord)
|
|||
|
||||
if (*s == 0) { /* Alle Gegenstände übergeben */
|
||||
|
||||
if (u2 && !alliedunit(u2, u->faction, HELP_GIVE) && !ucontact(u2, u)) {
|
||||
cmistake(u, ord, 40, MSG_COMMERCE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* do these checks once, not for each item we have: */
|
||||
if (!(u->race->ec_flags & GIVEITEM) && u2!=NULL) {
|
||||
ADDMSG(&u->faction->msgs,
|
||||
|
@ -805,7 +793,7 @@ give_cmd(unit * u, order * ord)
|
|||
s = getstrtoken(); /* skip one ahead to get the amount. */
|
||||
}
|
||||
|
||||
n = atoip((const char *)s); /* n: anzahl */
|
||||
n = atoip((const char *)s); /* n: Anzahl */
|
||||
if (p==P_EACH) {
|
||||
n *= u2->number;
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ report_summary(summary * s, summary * o, boolean full)
|
|||
const race * rc = new_race[i];
|
||||
if (s->factionrace[i] && rc && playerrace(rc)
|
||||
&& i != RC_TEMPLATE && i != RC_CLONE) {
|
||||
fprintf(F, "%13svoelker: %s\n", LOC(default_locale, rc_name(rc, 3)),
|
||||
fprintf(F, "%13s%s: %s\n", LOC(default_locale, rc_name(rc, 3)), LOC(default_locale, "stat_tribe_p"),
|
||||
pcomp(s->factionrace[i], o->factionrace[i]));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
int
|
||||
atoi36(const char * str)
|
||||
{
|
||||
/* cannot use strtol, becuase invalid strings will cause crash */
|
||||
/* cannot use strtol, because invalid strings will cause crash */
|
||||
const unsigned char * s = (const unsigned char *)str;
|
||||
int i = 0, sign = 1;
|
||||
assert(s);
|
||||
|
|
|
@ -7561,6 +7561,11 @@
|
|||
<text locale="en">shipid</text>
|
||||
</string>
|
||||
|
||||
<string name="stat_tribe_p">
|
||||
<text locale="de">völker</text>
|
||||
<text locale="en"> tribes</text>
|
||||
</string>
|
||||
|
||||
<string name="par_building">
|
||||
<text locale="de">Gebäude-Nr</text>
|
||||
<text locale="en">buildingid</text>
|
||||
|
|
|
@ -3669,11 +3669,11 @@
|
|||
<message name="givecommand" section="events">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="receipient" type="unit"/>
|
||||
<arg name="recipient" type="unit"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) gibt das Kommando an $unit($receipient)."</text>
|
||||
<text locale="fr">"$unit($unit) gave control to $unit($receipient)."</text>
|
||||
<text locale="en">"$unit($unit) gave control to $unit($receipient)."</text>
|
||||
<text locale="de">"$unit($unit) gibt das Kommando an $unit($recipient)."</text>
|
||||
<text locale="fr">"$unit($unit) gave control to $unit($recipient)."</text>
|
||||
<text locale="en">"$unit($unit) gave control to $unit($recipient)."</text>
|
||||
</message>
|
||||
<message name="givedumb" section="events">
|
||||
<type>
|
||||
|
|
Loading…
Reference in a new issue