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
Hide 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;
...
@@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
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.entity.EntityItem
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.utils.Position
;
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;
...
@@ -4,8 +4,8 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.AvatarData
;
import
emu.grasscutter.data.
excels
.AvatarData
;
import
emu.grasscutter.data.
def
.ItemData
;
import
emu.grasscutter.data.
excels
.ItemData
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.inventory.GameItem
;
import
emu.grasscutter.game.inventory.GameItem
;
import
emu.grasscutter.game.inventory.ItemType
;
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;
...
@@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
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.GameItem
;
import
emu.grasscutter.game.inventory.ItemType
;
import
emu.grasscutter.game.inventory.ItemType
;
import
emu.grasscutter.game.player.Player
;
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;
...
@@ -4,7 +4,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
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.avatar.Avatar
;
import
emu.grasscutter.game.player.Player
;
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;
...
@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
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.GameItem
;
import
emu.grasscutter.game.inventory.ItemType
;
import
emu.grasscutter.game.inventory.ItemType
;
import
emu.grasscutter.game.player.Player
;
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;
...
@@ -4,10 +4,10 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.command.CommandHandler
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.AvatarData
;
import
emu.grasscutter.data.
excels
.AvatarData
;
import
emu.grasscutter.data.
def
.GadgetData
;
import
emu.grasscutter.data.
excels
.GadgetData
;
import
emu.grasscutter.data.
def
.ItemData
;
import
emu.grasscutter.data.
excels
.ItemData
;
import
emu.grasscutter.data.
def
.MonsterData
;
import
emu.grasscutter.data.
excels
.MonsterData
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.avatar.Avatar
;
import
emu.grasscutter.game.entity.*
;
import
emu.grasscutter.game.entity.*
;
import
emu.grasscutter.game.player.Player
;
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;
...
@@ -3,7 +3,7 @@ package emu.grasscutter.command.commands;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.Command
;
import
emu.grasscutter.command.CommandHandler
;
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.avatar.Avatar
;
import
emu.grasscutter.game.entity.EntityAvatar
;
import
emu.grasscutter.game.entity.EntityAvatar
;
import
emu.grasscutter.game.player.Player
;
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;
...
@@ -8,12 +8,12 @@ import java.util.Map;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.utils.Utils
;
import
emu.grasscutter.utils.Utils
;
import
emu.grasscutter.data.
custom
.AbilityEmbryoEntry
;
import
emu.grasscutter.data.
binout
.AbilityEmbryoEntry
;
import
emu.grasscutter.data.
custom
.AbilityModifierEntry
;
import
emu.grasscutter.data.
binout
.AbilityModifierEntry
;
import
emu.grasscutter.data.
custom.OpenConfigEntry
;
import
emu.grasscutter.data.
binout.MainQuestData
;
import
emu.grasscutter.data.
custom.MainQuestData
;
import
emu.grasscutter.data.
binout.OpenConfigEntry
;
import
emu.grasscutter.data.
custom
.ScenePointEntry
;
import
emu.grasscutter.data.
binout
.ScenePointEntry
;
import
emu.grasscutter.data.
def
.*
;
import
emu.grasscutter.data.
excels
.*
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap
;
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;
...
@@ -7,8 +7,8 @@ import org.danilopianini.util.FlexibleQuadTree;
import
org.danilopianini.util.SpatialIndex
;
import
org.danilopianini.util.SpatialIndex
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.
def
.ReliquaryAffixData
;
import
emu.grasscutter.data.
excels
.ReliquaryAffixData
;
import
emu.grasscutter.data.
def
.ReliquaryMainPropData
;
import
emu.grasscutter.data.
excels
.ReliquaryMainPropData
;
import
emu.grasscutter.game.world.SpawnDataEntry
;
import
emu.grasscutter.game.world.SpawnDataEntry
;
import
emu.grasscutter.game.world.SpawnDataEntry.SpawnGroupEntry
;
import
emu.grasscutter.game.world.SpawnDataEntry.SpawnGroupEntry
;
import
emu.grasscutter.utils.WeightedList
;
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;
...
@@ -14,17 +14,17 @@ import com.google.gson.JsonElement;
import
com.google.gson.reflect.TypeToken
;
import
com.google.gson.reflect.TypeToken
;
import
emu.grasscutter.Grasscutter
;
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.PointData
;
import
emu.grasscutter.data.common.ScenePointConfig
;
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
emu.grasscutter.game.world.SpawnDataEntry.*
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
...
@@ -138,18 +138,14 @@ public class ResourceLoader {
...
@@ -138,18 +138,14 @@ public class ResourceLoader {
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
protected
static
void
loadFromResource
(
Class
<?>
c
,
String
fileName
,
Int2ObjectMap
map
)
throws
Exception
{
protected
static
void
loadFromResource
(
Class
<?>
c
,
String
fileName
,
Int2ObjectMap
map
)
throws
Exception
{
FileReader
fileReader
=
new
FileReader
(
RESOURCE
(
"ExcelBinOutput/"
+
fileName
));
try
(
FileReader
fileReader
=
new
FileReader
(
RESOURCE
(
"ExcelBinOutput/"
+
fileName
)))
{
Gson
gson
=
Grasscutter
.
getGsonFactory
();
List
list
=
Grasscutter
.
getGsonFactory
().
fromJson
(
fileReader
,
TypeToken
.
getParameterized
(
Collection
.
class
,
c
).
getType
());
List
list
=
gson
.
fromJson
(
fileReader
,
List
.
class
);
for
(
Object
o
:
list
)
{
for
(
Object
o
:
list
)
{
GameResource
res
=
(
GameResource
)
o
;
Map
<
String
,
Object
>
tempMap
=
Utils
.
switchPropertiesUpperLowerCase
((
Map
<
String
,
Object
>)
o
,
c
);
res
.
onLoad
();
GameResource
res
=
gson
.
fromJson
(
gson
.
toJson
(
tempMap
),
TypeToken
.
get
(
c
).
getType
());
map
.
put
(
res
.
getId
(),
res
);
res
.
onLoad
();
if
(
map
.
containsKey
(
res
.
getId
()))
{
map
.
remove
(
res
.
getId
());
}
}
map
.
put
(
res
.
getId
(),
res
);
}
}
}
}
...
...
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
{
public
class
AbilityEmbryoEntry
{
private
String
name
;
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
;
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.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
emu.grasscutter.data.
custom
.AbilityModifier.AbilityModifierAction
;
import
emu.grasscutter.data.
binout
.AbilityModifier.AbilityModifierAction
;
public
class
AbilityModifierEntry
{
public
class
AbilityModifierEntry
{
private
String
name
;
// Custom value
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.LogicType
;
import
emu.grasscutter.game.quest.enums.QuestTrigger
;
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.ArrayList
;
import
java.util.List
;
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
;
import
emu.grasscutter.data.common.PointData
;
public
class
ScenePointEntry
{
public
class
ScenePointEntry
{
private
String
name
;
private
String
name
;
private
PointData
pointData
;
private
PointData
pointData
;
public
ScenePointEntry
(
String
name
,
PointData
pointData
)
{
public
ScenePointEntry
(
String
name
,
PointData
pointData
)
{
this
.
name
=
name
;
this
.
name
=
name
;
this
.
pointData
=
pointData
;
this
.
pointData
=
pointData
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
}
}
public
PointData
getPointData
()
{
public
PointData
getPointData
()
{
return
pointData
;
return
pointData
;
}
}
}
}
src/main/java/emu/grasscutter/data/common/CurveInfo.java
View file @
a23b29b6
package
emu.grasscutter.data.common
;
package
emu.grasscutter.data.common
;
public
class
CurveInfo
{
public
class
CurveInfo
{
private
String
T
ype
;
private
String
t
ype
;
private
String
A
rith
;
private
String
a
rith
;
private
float
V
alue
;
private
float
v
alue
;
public
String
getType
()
{
public
String
getType
()
{
return
T
ype
;
return
t
ype
;
}
}
public
String
getArith
()
{
public
String
getArith
()
{
return
A
rith
;
return
a
rith
;
}
}
public
float
getValue
()
{
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;
...
@@ -3,16 +3,16 @@ package emu.grasscutter.data.common;
import
emu.grasscutter.game.props.FightProperty
;
import
emu.grasscutter.game.props.FightProperty
;
public
class
FightPropData
{
public
class
FightPropData
{
private
String
P
ropType
;
private
String
p
ropType
;
private
FightProperty
prop
;
private
FightProperty
prop
;
private
float
V
alue
;
private
float
v
alue
;
public
String
getPropType
()
{
public
String
getPropType
()
{
return
P
ropType
;
return
p
ropType
;
}
}
public
float
getValue
()
{
public
float
getValue
()
{
return
V
alue
;
return
v
alue
;
}
}
public
FightProperty
getProp
()
{
public
FightProperty
getProp
()
{
...
@@ -20,6 +20,6 @@ public class FightPropData {
...
@@ -20,6 +20,6 @@ public class FightPropData {
}
}
public
void
onLoad
()
{
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;
...
@@ -3,31 +3,31 @@ package emu.grasscutter.data.common;
import
com.google.gson.annotations.SerializedName
;
import
com.google.gson.annotations.SerializedName
;
public
class
ItemParamData
{
public
class
ItemParamData
{
@SerializedName
(
value
=
"Id"
,
alternate
={
"
I
temId"
})
@SerializedName
(
value
=
"Id"
,
alternate
={
"
i
temId"
})
private
int
I
d
;
private
int
i
d
;
@SerializedName
(
value
=
"Count"
,
alternate
={
"
I
temCount"
})
@SerializedName
(
value
=
"Count"
,
alternate
={
"
i
temCount"
})
private
int
C
ount
;
private
int
c
ount
;
public
ItemParamData
()
{}
public
ItemParamData
()
{}
public
ItemParamData
(
int
id
,
int
count
)
{
public
ItemParamData
(
int
id
,
int
count
)
{
this
.
I
d
=
id
;
this
.
i
d
=
id
;
this
.
C
ount
=
count
;
this
.
c
ount
=
count
;
}
}
public
int
getId
()
{
public
int
getId
()
{
return
I
d
;
return
i
d
;
}
}
public
int
getItemId
()
{
public
int
getItemId
()
{
return
I
d
;
return
i
d
;
}
}
public
int
getCount
()
{
public
int
getCount
()
{
return
C
ount
;
return
c
ount
;
}
}
public
int
getItemCount
()
{
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
;
package
emu.grasscutter.data.common
;
public
class
ItemParamStringData
{
public
class
ItemParamStringData
{
private
int
I
d
;
private
int
i
d
;
private
String
C
ount
;
private
String
c
ount
;
public
ItemParamStringData
()
{}
public
ItemParamStringData
()
{}
public
int
getId
()
{
public
int
getId
()
{
return
I
d
;
return
i
d
;
}
}
public
String
getCount
()
{
public
String
getCount
()
{
return
C
ount
;
return
c
ount
;
}
}
public
ItemParamData
toItemParamData
()
{
public
ItemParamData
toItemParamData
()
{
if
(
C
ount
.
contains
(
";"
))
{
if
(
c
ount
.
contains
(
";"
))
{
String
[]
split
=
C
ount
.
split
(
";"
);
String
[]
split
=
c
ount
.
split
(
";"
);
C
ount
=
C
ount
.
split
(
";"
)[
split
.
length
-
1
];
c
ount
=
c
ount
.
split
(
";"
)[
split
.
length
-
1
];
}
else
if
(
C
ount
.
contains
(
"."
))
{
}
else
if
(
c
ount
.
contains
(
"."
))
{
return
new
ItemParamData
(
I
d
,
(
int
)
Math
.
ceil
(
Double
.
parseDouble
(
C
ount
)));
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