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