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); pcSetStat(PC_STAT_LEVEL, newLevel);
dudeDisableState(DUDE_STATE_LEVEL_UP_AVAILABLE); dudeDisableState(DUDE_STATE_LEVEL_UP_AVAILABLE);
int endurance = critterGetBaseStat(gDude, STAT_ENDURANCE); // NOTE: Uninline.
if (gDude == gDude) { int endurance = critterGetBaseStatWithTraitModifier(gDude, STAT_ENDURANCE);
endurance += traitGetStatModifier(STAT_ENDURANCE);
}
int hpPerLevel = endurance / 2 + 2; int hpPerLevel = endurance / 2 + 2;
hpPerLevel += perkGetRank(gDude, PERK_LIFEGIVER) * 4; hpPerLevel += perkGetRank(gDude, PERK_LIFEGIVER) * 4;