コード例 #1
0
        public static IStats Add(this IStats stats, SocketStone socketStone)
        {
            var added = default(Stats).Add(stats);

            switch (socketStone.Stat)
            {
            case SocketStat.Accuracy:
                added.Accuracy += socketStone.GetValue();
                break;

            case SocketStat.Power:
                added.Power += socketStone.GetValue();
                break;

            case SocketStat.ConditionPower:
                added.ConditionPower += socketStone.GetValue();
                break;

            case SocketStat.Precision:
                added.Precision += socketStone.GetValue();
                break;

            case SocketStat.Ferocity:
                added.Ferocity += socketStone.GetValue();
                break;

            case SocketStat.Armor:
                added.Armor += socketStone.GetValue();
                break;

            case SocketStat.Vitality:
                added.Vitality += socketStone.GetValue();
                break;

            case SocketStat.HealingPower:
                added.HealingPower += socketStone.GetValue();
                break;

            case SocketStat.Speed:
                added.Speed += socketStone.GetValue();
                break;

            case SocketStat.Vision:
                added.Vision += socketStone.GetValue();
                break;

            case SocketStat.None:
            default:
                break;
            }

            return(added);
        }
コード例 #2
0
 public static int GetValue(this SocketStone socketStone)
 {
     return((int)socketStone.Rarity + socketStone.Enhancement);
 }