forked from github/server
Merge pull request #14 from CTD1/master
Bug 1755 Beschworene Skelette mit Ausdauerproblemen
This commit is contained in:
commit
10e08ab306
|
@ -1164,17 +1164,10 @@ void economics(region * r)
|
|||
|
||||
for (u = r->units; u; u = u->next) {
|
||||
order *ord;
|
||||
bool destroyed = false;
|
||||
if (u->number > 0) {
|
||||
for (ord = u->orders; ord; ord = ord->next) {
|
||||
keyword_t kwd = getkeyword(ord);
|
||||
if (kwd == K_DESTROY) {
|
||||
if (!destroyed) {
|
||||
if (destroy_cmd(u, ord) != 0)
|
||||
ord = NULL;
|
||||
destroyed = true;
|
||||
}
|
||||
} else if (kwd == K_GIVE) {
|
||||
if (kwd == K_GIVE) {
|
||||
give_cmd(u, ord);
|
||||
} else if (kwd == K_FORGET) {
|
||||
forget_cmd(u, ord);
|
||||
|
@ -1207,6 +1200,27 @@ void economics(region * r)
|
|||
if (recruitorders)
|
||||
expandrecruit(r, recruitorders);
|
||||
remove_empty_units_in_region(r);
|
||||
|
||||
for (u = r->units; u; u = u->next) {
|
||||
order *ord;
|
||||
bool destroyed = false;
|
||||
if (u->number > 0) {
|
||||
for (ord = u->orders; ord; ord = ord->next) {
|
||||
keyword_t kwd = getkeyword(ord);
|
||||
if (kwd == K_DESTROY) {
|
||||
if (!destroyed) {
|
||||
if (destroy_cmd(u, ord) != 0)
|
||||
ord = NULL;
|
||||
destroyed = true;
|
||||
}
|
||||
}
|
||||
if (u->orders == NULL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
|
|
@ -139,6 +139,7 @@ void equip_unit_mask(struct unit *u, const struct equipment *eq, int mask)
|
|||
set_level(u, (skill_t)sk, i);
|
||||
}
|
||||
}
|
||||
u->hp = unit_max_hp(u) * u->number; // Bring the unit to max HitPoints just for the case stamina was changed
|
||||
}
|
||||
|
||||
if (mask & EQUIP_SPELLS) {
|
||||
|
|
|
@ -3235,6 +3235,7 @@ static void skill_summoned(unit * u, int level)
|
|||
}
|
||||
}
|
||||
}
|
||||
u->hp = unit_max_hp(u) * u->number; // Bring the unit to max HitPoints just for the case stamina was changed
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue