Review pcSetExperience

This commit is contained in:
Alexander Batalov 2022-07-06 15:10:43 +03:00
parent 26f066d773
commit a8eb88ce2c
1 changed files with 2 additions and 4 deletions

View File

@ -797,10 +797,8 @@ int pcSetExperience(int xp)
pcSetStat(PC_STAT_LEVEL, newLevel);
dudeDisableState(DUDE_STATE_LEVEL_UP_AVAILABLE);
int endurance = critterGetBaseStat(gDude, STAT_ENDURANCE);
if (gDude == gDude) {
endurance += traitGetStatModifier(STAT_ENDURANCE);
}
// NOTE: Uninline.
int endurance = critterGetBaseStatWithTraitModifier(gDude, STAT_ENDURANCE);
int hpPerLevel = endurance / 2 + 2;
hpPerLevel += perkGetRank(gDude, PERK_LIFEGIVER) * 4;