Elin Decompiled Documentation EA 23.316 Nightly
Loading...
Searching...
No Matches
SourcePerson.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4public class SourcePerson : SourceDataString<SourcePerson.Row>
5{
6 [Serializable]
7 public class Row : BaseRow
8 {
9 public string id;
10
11 public string idActor;
12
13 public string name_JP;
14
15 public string name;
16
17 public string aka_JP;
18
19 public string aka;
20
21 public string portrait;
22
23 public string faction;
24
25 public int LV;
26
27 public string job;
28
29 public string race;
30
31 public string material;
32
33 public string bio;
34
35 public string detail_JP;
36
37 public string detail;
38
39 [NonSerialized]
40 public string name_L;
41
42 [NonSerialized]
43 public string detail_L;
44
45 [NonSerialized]
46 public string aka_L;
47
48 public override bool UseAlias => false;
49
50 public override string GetAlias => "n";
51 }
52
53 public static readonly IReadOnlyDictionary<string, int> RowMapping = new Dictionary<string, int>
54 {
55 ["id"] = 0,
56 ["idActor"] = 1,
57 ["name_JP"] = 2,
58 ["name"] = 3,
59 ["aka_JP"] = 4,
60 ["aka"] = 5,
61 ["portrait"] = 6,
62 ["faction"] = 7,
63 ["LV"] = 8,
64 ["job"] = 9,
65 ["race"] = 10,
66 ["material"] = 11,
67 ["bio"] = 12,
68 ["detail_JP"] = 13,
69 ["detail"] = 14
70 };
71
72 public static readonly IReadOnlyDictionary<string, string> TypeMapping = new Dictionary<string, string>
73 {
74 ["id"] = "string",
75 ["idActor"] = "string",
76 ["name_JP"] = "string",
77 ["name"] = "string",
78 ["aka_JP"] = "string",
79 ["aka"] = "string",
80 ["portrait"] = "string",
81 ["faction"] = "string",
82 ["LV"] = "int",
83 ["job"] = "string",
84 ["race"] = "string",
85 ["material"] = "string",
86 ["bio"] = "string",
87 ["detail_JP"] = "string",
88 ["detail"] = "string"
89 };
90
91 public override string[] ImportFields => new string[1] { "aka" };
92
93 public override Row CreateRow()
94 {
95 return new Row
96 {
97 id = SourceData.GetString(0),
98 idActor = SourceData.GetString(1),
99 name_JP = SourceData.GetString(2),
100 name = SourceData.GetString(3),
101 aka_JP = SourceData.GetString(4),
102 aka = SourceData.GetString(5),
103 portrait = SourceData.GetString(6),
104 faction = SourceData.GetString(7),
105 LV = SourceData.GetInt(8),
106 job = SourceData.GetString(9),
107 race = SourceData.GetString(10),
109 bio = SourceData.GetString(12),
110 detail_JP = SourceData.GetString(13),
111 detail = SourceData.GetString(14)
112 };
113 }
114
115 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
116 {
117 return new Row
118 {
119 id = SourceData.GetString(mapping["id"]),
120 idActor = SourceData.GetString(mapping["idActor"]),
121 name_JP = SourceData.GetString(mapping["name_JP"]),
122 name = SourceData.GetString(mapping["name"]),
123 aka_JP = SourceData.GetString(mapping["aka_JP"]),
124 aka = SourceData.GetString(mapping["aka"]),
125 portrait = SourceData.GetString(mapping["portrait"]),
126 faction = SourceData.GetString(mapping["faction"]),
127 LV = SourceData.GetInt(mapping["LV"]),
128 job = SourceData.GetString(mapping["job"]),
129 race = SourceData.GetString(mapping["race"]),
130 material = SourceData.GetString(mapping["material"]),
131 bio = SourceData.GetString(mapping["bio"]),
132 detail_JP = SourceData.GetString(mapping["detail_JP"]),
133 detail = SourceData.GetString(mapping["detail"])
134 };
135 }
136
137 public override void SetRow(Row r)
138 {
139 map[r.id] = r;
140 }
141
142 public override IReadOnlyDictionary<string, int> GetRowMapping()
143 {
144 return RowMapping;
145 }
146
147 public override IReadOnlyDictionary<string, string> GetTypeMapping()
148 {
149 return TypeMapping;
150 }
151}
static string GetString(int id)
Definition: SourceData.cs:1016
static int GetInt(int id)
Definition: SourceData.cs:981
override string GetAlias
Definition: SourcePerson.cs:50
override bool UseAlias
Definition: SourcePerson.cs:48
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
override Row CreateRow()
Definition: SourcePerson.cs:93
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: SourcePerson.cs:53
override IReadOnlyDictionary< string, int > GetRowMapping()
override void SetRow(Row r)
override string[] ImportFields
Definition: SourcePerson.cs:91
static readonly IReadOnlyDictionary< string, string > TypeMapping
Definition: SourcePerson.cs:72
override IReadOnlyDictionary< string, string > GetTypeMapping()