Browse Source

CalcStatDiff cleanup

pull/2750/head
qndel 5 years ago
parent
commit
a9fbf91524
  1. 14
      Source/player.cpp

14
Source/player.cpp

@ -2553,14 +2553,12 @@ void CreatePlayer(int playerId, HeroClass c)
int CalcStatDiff(PlayerStruct &player)
{
return player.GetMaximumAttributeValue(CharacterAttribute::Strength)
- player._pBaseStr
+ player.GetMaximumAttributeValue(CharacterAttribute::Magic)
- player._pBaseMag
+ player.GetMaximumAttributeValue(CharacterAttribute::Dexterity)
- player._pBaseDex
+ player.GetMaximumAttributeValue(CharacterAttribute::Vitality)
- player._pBaseVit;
int diff = 0;
for (auto attribute : enum_values<CharacterAttribute>()) {
diff += player.GetMaximumAttributeValue(attribute);
diff -= player.GetBaseAttributeValue(attribute);
}
return diff;
}
void NextPlrLevel(int pnum)

Loading…
Cancel
Save