forked from github/server
error 73 replaced with a better error message.
This commit is contained in:
parent
f7fbbe0f61
commit
085fd51d0a
|
@ -171,7 +171,8 @@ give_men(int n, unit * u, unit * u2, struct order * ord)
|
||||||
} else if (u2 && (fval(u2, UFL_LOCKED)|| is_cursed(u2->attribs, C_SLAVE, 0))) {
|
} else if (u2 && (fval(u2, UFL_LOCKED)|| is_cursed(u2->attribs, C_SLAVE, 0))) {
|
||||||
error = 75;
|
error = 75;
|
||||||
} else if (u2 && u2->faction != u->faction && !alliedunit(u2, u->faction, HELP_GIVE) && !ucontact(u2, u)) {
|
} else if (u2 && u2->faction != u->faction && !alliedunit(u2, u->faction, HELP_GIVE) && !ucontact(u2, u)) {
|
||||||
error = 73;
|
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_no_contact", "target", u2));
|
||||||
|
error = -1;
|
||||||
} else if (u2 && (has_skill(u, SK_MAGIC) || has_skill(u2, SK_MAGIC))) {
|
} else if (u2 && (has_skill(u, SK_MAGIC) || has_skill(u2, SK_MAGIC))) {
|
||||||
error = 158;
|
error = 158;
|
||||||
} else if (u2 && fval(u, UFL_WERE) != fval(u2, UFL_WERE)) {
|
} else if (u2 && fval(u, UFL_WERE) != fval(u2, UFL_WERE)) {
|
||||||
|
@ -269,7 +270,7 @@ give_men(int n, unit * u, unit * u2, struct order * ord)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (error) {
|
if (error>0) {
|
||||||
cmistake(u, ord, error, MSG_COMMERCE);
|
cmistake(u, ord, error, MSG_COMMERCE);
|
||||||
}
|
}
|
||||||
else if (!u2 || u2->faction!=u->faction) {
|
else if (!u2 || u2->faction!=u->faction) {
|
||||||
|
@ -333,7 +334,7 @@ give_unit(unit * u, unit * u2, order * ord)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!alliedunit(u2, u->faction, HELP_GIVE) && ucontact(u2, u) == 0) {
|
if (!alliedunit(u2, u->faction, HELP_GIVE) && ucontact(u2, u) == 0) {
|
||||||
cmistake(u, ord, 73, MSG_COMMERCE);
|
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "feedback_no_contact", "target", u2));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (u->number == 0) {
|
if (u->number == 0) {
|
||||||
|
|
|
@ -1787,7 +1787,7 @@ sp_treewalkenter(castorder *co)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ucontact(u, mage)) {
|
if (!ucontact(u, mage)) {
|
||||||
cmistake(mage, co->order, 73, MSG_MAGIC);
|
ADDMSG(&mage->faction->msgs, msg_feedback(mage, ord, "feedback_no_contact", "target", u));
|
||||||
} else {
|
} else {
|
||||||
int w;
|
int w;
|
||||||
|
|
||||||
|
|
|
@ -5193,25 +5193,16 @@
|
||||||
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - This unit cannot give anybody away."</text>
|
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - This unit cannot give anybody away."</text>
|
||||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - This unit cannot give anybody away."</text>
|
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - This unit cannot give anybody away."</text>
|
||||||
</message>
|
</message>
|
||||||
<message name="error73" section="errors">
|
<message name="feedback_no_contact" section="errors">
|
||||||
<type>
|
<type>
|
||||||
<arg name="unit" type="unit"/>
|
<arg name="unit" type="unit"/>
|
||||||
<arg name="region" type="region"/>
|
<arg name="region" type="region"/>
|
||||||
<arg name="command" type="order"/>
|
<arg name="command" type="order"/>
|
||||||
|
<arg name="target" type="unit"/>
|
||||||
</type>
|
</type>
|
||||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Zieleinheit hat uns nicht kontaktiert."</text>
|
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - $unit($target) hat keinen Kontakt mit uns aufgenommen."</text>
|
||||||
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - The target-unit did not contact us."</text>
|
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - $unit($target) did not contact us."</text>
|
||||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The target-unit did not contact us."</text>
|
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - $unit($target) did not contact us."</text>
|
||||||
</message>
|
|
||||||
<message name="error72" section="errors">
|
|
||||||
<type>
|
|
||||||
<arg name="unit" type="unit"/>
|
|
||||||
<arg name="region" type="region"/>
|
|
||||||
<arg name="command" type="order"/>
|
|
||||||
</type>
|
|
||||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Die Ziel-Einheit hat keinen Kontakt mit uns aufgenommen."</text>
|
|
||||||
<text locale="fr">"$unit($unit) in $region($region): '$order($command)' - The target-unit did not contact us."</text>
|
|
||||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - The target-unit did not contact us."</text>
|
|
||||||
</message>
|
</message>
|
||||||
<message name="error71" section="errors">
|
<message name="error71" section="errors">
|
||||||
<type>
|
<type>
|
||||||
|
|
Loading…
Reference in New Issue