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