Elin Decompiled Documentation EA 23.321 Nightly Patch 1
Loading...
Searching...
No Matches
SourceReligion.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4public class SourceReligion : SourceDataString<SourceReligion.Row>
5{
6 [Serializable]
7 public class Row : BaseRow
8 {
9 public string id;
10
11 public string name_JP;
12
13 public string name;
14
15 public string[] name2_JP;
16
17 public string[] name2;
18
19 public string type;
20
21 public string idMaterial;
22
23 public string faith;
24
25 public string domain;
26
27 public int tax;
28
29 public int relation;
30
31 public int[] elements;
32
33 public string[] cat_offer;
34
35 public string[] rewards;
36
37 public string textType_JP;
38
39 public string textType;
40
41 public string textAvatar;
42
43 public string detail_JP;
44
45 public string detail;
46
47 public string textBenefit_JP;
48
49 public string textBenefit;
50
51 public string textPet_JP;
52
53 public string textPet;
54
55 [NonSerialized]
56 public string name_L;
57
58 [NonSerialized]
59 public string detail_L;
60
61 [NonSerialized]
62 public string textType_L;
63
64 [NonSerialized]
65 public string textBenefit_L;
66
67 [NonSerialized]
68 public string[] name2_L;
69
70 public override bool UseAlias => false;
71
72 public override string GetAlias => "n";
73 }
74
75 public static readonly IReadOnlyDictionary<string, int> RowMapping = new Dictionary<string, int>
76 {
77 ["id"] = 0,
78 ["name_JP"] = 1,
79 ["name"] = 2,
80 ["name2_JP"] = 3,
81 ["name2"] = 4,
82 ["type"] = 5,
83 ["idMaterial"] = 6,
84 ["faith"] = 7,
85 ["domain"] = 8,
86 ["tax"] = 9,
87 ["relation"] = 10,
88 ["elements"] = 11,
89 ["cat_offer"] = 12,
90 ["rewards"] = 13,
91 ["textType_JP"] = 14,
92 ["textType"] = 15,
93 ["textAvatar"] = 16,
94 ["detail_JP"] = 17,
95 ["detail"] = 18,
96 ["textBenefit_JP"] = 19,
97 ["textBenefit"] = 20,
98 ["textPet_JP"] = 21,
99 ["textPet"] = 22
100 };
101
102 public static readonly IReadOnlyDictionary<string, string> TypeMapping = new Dictionary<string, string>
103 {
104 ["id"] = "string",
105 ["name_JP"] = "string",
106 ["name"] = "string",
107 ["name2_JP"] = "string[]",
108 ["name2"] = "string[]",
109 ["type"] = "string",
110 ["idMaterial"] = "string",
111 ["faith"] = "string",
112 ["domain"] = "string",
113 ["tax"] = "int",
114 ["relation"] = "int",
115 ["elements"] = "elements",
116 ["cat_offer"] = "string[]",
117 ["rewards"] = "string[]",
118 ["textType_JP"] = "string",
119 ["textType"] = "string",
120 ["textAvatar"] = "string",
121 ["detail_JP"] = "string",
122 ["detail"] = "string",
123 ["textBenefit_JP"] = "string",
124 ["textBenefit"] = "string",
125 ["textPet_JP"] = "string",
126 ["textPet"] = "string"
127 };
128
129 public override string[] ImportFields => new string[3] { "textBenefit", "textType", "name2" };
130
131 public override Row CreateRow()
132 {
133 return new Row
134 {
135 id = SourceData.GetString(0),
136 name_JP = SourceData.GetString(1),
137 name = SourceData.GetString(2),
138 name2_JP = SourceData.GetStringArray(3),
139 name2 = SourceData.GetStringArray(4),
140 type = SourceData.GetString(5),
141 idMaterial = SourceData.GetString(6),
143 domain = SourceData.GetString(8),
144 tax = SourceData.GetInt(9),
145 relation = SourceData.GetInt(10),
146 elements = Core.ParseElements(SourceData.GetStr(11)),
147 cat_offer = SourceData.GetStringArray(12),
148 rewards = SourceData.GetStringArray(13),
149 textType_JP = SourceData.GetString(14),
150 textType = SourceData.GetString(15),
151 textAvatar = SourceData.GetString(16),
152 detail_JP = SourceData.GetString(17),
153 detail = SourceData.GetString(18),
154 textBenefit_JP = SourceData.GetString(19),
155 textBenefit = SourceData.GetString(20),
156 textPet_JP = SourceData.GetString(21),
157 textPet = SourceData.GetString(22)
158 };
159 }
160
161 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
162 {
163 return new Row
164 {
165 id = SourceData.GetString(mapping["id"]),
166 name_JP = SourceData.GetString(mapping["name_JP"]),
167 name = SourceData.GetString(mapping["name"]),
168 name2_JP = SourceData.GetStringArray(mapping["name2_JP"]),
169 name2 = SourceData.GetStringArray(mapping["name2"]),
170 type = SourceData.GetString(mapping["type"]),
171 idMaterial = SourceData.GetString(mapping["idMaterial"]),
172 faith = SourceData.GetString(mapping["faith"]),
173 domain = SourceData.GetString(mapping["domain"]),
174 tax = SourceData.GetInt(mapping["tax"]),
175 relation = SourceData.GetInt(mapping["relation"]),
176 elements = Core.ParseElements(SourceData.GetStr(mapping["elements"])),
177 cat_offer = SourceData.GetStringArray(mapping["cat_offer"]),
178 rewards = SourceData.GetStringArray(mapping["rewards"]),
179 textType_JP = SourceData.GetString(mapping["textType_JP"]),
180 textType = SourceData.GetString(mapping["textType"]),
181 textAvatar = SourceData.GetString(mapping["textAvatar"]),
182 detail_JP = SourceData.GetString(mapping["detail_JP"]),
183 detail = SourceData.GetString(mapping["detail"]),
184 textBenefit_JP = SourceData.GetString(mapping["textBenefit_JP"]),
185 textBenefit = SourceData.GetString(mapping["textBenefit"]),
186 textPet_JP = SourceData.GetString(mapping["textPet_JP"]),
187 textPet = SourceData.GetString(mapping["textPet"])
188 };
189 }
190
191 public override void SetRow(Row r)
192 {
193 map[r.id] = r;
194 }
195
196 public override IReadOnlyDictionary<string, int> GetRowMapping()
197 {
198 return RowMapping;
199 }
200
201 public override IReadOnlyDictionary<string, string> GetTypeMapping()
202 {
203 return TypeMapping;
204 }
205}
Definition: Core.cs:14
static int[] ParseElements(string str)
Definition: Core.cs:726
static string[] GetStringArray(int id)
Definition: SourceData.cs:1011
static string GetString(int id)
Definition: SourceData.cs:1016
static int GetInt(int id)
Definition: SourceData.cs:981
static string GetStr(int id, bool useDefault=false)
Definition: SourceData.cs:1021
override bool UseAlias
override string GetAlias
override IReadOnlyDictionary< string, string > GetTypeMapping()
static readonly IReadOnlyDictionary< string, string > TypeMapping
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
override IReadOnlyDictionary< string, int > GetRowMapping()
override string[] ImportFields
override void SetRow(Row r)
static readonly IReadOnlyDictionary< string, int > RowMapping
override Row CreateRow()