コード例 #1
0
ファイル: PlayerStats.cs プロジェクト: Smoothzy/MapleServer2
 public void ResetAllocations(StatDistribution statDist)
 {
     foreach (KeyValuePair <byte, int> entry in statDist.AllocatedStats)
     {
         DecreaseMax((PlayerStatId)entry.Key, entry.Value);
     }
     statDist.ResetPoints();
 }
コード例 #2
0
        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();
        }