forked from github/server
code review changes
This commit is contained in:
parent
10e08ab306
commit
955a57273d
2 changed files with 70 additions and 65 deletions
|
@ -135,11 +135,14 @@ void equip_unit_mask(struct unit *u, const struct equipment *eq, int mask)
|
||||||
for (sk = 0; sk != MAXSKILLS; ++sk) {
|
for (sk = 0; sk != MAXSKILLS; ++sk) {
|
||||||
if (eq->skills[sk] != NULL) {
|
if (eq->skills[sk] != NULL) {
|
||||||
int i = dice_rand(eq->skills[sk]);
|
int i = dice_rand(eq->skills[sk]);
|
||||||
if (i > 0)
|
if (i > 0) {
|
||||||
set_level(u, (skill_t)sk, i);
|
set_level(u, (skill_t)sk, i);
|
||||||
|
if (sk==SK_STAMINA) {
|
||||||
|
u->hp = unit_max_hp(u) * u->number;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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) {
|
if (mask & EQUIP_SPELLS) {
|
||||||
|
|
|
@ -3234,8 +3234,10 @@ static void skill_summoned(unit * u, int level)
|
||||||
set_level(u, sk, level);
|
set_level(u, sk, level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (rc->bonus[SK_STAMINA]) {
|
||||||
|
u->hp = unit_max_hp(u) * u->number;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
u->hp = unit_max_hp(u) * u->number; // Bring the unit to max HitPoints just for the case stamina was changed
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------- */
|
/* ------------------------------------------------------------- */
|
||||||
|
|
Loading…
Reference in a new issue