-
Notifications
You must be signed in to change notification settings - Fork 48
/
StakeActionPointCoefficientSheet.cs
40 lines (33 loc) · 1.18 KB
/
StakeActionPointCoefficientSheet.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Collections.Generic;
using static Nekoyume.TableData.TableExtensions;
namespace Nekoyume.TableData
{
[Serializable]
public class StakeActionPointCoefficientSheet : Sheet<int, StakeActionPointCoefficientSheet.Row>, IStakeRewardSheet
{
public IReadOnlyList<IStakeRewardRow> OrderedRows => OrderedList;
public StakeActionPointCoefficientSheet() : base(nameof(StakeActionPointCoefficientSheet)) { }
protected override void AddRow(int key, Row value)
{
if (!TryGetValue(key, out _))
{
Add(key, value);
}
}
public class Row : SheetRow<int>, IStakeRewardRow
{
public override int Key => Level;
public int Level { get; private set; }
public long RequiredGold { get; private set; }
// percentage.
public int Coefficient { get; private set; }
public override void Set(IReadOnlyList<string> fields)
{
Level = ParseInt(fields[0]);
RequiredGold = ParseInt(fields[1]);
Coefficient = ParseInt(fields[2]);
}
}
}
}