Elin Decompiled Documentation EA 23.306 Nightly
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 override string[] ImportFields => new string[3] { "textBenefit", "textType", "name2" };
103
104 public override Row CreateRow()
105 {
106 return new Row
107 {
108 id = SourceData.GetString(0),
109 name_JP = SourceData.GetString(1),
110 name = SourceData.GetString(2),
111 name2_JP = SourceData.GetStringArray(3),
112 name2 = SourceData.GetStringArray(4),
113 type = SourceData.GetString(5),
114 idMaterial = SourceData.GetString(6),
116 domain = SourceData.GetString(8),
117 tax = SourceData.GetInt(9),
118 relation = SourceData.GetInt(10),
119 elements = Core.ParseElements(SourceData.GetStr(11)),
120 cat_offer = SourceData.GetStringArray(12),
121 rewards = SourceData.GetStringArray(13),
122 textType_JP = SourceData.GetString(14),
123 textType = SourceData.GetString(15),
124 textAvatar = SourceData.GetString(16),
125 detail_JP = SourceData.GetString(17),
126 detail = SourceData.GetString(18),
127 textBenefit_JP = SourceData.GetString(19),
128 textBenefit = SourceData.GetString(20),
129 textPet_JP = SourceData.GetString(21),
130 textPet = SourceData.GetString(22)
131 };
132 }
133
134 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
135 {
136 return new Row
137 {
138 id = SourceData.GetString(mapping["id"]),
139 name_JP = SourceData.GetString(mapping["name_JP"]),
140 name = SourceData.GetString(mapping["name"]),
141 name2_JP = SourceData.GetStringArray(mapping["name2_JP"]),
142 name2 = SourceData.GetStringArray(mapping["name2"]),
143 type = SourceData.GetString(mapping["type"]),
144 idMaterial = SourceData.GetString(mapping["idMaterial"]),
145 faith = SourceData.GetString(mapping["faith"]),
146 domain = SourceData.GetString(mapping["domain"]),
147 tax = SourceData.GetInt(mapping["tax"]),
148 relation = SourceData.GetInt(mapping["relation"]),
149 elements = Core.ParseElements(SourceData.GetStr(mapping["elements"])),
150 cat_offer = SourceData.GetStringArray(mapping["cat_offer"]),
151 rewards = SourceData.GetStringArray(mapping["rewards"]),
152 textType_JP = SourceData.GetString(mapping["textType_JP"]),
153 textType = SourceData.GetString(mapping["textType"]),
154 textAvatar = SourceData.GetString(mapping["textAvatar"]),
155 detail_JP = SourceData.GetString(mapping["detail_JP"]),
156 detail = SourceData.GetString(mapping["detail"]),
157 textBenefit_JP = SourceData.GetString(mapping["textBenefit_JP"]),
158 textBenefit = SourceData.GetString(mapping["textBenefit"]),
159 textPet_JP = SourceData.GetString(mapping["textPet_JP"]),
160 textPet = SourceData.GetString(mapping["textPet"])
161 };
162 }
163
164 public override void SetRow(Row r)
165 {
166 map[r.id] = r;
167 }
168
169 public override IReadOnlyDictionary<string, int> GetRowMapping()
170 {
171 return RowMapping;
172 }
173}
Definition: Core.cs:14
static int[] ParseElements(string str)
Definition: Core.cs:727
static string[] GetStringArray(int id)
Definition: SourceData.cs:978
static string GetString(int id)
Definition: SourceData.cs:983
static int GetInt(int id)
Definition: SourceData.cs:948
static string GetStr(int id, bool useDefault=false)
Definition: SourceData.cs:988
override bool UseAlias
override string GetAlias
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()