-
Notifications
You must be signed in to change notification settings - Fork 48
/
MimisbrunnrSheet.cs
37 lines (34 loc) · 1.12 KB
/
MimisbrunnrSheet.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
using System;
using System.Collections.Generic;
using Nekoyume.Model.Elemental;
using static Nekoyume.TableData.TableExtensions;
namespace Nekoyume.TableData
{
[Serializable]
public class MimisbrunnrSheet : Sheet<int, MimisbrunnrSheet.Row>
{
[Serializable]
public class Row : SheetRow<int>
{
public override int Key => Id;
public int Id { get; private set; }
public List<ElementalType> ElementalTypes { get; private set; }
public override void Set(IReadOnlyList<string> fields)
{
Id = ParseInt(fields[0]);
ElementalTypes = new List<ElementalType>();
for (int i = 1; i < 6; ++i)
{
if (!string.IsNullOrEmpty(fields[i]))
{
var type = (ElementalType) Enum.Parse(typeof(ElementalType), fields[i]);
ElementalTypes.Add(type);
}
}
}
}
public MimisbrunnrSheet() : base(nameof(MimisbrunnrSheet))
{
}
}
}