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();
|
s = getstrtoken();
|
||||||
p = findparam(s, u->faction->locale);
|
p = findparam(s, u->faction->locale);
|
||||||
|
|
||||||
|
/* first, do all the ones that do not require HELP_GIVE or CONTACT */
|
||||||
if (p == P_CONTROL) {
|
if (p == P_CONTROL) {
|
||||||
message * msg;
|
message * msg;
|
||||||
|
|
||||||
|
@ -633,7 +634,7 @@ give_cmd(unit * u, order * ord)
|
||||||
freset(u, UFL_OWNER);
|
freset(u, UFL_OWNER);
|
||||||
fset(u2, 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);
|
add_message(&u->faction->msgs, msg);
|
||||||
if (u->faction != u2->faction) {
|
if (u->faction != u2->faction) {
|
||||||
add_message(&u2->faction->msgs, msg);
|
add_message(&u2->faction->msgs, msg);
|
||||||
|
@ -647,21 +648,17 @@ give_cmd(unit * u, order * ord)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if ((u->race->ec_flags & NOGIVE) || fval(u,UFL_LOCKED)) {*/
|
else if (u2 && !alliedunit(u2, u->faction, HELP_GIVE) && !ucontact(u2, u)) {
|
||||||
else if (u->race->ec_flags & NOGIVE && u2!=NULL) {
|
cmistake(u, ord, 40, MSG_COMMERCE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (u2 && u->race->ec_flags & NOGIVE) {
|
||||||
ADDMSG(&u->faction->msgs,
|
ADDMSG(&u->faction->msgs,
|
||||||
msg_feedback(u, ord, "race_nogive", "race", u->race));
|
msg_feedback(u, ord, "race_nogive", "race", u->race));
|
||||||
return;
|
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) {
|
else if (p == P_HERBS) {
|
||||||
boolean given = false;
|
boolean given = false;
|
||||||
if (!(u->race->ec_flags & GIVEITEM) && u2!=NULL) {
|
if (!(u->race->ec_flags & GIVEITEM) && u2!=NULL) {
|
||||||
|
@ -713,10 +710,6 @@ give_cmd(unit * u, order * ord)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u2 && !alliedunit(u2, u->faction, HELP_GIVE) && !ucontact(u2, u)) {
|
|
||||||
cmistake(u, ord, 40, MSG_COMMERCE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
give_unit(u, u2, ord);
|
give_unit(u, u2, ord);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -726,11 +719,6 @@ give_cmd(unit * u, order * ord)
|
||||||
|
|
||||||
if (*s == 0) { /* Alle Gegenstände übergeben */
|
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: */
|
/* do these checks once, not for each item we have: */
|
||||||
if (!(u->race->ec_flags & GIVEITEM) && u2!=NULL) {
|
if (!(u->race->ec_flags & GIVEITEM) && u2!=NULL) {
|
||||||
ADDMSG(&u->faction->msgs,
|
ADDMSG(&u->faction->msgs,
|
||||||
|
@ -805,7 +793,7 @@ give_cmd(unit * u, order * ord)
|
||||||
s = getstrtoken(); /* skip one ahead to get the amount. */
|
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) {
|
if (p==P_EACH) {
|
||||||
n *= u2->number;
|
n *= u2->number;
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,7 @@ report_summary(summary * s, summary * o, boolean full)
|
||||||
const race * rc = new_race[i];
|
const race * rc = new_race[i];
|
||||||
if (s->factionrace[i] && rc && playerrace(rc)
|
if (s->factionrace[i] && rc && playerrace(rc)
|
||||||
&& i != RC_TEMPLATE && i != RC_CLONE) {
|
&& 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]));
|
pcomp(s->factionrace[i], o->factionrace[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
int
|
int
|
||||||
atoi36(const char * str)
|
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;
|
const unsigned char * s = (const unsigned char *)str;
|
||||||
int i = 0, sign = 1;
|
int i = 0, sign = 1;
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
|
@ -7561,6 +7561,11 @@
|
||||||
<text locale="en">shipid</text>
|
<text locale="en">shipid</text>
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
|
<string name="stat_tribe_p">
|
||||||
|
<text locale="de">völker</text>
|
||||||
|
<text locale="en"> tribes</text>
|
||||||
|
</string>
|
||||||
|
|
||||||
<string name="par_building">
|
<string name="par_building">
|
||||||
<text locale="de">Gebäude-Nr</text>
|
<text locale="de">Gebäude-Nr</text>
|
||||||
<text locale="en">buildingid</text>
|
<text locale="en">buildingid</text>
|
||||||
|
|
|
@ -3669,11 +3669,11 @@
|
||||||
<message name="givecommand" section="events">
|
<message name="givecommand" section="events">
|
||||||
<type>
|
<type>
|
||||||
<arg name="unit" type="unit"/>
|
<arg name="unit" type="unit"/>
|
||||||
<arg name="receipient" type="unit"/>
|
<arg name="recipient" type="unit"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) gibt das Kommando an $unit($receipient)."</text>
|
<text locale="de">"$unit($unit) gibt das Kommando an $unit($recipient)."</text>
|
||||||
<text locale="fr">"$unit($unit) gave control to $unit($receipient)."</text>
|
<text locale="fr">"$unit($unit) gave control to $unit($recipient)."</text>
|
||||||
<text locale="en">"$unit($unit) gave control to $unit($receipient)."</text>
|
<text locale="en">"$unit($unit) gave control to $unit($recipient)."</text>
|
||||||
</message>
|
</message>
|
||||||
<message name="givedumb" section="events">
|
<message name="givedumb" section="events">
|
||||||
<type>
|
<type>
|
||||||
|
|
Loading…
Reference in a new issue