Skip to content

Commit

Permalink
fix(parsing): Corrected the parsing of the initial player rep grandch…
Browse files Browse the repository at this point in the history
…ild node in Government (#9954)
  • Loading branch information
xxxyyyqqq12345 committed Mar 30, 2024
1 parent acf82c5 commit b339cbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Government.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void Government::Load(const DataNode &node)
const string &grandKey = grand.Token(0);
bool hasGrandValue = grand.Size() >= 2;
if(grandKey == "player reputation" && hasGrandValue)
initialPlayerReputation = add ? initialPlayerReputation + child.Value(valueIndex) : child.Value(valueIndex);
initialPlayerReputation = add ? initialPlayerReputation + grand.Value(valueIndex) : grand.Value(valueIndex);
else if(grandKey == "max" && hasGrandValue)
reputationMax = add ? reputationMax + grand.Value(valueIndex) : grand.Value(valueIndex);
else if(grandKey == "min" && hasGrandValue)
Expand Down

0 comments on commit b339cbb

Please sign in to comment.