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/game/quest/handlers/QuestBaseHandler.java
View file @
a23b29b6
package
emu.grasscutter.game.quest.handlers
;
package
emu.grasscutter.game.quest.handlers
;
import
emu.grasscutter.data.
def
.QuestData.QuestCondition
;
import
emu.grasscutter.data.
excels
.QuestData.QuestCondition
;
import
emu.grasscutter.game.quest.GameQuest
;
import
emu.grasscutter.game.quest.GameQuest
;
public
abstract
class
QuestBaseHandler
{
public
abstract
class
QuestBaseHandler
{
...
...
src/main/java/emu/grasscutter/game/shop/ShopInfo.java
View file @
a23b29b6
package
emu.grasscutter.game.shop
;
package
emu.grasscutter.game.shop
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.
def
.ShopGoodsData
;
import
emu.grasscutter.data.
excels
.ShopGoodsData
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
...
src/main/java/emu/grasscutter/game/shop/ShopManager.java
View file @
a23b29b6
...
@@ -5,7 +5,7 @@ import emu.grasscutter.Grasscutter;
...
@@ -5,7 +5,7 @@ import emu.grasscutter.Grasscutter;
import
emu.grasscutter.data.DataLoader
;
import
emu.grasscutter.data.DataLoader
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.
def
.ShopGoodsData
;
import
emu.grasscutter.data.
excels
.ShopGoodsData
;
import
emu.grasscutter.server.game.GameServer
;
import
emu.grasscutter.server.game.GameServer
;
import
emu.grasscutter.utils.Utils
;
import
emu.grasscutter.utils.Utils
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
import
it.unimi.dsi.fastutil.ints.Int2ObjectMap
;
...
...
src/main/java/emu/grasscutter/game/tower/TowerManager.java
View file @
a23b29b6
...
@@ -3,7 +3,7 @@ package emu.grasscutter.game.tower;
...
@@ -3,7 +3,7 @@ package emu.grasscutter.game.tower;
import
dev.morphia.annotations.Entity
;
import
dev.morphia.annotations.Entity
;
import
dev.morphia.annotations.Transient
;
import
dev.morphia.annotations.Transient
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.TowerLevelData
;
import
emu.grasscutter.data.
excels
.TowerLevelData
;
import
emu.grasscutter.game.dungeons.DungeonSettleListener
;
import
emu.grasscutter.game.dungeons.DungeonSettleListener
;
import
emu.grasscutter.game.dungeons.TowerDungeonSettleListener
;
import
emu.grasscutter.game.dungeons.TowerDungeonSettleListener
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.player.Player
;
...
@@ -73,7 +73,7 @@ public class TowerManager {
...
@@ -73,7 +73,7 @@ public class TowerManager {
this
.
currentLevelId
=
GameData
.
getTowerLevelDataMap
().
values
().
stream
()
this
.
currentLevelId
=
GameData
.
getTowerLevelDataMap
().
values
().
stream
()
.
filter
(
x
->
x
.
getLevelId
()
==
floorData
.
getLevelId
()
&&
x
.
getLevelIndex
()
==
1
)
.
filter
(
x
->
x
.
getLevelId
()
==
floorData
.
getLevelId
()
&&
x
.
getLevelIndex
()
==
1
)
.
findFirst
()
.
findFirst
()
.
map
(
TowerLevelData:
:
getI
D
)
.
map
(
TowerLevelData:
:
getI
d
)
.
orElse
(
0
);
.
orElse
(
0
);
if
(
entryScene
==
0
){
if
(
entryScene
==
0
){
...
...
src/main/java/emu/grasscutter/game/tower/TowerScheduleManager.java
View file @
a23b29b6
...
@@ -3,7 +3,7 @@ package emu.grasscutter.game.tower;
...
@@ -3,7 +3,7 @@ package emu.grasscutter.game.tower;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.DataLoader
;
import
emu.grasscutter.data.DataLoader
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.TowerScheduleData
;
import
emu.grasscutter.data.
excels
.TowerScheduleData
;
import
emu.grasscutter.server.game.GameServer
;
import
emu.grasscutter.server.game.GameServer
;
import
java.io.FileReader
;
import
java.io.FileReader
;
...
...
src/main/java/emu/grasscutter/game/world/Scene.java
View file @
a23b29b6
...
@@ -2,7 +2,7 @@ package emu.grasscutter.game.world;
...
@@ -2,7 +2,7 @@ package emu.grasscutter.game.world;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameDepot
;
import
emu.grasscutter.data.GameDepot
;
import
emu.grasscutter.data.
def
.*
;
import
emu.grasscutter.data.
excels
.*
;
import
emu.grasscutter.game.dungeons.DungeonChallenge
;
import
emu.grasscutter.game.dungeons.DungeonChallenge
;
import
emu.grasscutter.game.dungeons.DungeonSettleListener
;
import
emu.grasscutter.game.dungeons.DungeonSettleListener
;
import
emu.grasscutter.game.entity.*
;
import
emu.grasscutter.game.entity.*
;
...
...
src/main/java/emu/grasscutter/game/world/World.java
View file @
a23b29b6
...
@@ -12,8 +12,8 @@ import emu.grasscutter.game.props.EnterReason;
...
@@ -12,8 +12,8 @@ import emu.grasscutter.game.props.EnterReason;
import
emu.grasscutter.game.props.EntityIdType
;
import
emu.grasscutter.game.props.EntityIdType
;
import
emu.grasscutter.game.props.SceneType
;
import
emu.grasscutter.game.props.SceneType
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.DungeonData
;
import
emu.grasscutter.data.
excels
.DungeonData
;
import
emu.grasscutter.data.
def
.SceneData
;
import
emu.grasscutter.data.
excels
.SceneData
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.proto.EnterTypeOuterClass.EnterType
;
import
emu.grasscutter.net.proto.EnterTypeOuterClass.EnterType
;
import
emu.grasscutter.scripts.data.SceneConfig
;
import
emu.grasscutter.scripts.data.SceneConfig
;
...
...
src/main/java/emu/grasscutter/scripts/service/ScriptMonsterSpawnService.java
View file @
a23b29b6
package
emu.grasscutter.scripts.service
;
package
emu.grasscutter.scripts.service
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.MonsterData
;
import
emu.grasscutter.data.
excels
.MonsterData
;
import
emu.grasscutter.data.
def
.WorldLevelData
;
import
emu.grasscutter.data.
excels
.WorldLevelData
;
import
emu.grasscutter.game.entity.EntityMonster
;
import
emu.grasscutter.game.entity.EntityMonster
;
import
emu.grasscutter.scripts.SceneScriptManager
;
import
emu.grasscutter.scripts.SceneScriptManager
;
import
emu.grasscutter.scripts.constants.EventType
;
import
emu.grasscutter.scripts.constants.EventType
;
...
...
src/main/java/emu/grasscutter/server/http/documentation/GachaMappingRequestHandler.java
View file @
a23b29b6
...
@@ -5,8 +5,8 @@ import static emu.grasscutter.Configuration.RESOURCE;
...
@@ -5,8 +5,8 @@ import static emu.grasscutter.Configuration.RESOURCE;
import
com.google.gson.reflect.TypeToken
;
import
com.google.gson.reflect.TypeToken
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
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.utils.Utils
;
import
emu.grasscutter.utils.Utils
;
import
static
emu
.
grasscutter
.
Configuration
.
DOCUMENT_LANGUAGE
;
import
static
emu
.
grasscutter
.
Configuration
.
DOCUMENT_LANGUAGE
;
import
express.http.Request
;
import
express.http.Request
;
...
...
src/main/java/emu/grasscutter/server/http/documentation/HandbookRequestHandler.java
View file @
a23b29b6
...
@@ -7,10 +7,10 @@ import com.google.gson.reflect.TypeToken;
...
@@ -7,10 +7,10 @@ import com.google.gson.reflect.TypeToken;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.command.CommandMap
;
import
emu.grasscutter.command.CommandMap
;
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.data.
def
.MonsterData
;
import
emu.grasscutter.data.
excels
.MonsterData
;
import
emu.grasscutter.data.
def
.SceneData
;
import
emu.grasscutter.data.
excels
.SceneData
;
import
emu.grasscutter.utils.FileUtils
;
import
emu.grasscutter.utils.FileUtils
;
import
emu.grasscutter.utils.Utils
;
import
emu.grasscutter.utils.Utils
;
import
express.http.Request
;
import
express.http.Request
;
...
...
src/main/java/emu/grasscutter/server/packet/recv/HandlerAvatarFetterLevelRewardReq.java
View file @
a23b29b6
package
emu.grasscutter.server.packet.recv
;
package
emu.grasscutter.server.packet.recv
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.RewardData
;
import
emu.grasscutter.data.
excels
.RewardData
;
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.props.ActionReason
;
import
emu.grasscutter.game.props.ActionReason
;
...
...
src/main/java/emu/grasscutter/server/packet/recv/HandlerCombineReq.java
View file @
a23b29b6
package
emu.grasscutter.server.packet.recv
;
package
emu.grasscutter.server.packet.recv
;
import
emu.grasscutter.data.def.CombineData
;
import
emu.grasscutter.data.common.ItemParamData
;
import
emu.grasscutter.data.excels.CombineData
;
import
emu.grasscutter.net.packet.Opcodes
;
import
emu.grasscutter.net.packet.Opcodes
;
import
emu.grasscutter.net.packet.PacketHandler
;
import
emu.grasscutter.net.packet.PacketHandler
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
...
@@ -35,7 +36,7 @@ public class HandlerCombineReq extends PacketHandler {
...
@@ -35,7 +36,7 @@ public class HandlerCombineReq extends PacketHandler {
toItemParamList
(
result
.
getBack
())));
toItemParamList
(
result
.
getBack
())));
}
}
private
List
<
ItemParamOuterClass
.
ItemParam
>
toItemParamList
(
List
<
CombineData
.
CombineItemPair
>
list
){
private
List
<
ItemParamOuterClass
.
ItemParam
>
toItemParamList
(
List
<
ItemParamData
>
list
){
return
list
.
stream
()
return
list
.
stream
()
.
map
(
item
->
ItemParamOuterClass
.
ItemParam
.
newBuilder
()
.
map
(
item
->
ItemParamOuterClass
.
ItemParam
.
newBuilder
()
.
setItemId
(
item
.
getId
())
.
setItemId
(
item
.
getId
())
...
...
src/main/java/emu/grasscutter/server/packet/recv/HandlerPersonalSceneJumpReq.java
View file @
a23b29b6
package
emu.grasscutter.server.packet.recv
;
package
emu.grasscutter.server.packet.recv
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
custom
.ScenePointEntry
;
import
emu.grasscutter.data.
binout
.ScenePointEntry
;
import
emu.grasscutter.net.packet.Opcodes
;
import
emu.grasscutter.net.packet.Opcodes
;
import
emu.grasscutter.net.packet.PacketHandler
;
import
emu.grasscutter.net.packet.PacketHandler
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
...
...
src/main/java/emu/grasscutter/server/packet/recv/HandlerSceneTransToPointReq.java
View file @
a23b29b6
package
emu.grasscutter.server.packet.recv
;
package
emu.grasscutter.server.packet.recv
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
custom
.ScenePointEntry
;
import
emu.grasscutter.data.
binout
.ScenePointEntry
;
import
emu.grasscutter.net.packet.Opcodes
;
import
emu.grasscutter.net.packet.Opcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SceneTransToPointReqOuterClass.SceneTransToPointReq
;
import
emu.grasscutter.net.proto.SceneTransToPointReqOuterClass.SceneTransToPointReq
;
...
...
src/main/java/emu/grasscutter/server/packet/recv/HandlerWidgetDoBagReq.java
View file @
a23b29b6
...
@@ -2,7 +2,7 @@ package emu.grasscutter.server.packet.recv;
...
@@ -2,7 +2,7 @@ package emu.grasscutter.server.packet.recv;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
def
.GadgetData
;
import
emu.grasscutter.data.
excels
.GadgetData
;
import
emu.grasscutter.game.entity.EntityVehicle
;
import
emu.grasscutter.game.entity.EntityVehicle
;
import
emu.grasscutter.game.entity.GameEntity
;
import
emu.grasscutter.game.entity.GameEntity
;
import
emu.grasscutter.game.props.LifeState
;
import
emu.grasscutter.game.props.LifeState
;
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java
View file @
a23b29b6
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.
custom
.ScenePointEntry
;
import
emu.grasscutter.data.
binout
.ScenePointEntry
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
...
...
src/main/java/emu/grasscutter/tools/Tools.java
View file @
a23b29b6
...
@@ -19,12 +19,12 @@ import emu.grasscutter.command.Command;
...
@@ -19,12 +19,12 @@ import emu.grasscutter.command.Command;
import
emu.grasscutter.command.CommandMap
;
import
emu.grasscutter.command.CommandMap
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.ResourceLoader
;
import
emu.grasscutter.data.ResourceLoader
;
import
emu.grasscutter.data.
custom
.MainQuestData
;
import
emu.grasscutter.data.
binout
.MainQuestData
;
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.data.
def
.MonsterData
;
import
emu.grasscutter.data.
excels
.MonsterData
;
import
emu.grasscutter.data.
def
.QuestData
;
import
emu.grasscutter.data.
excels
.QuestData
;
import
emu.grasscutter.data.
def
.SceneData
;
import
emu.grasscutter.data.
excels
.SceneData
;
import
emu.grasscutter.utils.Utils
;
import
emu.grasscutter.utils.Utils
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
import
static
emu
.
grasscutter
.
utils
.
Language
.
translate
;
...
...
src/main/java/emu/grasscutter/utils/Position.java
View file @
a23b29b6
...
@@ -2,6 +2,8 @@ package emu.grasscutter.utils;
...
@@ -2,6 +2,8 @@ package emu.grasscutter.utils;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
com.google.gson.annotations.SerializedName
;
import
dev.morphia.annotations.Entity
;
import
dev.morphia.annotations.Entity
;
import
emu.grasscutter.net.proto.VectorOuterClass.Vector
;
import
emu.grasscutter.net.proto.VectorOuterClass.Vector
;
...
@@ -9,8 +11,13 @@ import emu.grasscutter.net.proto.VectorOuterClass.Vector;
...
@@ -9,8 +11,13 @@ import emu.grasscutter.net.proto.VectorOuterClass.Vector;
public
class
Position
implements
Serializable
{
public
class
Position
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2001232313615923575L
;
private
static
final
long
serialVersionUID
=
-
2001232313615923575L
;
@SerializedName
(
value
=
"x"
,
alternate
={
"_x"
,
"X"
})
private
float
x
;
private
float
x
;
@SerializedName
(
value
=
"y"
,
alternate
={
"_y"
,
"Y"
})
private
float
y
;
private
float
y
;
@SerializedName
(
value
=
"z"
,
alternate
={
"_z"
,
"Z"
})
private
float
z
;
private
float
z
;
public
Position
()
{
public
Position
()
{
...
...
src/main/java/emu/grasscutter/utils/Utils.java
View file @
a23b29b6
...
@@ -273,43 +273,6 @@ public final class Utils {
...
@@ -273,43 +273,6 @@ public final class Utils {
}
return
stringBuilder
.
toString
();
}
return
stringBuilder
.
toString
();
}
}
/**
* Switch properties from upper case to lower case?
*/
public
static
Map
<
String
,
Object
>
switchPropertiesUpperLowerCase
(
Map
<
String
,
Object
>
objMap
,
Class
<?>
cls
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
objMap
.
size
());
for
(
String
key
:
objMap
.
keySet
())
{
try
{
char
c
=
key
.
charAt
(
0
);
if
(
c
>=
'a'
&&
c
<=
'z'
)
{
try
{
cls
.
getDeclaredField
(
key
);
map
.
put
(
key
,
objMap
.
get
(
key
));
}
catch
(
NoSuchFieldException
e
)
{
String
s1
=
String
.
valueOf
(
c
).
toUpperCase
();
String
after
=
key
.
length
()
>
1
?
s1
+
key
.
substring
(
1
)
:
s1
;
cls
.
getDeclaredField
(
after
);
map
.
put
(
after
,
objMap
.
get
(
key
));
}
}
else
if
(
c
>=
'A'
&&
c
<=
'Z'
)
{
try
{
cls
.
getDeclaredField
(
key
);
map
.
put
(
key
,
objMap
.
get
(
key
));
}
catch
(
NoSuchFieldException
e
)
{
String
s1
=
String
.
valueOf
(
c
).
toLowerCase
();
String
after
=
key
.
length
()
>
1
?
s1
+
key
.
substring
(
1
)
:
s1
;
cls
.
getDeclaredField
(
after
);
map
.
put
(
after
,
objMap
.
get
(
key
));
}
}
}
catch
(
NoSuchFieldException
e
)
{
map
.
put
(
key
,
objMap
.
get
(
key
));
}
}
return
map
;
}
/**
/**
* Performs a linear interpolation using a table of fixed points to create an effective piecewise f(x) = y function.
* Performs a linear interpolation using a table of fixed points to create an effective piecewise f(x) = y function.
* @param x
* @param x
...
...
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