forked from github/server
Merge pull request #179 from badgerman/develop
Unlimitierte Personen-Übergabe in E2
This commit is contained in:
commit
b603001760
|
@ -94,7 +94,7 @@
|
||||||
<param name="hunger.long" value="1"/>
|
<param name="hunger.long" value="1"/>
|
||||||
<param name="init_spells" value="0"/>
|
<param name="init_spells" value="0"/>
|
||||||
<param name="rules.reserve.twophase" value="1"/>
|
<param name="rules.reserve.twophase" value="1"/>
|
||||||
<param name="rules.give.max_men" value="10000"/>
|
<param name="rules.give.max_men" value="-1"/>
|
||||||
<param name="rules.check_overload" value="0"/>
|
<param name="rules.check_overload" value="0"/>
|
||||||
<param name="rules.limit.faction" value="2500"/>
|
<param name="rules.limit.faction" value="2500"/>
|
||||||
<param name="rules.maxskills.magic" value="5"/>
|
<param name="rules.maxskills.magic" value="5"/>
|
||||||
|
|
|
@ -244,6 +244,7 @@ message * give_men(int n, unit * u, unit * u2, struct order *ord)
|
||||||
int k = 0;
|
int k = 0;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
message * msg;
|
message * msg;
|
||||||
|
int maxt = max_transfers();
|
||||||
|
|
||||||
assert(u2);
|
assert(u2);
|
||||||
|
|
||||||
|
@ -303,7 +304,7 @@ message * give_men(int n, unit * u, unit * u2, struct order *ord)
|
||||||
error = 96;
|
error = 96;
|
||||||
}
|
}
|
||||||
else if (u->faction != u2->faction) {
|
else if (u->faction != u2->faction) {
|
||||||
if (u2->faction->newbies + n > max_transfers()) {
|
if (maxt>=0 && u2->faction->newbies + n > maxt) {
|
||||||
error = 129;
|
error = 129;
|
||||||
}
|
}
|
||||||
else if (u_race(u) != u2->faction->race) {
|
else if (u_race(u) != u2->faction->race) {
|
||||||
|
@ -365,7 +366,7 @@ message * give_men(int n, unit * u, unit * u2, struct order *ord)
|
||||||
set_leftship(u2, sh);
|
set_leftship(u2, sh);
|
||||||
}
|
}
|
||||||
transfermen(u, u2, n);
|
transfermen(u, u2, n);
|
||||||
if (u->faction != u2->faction) {
|
if (maxt>=0 && u->faction != u2->faction) {
|
||||||
u2->faction->newbies += n;
|
u2->faction->newbies += n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue