public void ResetAllocations(StatDistribution statDist) { foreach (KeyValuePair <byte, int> entry in statDist.AllocatedStats) { DecreaseMax((PlayerStatId)entry.Key, entry.Value); } statDist.ResetPoints(); }
public void ResetAllocations(StatDistribution statDist) { foreach (KeyValuePair <byte, int> entry in statDist.AllocatedStats) { int gainAmount = 1; switch ((PlayerStatId)entry.Key) { case PlayerStatId.Hp: gainAmount = 10; break; case PlayerStatId.CritRate: gainAmount = 3; break; default: break; } DecreaseMax((PlayerStatId)entry.Key, entry.Value * gainAmount); } statDist.ResetPoints(); }