Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
a23b29b6
Commit
a23b29b6
authored
May 28, 2022
by
Melledy
Browse files
Rename excel classes
parent
f1398182
Changes
119
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/DropCommand.java
View file @
a23b29b6
...
...
@@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.ItemData
;
import
emu.grasscutter.data.
excels
.ItemData
;
import
emu.grasscutter.game.entity.EntityItem
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.utils.Position
;
...
...
src/main/java/emu/grasscutter/command/commands/GiveAllCommand.java
View file @
a23b29b6
...
...
@@ -4,8 +4,8 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.AvatarData
;
import
emu.grasscutter.data.
def
.ItemData
;
import
emu.grasscutter.data.
excels
.AvatarData
;
import
emu.grasscutter.data.
excels
.ItemData
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.inventory.GameItem
;
import
emu.grasscutter.game.inventory.ItemType
;
...
...
src/main/java/emu/grasscutter/command/commands/GiveArtifactCommand.java
View file @
a23b29b6
...
...
@@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.ItemData
;
import
emu.grasscutter.data.
excels
.ItemData
;
import
emu.grasscutter.game.inventory.GameItem
;
import
emu.grasscutter.game.inventory.ItemType
;
import
emu.grasscutter.game.player.Player
;
...
...
src/main/java/emu/grasscutter/command/commands/GiveCharCommand.java
View file @
a23b29b6
...
...
@@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.AvatarData
;
import
emu.grasscutter.data.
excels
.AvatarData
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.player.Player
;
...
...
src/main/java/emu/grasscutter/command/commands/GiveCommand.java
View file @
a23b29b6
...
...
@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.ItemData
;
import
emu.grasscutter.data.
excels
.ItemData
;
import
emu.grasscutter.game.inventory.GameItem
;
import
emu.grasscutter.game.inventory.ItemType
;
import
emu.grasscutter.game.player.Player
;
...
...
src/main/java/emu/grasscutter/command/commands/SpawnCommand.java
View file @
a23b29b6
...
...
@@ -4,10 +4,10 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.AvatarData
;
import
emu.grasscutter.data.
def
.GadgetData
;
import
emu.grasscutter.data.
def
.ItemData
;
import
emu.grasscutter.data.
def
.MonsterData
;
import
emu.grasscutter.data.
excels
.AvatarData
;
import
emu.grasscutter.data.
excels
.GadgetData
;
import
emu.grasscutter.data.
excels
.ItemData
;
import
emu.grasscutter.data.
excels
.MonsterData
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.entity.*
;
import
emu.grasscutter.game.player.Player
;
...
...
src/main/java/emu/grasscutter/command/commands/TalentCommand.java
View file @
a23b29b6
...
...
@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.
def
.AvatarSkillDepotData
;
import
emu.grasscutter.data.
excels
.AvatarSkillDepotData
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.entity.EntityAvatar
;
import
emu.grasscutter.game.player.Player
;
...
...
src/main/java/emu/grasscutter/data/GameData.java
View file @
a23b29b6
...
...
@@ -8,12 +8,12 @@ import java.util.Map;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.utils.Utils
;
import
emu.grasscutter.data.
custom
.AbilityEmbryoEntry
;
import
emu.grasscutter.data.
custom
.AbilityModifierEntry
;
import
emu.grasscutter.data.
custom.OpenConfigEntry
;
import
emu.grasscutter.data.
custom.MainQuestData
;
import
emu.grasscutter.data.
custom
.ScenePointEntry
;
import
emu.grasscutter.data.
def
.*
;
import
emu.grasscutter.data.
binout
.AbilityEmbryoEntry
;
import
emu.grasscutter.data.
binout
.AbilityModifierEntry
;
import
emu.grasscutter.data.
binout.MainQuestData
;
import
emu.grasscutter.data.
binout.OpenConfigEntry
;
import
emu.grasscutter.data.
binout
.ScenePointEntry
;
import
emu.grasscutter.data.
excels
.*
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
...
...
src/main/java/emu/grasscutter/data/GameDepot.java
View file @
a23b29b6
...
...
@@ -7,8 +7,8 @@ import org.danilopianini.util.FlexibleQuadTree;
import
org.danilopianini.util.SpatialIndex
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.
def
.ReliquaryAffixData
;
import
emu.grasscutter.data.
def
.ReliquaryMainPropData
;
import
emu.grasscutter.data.
excels
.ReliquaryAffixData
;
import
emu.grasscutter.data.
excels
.ReliquaryMainPropData
;
import
emu.grasscutter.game.world.SpawnDataEntry
;
import
emu.grasscutter.game.world.SpawnDataEntry.SpawnGroupEntry
;
import
emu.grasscutter.utils.WeightedList
;
...
...
src/main/java/emu/grasscutter/data/ResourceLoader.java
View file @
a23b29b6
...
...
@@ -14,17 +14,17 @@ import com.google.gson.JsonElement;
import
com.google.gson.reflect.TypeToken
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.binout.AbilityEmbryoEntry
;
import
emu.grasscutter.data.binout.AbilityModifier
;
import
emu.grasscutter.data.binout.AbilityModifierEntry
;
import
emu.grasscutter.data.binout.MainQuestData
;
import
emu.grasscutter.data.binout.OpenConfigEntry
;
import
emu.grasscutter.data.binout.ScenePointEntry
;
import
emu.grasscutter.data.binout.AbilityModifier.AbilityConfigData
;
import
emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction
;
import
emu.grasscutter.data.binout.AbilityModifier.AbilityModifierActionType
;
import
emu.grasscutter.data.common.PointData
;
import
emu.grasscutter.data.common.ScenePointConfig
;
import
emu.grasscutter.data.custom.AbilityEmbryoEntry
;
import
emu.grasscutter.data.custom.AbilityModifier
;
import
emu.grasscutter.data.custom.AbilityModifier.AbilityConfigData
;
import
emu.grasscutter.data.custom.AbilityModifier.AbilityModifierAction
;
import
emu.grasscutter.data.custom.AbilityModifier.AbilityModifierActionType
;
import
emu.grasscutter.data.custom.AbilityModifierEntry
;
import
emu.grasscutter.data.custom.OpenConfigEntry
;
import
emu.grasscutter.data.custom.MainQuestData
;
import
emu.grasscutter.data.custom.ScenePointEntry
;
import
emu.grasscutter.game.world.SpawnDataEntry.*
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
...
...
@@ -138,20 +138,16 @@ public class ResourceLoader {
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
protected
static
void
loadFromResource
(
Class
<?>
c
,
String
fileName
,
Int2ObjectMap
map
)
throws
Exception
{
FileReader
fileReader
=
new
FileReader
(
RESOURCE
(
"ExcelBinOutput/"
+
fileName
));
Gson
gson
=
Grasscutter
.
getGsonFactory
();
List
list
=
gson
.
fromJson
(
fileReader
,
List
.
class
);
try
(
FileReader
fileReader
=
new
FileReader
(
RESOURCE
(
"ExcelBinOutput/"
+
fileName
)))
{
List
list
=
Grasscutter
.
getGsonFactory
().
fromJson
(
fileReader
,
TypeToken
.
getParameterized
(
Collection
.
class
,
c
).
getType
());
for
(
Object
o
:
list
)
{
Map
<
String
,
Object
>
tempMap
=
Utils
.
switchPropertiesUpperLowerCase
((
Map
<
String
,
Object
>)
o
,
c
);
GameResource
res
=
gson
.
fromJson
(
gson
.
toJson
(
tempMap
),
TypeToken
.
get
(
c
).
getType
());
GameResource
res
=
(
GameResource
)
o
;
res
.
onLoad
();
if
(
map
.
containsKey
(
res
.
getId
()))
{
map
.
remove
(
res
.
getId
());
}
map
.
put
(
res
.
getId
(),
res
);
}
}
}
private
static
void
loadScenePoints
()
{
Pattern
pattern
=
Pattern
.
compile
(
"(?<=scene)(.*?)(?=_point.json)"
);
...
...
src/main/java/emu/grasscutter/data/
custom
/AbilityEmbryoEntry.java
→
src/main/java/emu/grasscutter/data/
binout
/AbilityEmbryoEntry.java
View file @
a23b29b6
package
emu.grasscutter.data.
custom
;
package
emu.grasscutter.data.
binout
;
public
class
AbilityEmbryoEntry
{
private
String
name
;
...
...
src/main/java/emu/grasscutter/data/
custom
/AbilityModifier.java
→
src/main/java/emu/grasscutter/data/
binout
/AbilityModifier.java
View file @
a23b29b6
package
emu.grasscutter.data.
custom
;
package
emu.grasscutter.data.
binout
;
import
java.util.Map
;
...
...
src/main/java/emu/grasscutter/data/
custom
/AbilityModifierEntry.java
→
src/main/java/emu/grasscutter/data/
binout
/AbilityModifierEntry.java
View file @
a23b29b6
package
emu.grasscutter.data.
custom
;
package
emu.grasscutter.data.
binout
;
import
java.util.ArrayList
;
import
java.util.List
;
import
emu.grasscutter.data.
custom
.AbilityModifier.AbilityModifierAction
;
import
emu.grasscutter.data.
binout
.AbilityModifier.AbilityModifierAction
;
public
class
AbilityModifierEntry
{
private
String
name
;
// Custom value
...
...
src/main/java/emu/grasscutter/data/
custom
/MainQuestData.java
→
src/main/java/emu/grasscutter/data/
binout
/MainQuestData.java
View file @
a23b29b6
package
emu.grasscutter.data.
custom
;
package
emu.grasscutter.data.
binout
;
import
emu.grasscutter.game.quest.enums.LogicType
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
...
...
src/main/java/emu/grasscutter/data/
custom
/OpenConfigEntry.java
→
src/main/java/emu/grasscutter/data/
binout
/OpenConfigEntry.java
View file @
a23b29b6
package
emu.grasscutter.data.
custom
;
package
emu.grasscutter.data.
binout
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
src/main/java/emu/grasscutter/data/
custom
/ScenePointEntry.java
→
src/main/java/emu/grasscutter/data/
binout
/ScenePointEntry.java
View file @
a23b29b6
package
emu.grasscutter.data.
custom
;
package
emu.grasscutter.data.
binout
;
import
emu.grasscutter.data.common.PointData
;
...
...
src/main/java/emu/grasscutter/data/common/CurveInfo.java
View file @
a23b29b6
package
emu.grasscutter.data.common
;
public
class
CurveInfo
{
private
String
T
ype
;
private
String
A
rith
;
private
float
V
alue
;
private
String
t
ype
;
private
String
a
rith
;
private
float
v
alue
;
public
String
getType
()
{
return
T
ype
;
return
t
ype
;
}
public
String
getArith
()
{
return
A
rith
;
return
a
rith
;
}
public
float
getValue
()
{
return
V
alue
;
return
v
alue
;
}
}
src/main/java/emu/grasscutter/data/common/FightPropData.java
View file @
a23b29b6
...
...
@@ -3,16 +3,16 @@ package emu.grasscutter.data.common;
import
emu.grasscutter.game.props.FightProperty
;
public
class
FightPropData
{
private
String
P
ropType
;
private
String
p
ropType
;
private
FightProperty
prop
;
private
float
V
alue
;
private
float
v
alue
;
public
String
getPropType
()
{
return
P
ropType
;
return
p
ropType
;
}
public
float
getValue
()
{
return
V
alue
;
return
v
alue
;
}
public
FightProperty
getProp
()
{
...
...
@@ -20,6 +20,6 @@ public class FightPropData {
}
public
void
onLoad
()
{
this
.
prop
=
FightProperty
.
getPropByName
(
P
ropType
);
this
.
prop
=
FightProperty
.
getPropByName
(
p
ropType
);
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/data/common/ItemParamData.java
View file @
a23b29b6
...
...
@@ -3,31 +3,31 @@ package emu.grasscutter.data.common;
import
com.google.gson.annotations.SerializedName
;
public
class
ItemParamData
{
@SerializedName
(
value
=
"Id"
,
alternate
={
"
I
temId"
})
private
int
I
d
;
@SerializedName
(
value
=
"Id"
,
alternate
={
"
i
temId"
})
private
int
i
d
;
@SerializedName
(
value
=
"Count"
,
alternate
={
"
I
temCount"
})
private
int
C
ount
;
@SerializedName
(
value
=
"Count"
,
alternate
={
"
i
temCount"
})
private
int
c
ount
;
public
ItemParamData
()
{}
public
ItemParamData
(
int
id
,
int
count
)
{
this
.
I
d
=
id
;
this
.
C
ount
=
count
;
this
.
i
d
=
id
;
this
.
c
ount
=
count
;
}
public
int
getId
()
{
return
I
d
;
return
i
d
;
}
public
int
getItemId
()
{
return
I
d
;
return
i
d
;
}
public
int
getCount
()
{
return
C
ount
;
return
c
ount
;
}
public
int
getItemCount
()
{
return
C
ount
;
return
c
ount
;
}
}
src/main/java/emu/grasscutter/data/common/ItemParamStringData.java
View file @
a23b29b6
package
emu.grasscutter.data.common
;
public
class
ItemParamStringData
{
private
int
I
d
;
private
String
C
ount
;
private
int
i
d
;
private
String
c
ount
;
public
ItemParamStringData
()
{}
public
int
getId
()
{
return
I
d
;
return
i
d
;
}
public
String
getCount
()
{
return
C
ount
;
return
c
ount
;
}
public
ItemParamData
toItemParamData
()
{
if
(
C
ount
.
contains
(
";"
))
{
String
[]
split
=
C
ount
.
split
(
";"
);
C
ount
=
C
ount
.
split
(
";"
)[
split
.
length
-
1
];
}
else
if
(
C
ount
.
contains
(
"."
))
{
return
new
ItemParamData
(
I
d
,
(
int
)
Math
.
ceil
(
Double
.
parseDouble
(
C
ount
)));
if
(
c
ount
.
contains
(
";"
))
{
String
[]
split
=
c
ount
.
split
(
";"
);
c
ount
=
c
ount
.
split
(
";"
)[
split
.
length
-
1
];
}
else
if
(
c
ount
.
contains
(
"."
))
{
return
new
ItemParamData
(
i
d
,
(
int
)
Math
.
ceil
(
Double
.
parseDouble
(
c
ount
)));
}
return
new
ItemParamData
(
I
d
,
Integer
.
parseInt
(
C
ount
));
return
new
ItemParamData
(
i
d
,
Integer
.
parseInt
(
c
ount
));
}
}
Prev
1
2
3
4
5
6
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment