Elin Decompiled Documentation
EA 23.130 Nightly
Loading...
Searching...
No Matches
GamePrincipal.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections.Generic;
3
using
Newtonsoft.Json;
4
5
[Serializable]
6
public
class
GamePrincipal
:
EClass
7
{
8
public
enum
Type
9
{
10
Oath
,
11
Workaround
,
12
Legacy
13
}
14
15
public
class
Item
16
{
17
public
string
id
;
18
19
public
Type
type
;
20
21
public
Func<bool>
_get
;
22
23
public
Action<bool>
_set
;
24
25
public
int
grade
;
26
27
public
bool
IsEmbark
28
{
29
get
30
{
31
if
(
EClass
.
core
.
IsGameStarted
)
32
{
33
return
EClass
.
player
.
resetPrincipal
;
34
}
35
return
true
;
36
}
37
}
38
39
public
bool
Get
()
40
{
41
return
_get
();
42
}
43
44
public
void
Set
(
bool
value)
45
{
46
_set
(value);
47
}
48
49
public
bool
IsModified
()
50
{
51
return
Get
() !=
EClass
.
game
.
principal
.GetField<
bool
>(
id
);
52
}
53
54
public
bool
WasSealed
()
55
{
56
if
(
EClass
.
game
.
principal
.
modified
.Contains(
id
) ||
IsEmbark
)
57
{
58
return
false
;
59
}
60
bool
num =
type
==
Type
.Oath;
61
bool
field =
EClass
.
game
.
principal
.GetField<
bool
>(
id
);
62
if
(num)
63
{
64
return
field;
65
}
66
return
!field;
67
}
68
69
public
bool
IsSealed
()
70
{
71
if
(
EClass
.
game
.
principal
.
modified
.Contains(
id
))
72
{
73
return
false
;
74
}
75
bool
num =
type
==
Type
.Oath;
76
bool
flag =
Get
();
77
bool
flag2 = (
IsEmbark
? flag :
EClass
.
game
.
principal
.GetField<
bool
>(
id
));
78
if
(num)
79
{
80
return
flag2 && flag;
81
}
82
if
(!flag2)
83
{
84
return
!flag;
85
}
86
return
false
;
87
}
88
}
89
90
public
class
ItemSlider
:
Item
91
{
92
public
int
max
;
93
94
public
Func<int>
_getInt
;
95
96
public
Action<int>
_setInt
;
97
98
public
Func<int, string>
funcText
;
99
100
public
int
GetInt
()
101
{
102
return
_getInt
();
103
}
104
105
public
void
SetInt
(
int
value)
106
{
107
_setInt
(value);
108
}
109
}
110
111
[JsonProperty]
112
public
int
id
;
113
114
[JsonProperty]
115
public
int
socre
;
116
117
[JsonProperty]
118
public
int
dropRateMtp
;
119
120
[JsonProperty]
121
public
int
petFeatExpMtp
;
122
123
[JsonProperty]
124
public
bool
ignoreEvaluate
;
125
126
[JsonProperty]
127
public
bool
disableDeathPenaltyProtection
;
128
129
[JsonProperty]
130
public
bool
tax
;
131
132
[JsonProperty]
133
public
bool
opMilk
;
134
135
[JsonProperty]
136
public
bool
disableManualSave
;
137
138
[JsonProperty]
139
public
bool
permadeath
;
140
141
[JsonProperty]
142
public
bool
infiniteMarketFund
;
143
144
[JsonProperty]
145
public
bool
disableUsermapBenefit
;
146
147
[JsonProperty]
148
public
bool
dropRate
;
149
150
[JsonProperty]
151
public
bool
petFeatExp
;
152
153
[JsonProperty]
154
public
bool
disableVoidBlessing
;
155
156
[JsonProperty]
157
public
bool
enableDamageReduction
;
158
159
[JsonProperty]
160
public
HashSet<string>
modified
=
new
HashSet<string>();
161
162
public
bool
IsCustom
=>
id
== -1;
163
164
public
List<Item>
ListItems
()
165
{
166
List<Item> list =
new
List<Item>();
167
Add
(1,
Type
.Oath,
"disableManualSave"
, () =>
disableManualSave
, delegate(
bool
a)
168
{
169
disableManualSave
= a;
170
});
171
Add
(1,
Type
.Oath,
"disableDeathPenaltyProtection"
, () =>
disableDeathPenaltyProtection
, delegate(
bool
a)
172
{
173
disableDeathPenaltyProtection
= a;
174
});
175
Add
(1,
Type
.Oath,
"disableUsermapBenefit"
, () =>
disableUsermapBenefit
, delegate(
bool
a)
176
{
177
disableUsermapBenefit
= a;
178
});
179
Add
(3,
Type
.Oath,
"permadeath"
, () =>
permadeath
, delegate(
bool
a)
180
{
181
permadeath
= a;
182
});
183
Add
(2,
Type
.Workaround,
"disableVoidBlessing"
, () =>
disableVoidBlessing
, delegate(
bool
a)
184
{
185
disableVoidBlessing
= a;
186
});
187
AddSlider(2,
Type
.Workaround,
"dropRate"
, () =>
dropRate
, delegate(
bool
a)
188
{
189
dropRate
= a;
190
}, () =>
dropRateMtp
, delegate(
int
a)
191
{
192
dropRateMtp
= a;
193
}, (
int
a) => 0.5f + 0.5f * (
float
)a +
"x"
, 5);
194
AddSlider(2,
Type
.Workaround,
"petFeatExp"
, () =>
petFeatExp
, delegate(
bool
a)
195
{
196
petFeatExp
= a;
197
}, () =>
petFeatExpMtp
, delegate(
int
a)
198
{
199
petFeatExpMtp
= a;
200
}, (
int
a) => 0.5f + 0.5f * (
float
)a +
"x"
, 3);
201
Add
(-1,
Type
.Legacy,
"enableDamageReduction"
, () =>
enableDamageReduction
, delegate(
bool
a)
202
{
203
enableDamageReduction
= a;
204
});
205
return
list;
206
void
Add
(
int
grade,
Type
type,
string
id
, Func<bool> _get, Action<bool> _set)
207
{
208
list.Add(
new
Item
209
{
210
type = type,
211
grade = grade,
212
id
=
id
,
213
_get = _get,
214
_set = _set
215
});
216
}
217
void
AddSlider(
int
grade,
Type
type,
string
id
, Func<bool> _get, Action<bool> _set, Func<int> _getInt, Action<int> _setInt, Func<int, string> funcText,
int
max)
218
{
219
list.Add(
new
ItemSlider
220
{
221
type = type,
222
grade = grade,
223
id
=
id
,
224
_get = _get,
225
_set = _set,
226
_getInt = _getInt,
227
_setInt = _setInt,
228
funcText = funcText,
229
max = max
230
});
231
}
232
}
233
}
Add
list. Add(item3)
Core.IsGameStarted
bool IsGameStarted
Definition:
Core.cs:84
EClass
Definition:
EClass.cs:5
EClass.game
static Game game
Definition:
EClass.cs:8
EClass.core
static Core core
Definition:
EClass.cs:6
EClass.player
static Player player
Definition:
EClass.cs:12
GamePrincipal.ItemSlider
Definition:
GamePrincipal.cs:91
GamePrincipal.ItemSlider.funcText
Func< int, string > funcText
Definition:
GamePrincipal.cs:98
GamePrincipal.ItemSlider.SetInt
void SetInt(int value)
Definition:
GamePrincipal.cs:105
GamePrincipal.ItemSlider._getInt
Func< int > _getInt
Definition:
GamePrincipal.cs:94
GamePrincipal.ItemSlider.GetInt
int GetInt()
Definition:
GamePrincipal.cs:100
GamePrincipal.ItemSlider._setInt
Action< int > _setInt
Definition:
GamePrincipal.cs:96
GamePrincipal.ItemSlider.max
int max
Definition:
GamePrincipal.cs:92
GamePrincipal.Item
Definition:
GamePrincipal.cs:16
GamePrincipal.Item.IsSealed
bool IsSealed()
Definition:
GamePrincipal.cs:69
GamePrincipal.Item.Set
void Set(bool value)
Definition:
GamePrincipal.cs:44
GamePrincipal.Item.type
Type type
Definition:
GamePrincipal.cs:19
GamePrincipal.Item._set
Action< bool > _set
Definition:
GamePrincipal.cs:23
GamePrincipal.Item.Get
bool Get()
Definition:
GamePrincipal.cs:39
GamePrincipal.Item.WasSealed
bool WasSealed()
Definition:
GamePrincipal.cs:54
GamePrincipal.Item.grade
int grade
Definition:
GamePrincipal.cs:25
GamePrincipal.Item.id
string id
Definition:
GamePrincipal.cs:17
GamePrincipal.Item.IsModified
bool IsModified()
Definition:
GamePrincipal.cs:49
GamePrincipal.Item.IsEmbark
bool IsEmbark
Definition:
GamePrincipal.cs:28
GamePrincipal.Item._get
Func< bool > _get
Definition:
GamePrincipal.cs:21
GamePrincipal
Definition:
GamePrincipal.cs:7
GamePrincipal.enableDamageReduction
bool enableDamageReduction
Definition:
GamePrincipal.cs:157
GamePrincipal.opMilk
bool opMilk
Definition:
GamePrincipal.cs:133
GamePrincipal.id
int id
Definition:
GamePrincipal.cs:112
GamePrincipal.socre
int socre
Definition:
GamePrincipal.cs:115
GamePrincipal.petFeatExpMtp
int petFeatExpMtp
Definition:
GamePrincipal.cs:121
GamePrincipal.infiniteMarketFund
bool infiniteMarketFund
Definition:
GamePrincipal.cs:142
GamePrincipal.dropRate
bool dropRate
Definition:
GamePrincipal.cs:148
GamePrincipal.disableManualSave
bool disableManualSave
Definition:
GamePrincipal.cs:136
GamePrincipal.petFeatExp
bool petFeatExp
Definition:
GamePrincipal.cs:151
GamePrincipal.disableVoidBlessing
bool disableVoidBlessing
Definition:
GamePrincipal.cs:154
GamePrincipal.permadeath
bool permadeath
Definition:
GamePrincipal.cs:139
GamePrincipal.ignoreEvaluate
bool ignoreEvaluate
Definition:
GamePrincipal.cs:124
GamePrincipal.tax
bool tax
Definition:
GamePrincipal.cs:130
GamePrincipal.IsCustom
bool IsCustom
Definition:
GamePrincipal.cs:162
GamePrincipal.modified
HashSet< string > modified
Definition:
GamePrincipal.cs:160
GamePrincipal.disableUsermapBenefit
bool disableUsermapBenefit
Definition:
GamePrincipal.cs:145
GamePrincipal.Type
Type
Definition:
GamePrincipal.cs:9
GamePrincipal.Type.Oath
@ Oath
GamePrincipal.Type.Legacy
@ Legacy
GamePrincipal.Type.Workaround
@ Workaround
GamePrincipal.dropRateMtp
int dropRateMtp
Definition:
GamePrincipal.cs:118
GamePrincipal.ListItems
List< Item > ListItems()
Definition:
GamePrincipal.cs:164
GamePrincipal.disableDeathPenaltyProtection
bool disableDeathPenaltyProtection
Definition:
GamePrincipal.cs:127
Game.principal
GamePrincipal principal
Definition:
Game.cs:221
Player.resetPrincipal
bool resetPrincipal
Definition:
Player.cs:993
Elin
GamePrincipal.cs
Generated by
1.9.6