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
1c36f078
Commit
1c36f078
authored
Apr 26, 2022
by
Melledy
Browse files
Renamed all references to a certain game
parent
6b8902be
Changes
270
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketWearEquipRsp.java
View file @
1c36f078
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.WearEquipRspOuterClass.WearEquipRsp
;
public
class
PacketWearEquipRsp
extends
Genshin
Packet
{
public
class
PacketWearEquipRsp
extends
Base
Packet
{
public
PacketWearEquipRsp
(
long
avatarGuid
,
long
equipGuid
)
{
super
(
PacketOpcodes
.
WearEquipRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldDataNotify.java
View file @
1c36f078
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PropValueOuterClass.PropValue
;
import
emu.grasscutter.net.proto.WorldDataNotifyOuterClass.WorldDataNotify
;
public
class
PacketWorldDataNotify
extends
Genshin
Packet
{
public
class
PacketWorldDataNotify
extends
Base
Packet
{
public
PacketWorldDataNotify
(
World
world
)
{
super
(
PacketOpcodes
.
WorldDataNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerDieNotify.java
View file @
1c36f078
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerDieTypeOuterClass.PlayerDieType
;
import
emu.grasscutter.net.proto.WorldPlayerDieNotifyOuterClass.WorldPlayerDieNotify
;
public
class
PacketWorldPlayerDieNotify
extends
Genshin
Packet
{
public
class
PacketWorldPlayerDieNotify
extends
Base
Packet
{
public
PacketWorldPlayerDieNotify
(
PlayerDieType
playerDieType
,
int
killerId
)
{
super
(
PacketOpcodes
.
WorldPlayerDieNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerInfoNotify.java
View file @
1c36f078
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.Player
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.WorldPlayerInfoNotifyOuterClass.WorldPlayerInfoNotify
;
public
class
PacketWorldPlayerInfoNotify
extends
Genshin
Packet
{
public
class
PacketWorldPlayerInfoNotify
extends
Base
Packet
{
public
PacketWorldPlayerInfoNotify
(
World
world
)
{
super
(
PacketOpcodes
.
WorldPlayerInfoNotify
);
...
...
@@ -14,7 +14,7 @@ public class PacketWorldPlayerInfoNotify extends GenshinPacket {
WorldPlayerInfoNotify
.
Builder
proto
=
WorldPlayerInfoNotify
.
newBuilder
();
for
(
int
i
=
0
;
i
<
world
.
getPlayers
().
size
();
i
++)
{
Genshin
Player
p
=
world
.
getPlayers
().
get
(
i
);
Player
p
=
world
.
getPlayers
().
get
(
i
);
proto
.
addPlayerInfoList
(
p
.
getOnlinePlayerInfo
());
proto
.
addPlayerUidList
(
p
.
getUid
());
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerLocationNotify.java
View file @
1c36f078
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.Player
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.WorldPlayerLocationNotifyOuterClass.WorldPlayerLocationNotify
;
public
class
PacketWorldPlayerLocationNotify
extends
Genshin
Packet
{
public
class
PacketWorldPlayerLocationNotify
extends
Base
Packet
{
public
PacketWorldPlayerLocationNotify
(
World
world
)
{
super
(
PacketOpcodes
.
WorldPlayerLocationNotify
);
WorldPlayerLocationNotify
.
Builder
proto
=
WorldPlayerLocationNotify
.
newBuilder
();
for
(
Genshin
Player
p
:
world
.
getPlayers
())
{
for
(
Player
p
:
world
.
getPlayers
())
{
proto
.
addPlayerWorldLocList
(
p
.
getWorldPlayerLocationInfo
());
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerRTTNotify.java
View file @
1c36f078
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.Player
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerRTTInfoOuterClass.PlayerRTTInfo
;
import
emu.grasscutter.net.proto.WorldPlayerRTTNotifyOuterClass.WorldPlayerRTTNotify
;
public
class
PacketWorldPlayerRTTNotify
extends
Genshin
Packet
{
public
class
PacketWorldPlayerRTTNotify
extends
Base
Packet
{
public
PacketWorldPlayerRTTNotify
(
World
world
)
{
super
(
PacketOpcodes
.
WorldPlayerRTTNotify
);
WorldPlayerRTTNotify
.
Builder
proto
=
WorldPlayerRTTNotify
.
newBuilder
();
for
(
Genshin
Player
player
:
world
.
getPlayers
())
{
for
(
Player
player
:
world
.
getPlayers
())
{
proto
.
addPlayerRttList
(
PlayerRTTInfo
.
newBuilder
()
.
setUid
(
player
.
getUid
())
...
...
src/main/java/emu/grasscutter/task/TaskMap.java
View file @
1c36f078
...
...
@@ -2,7 +2,7 @@ package emu.grasscutter.task;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.game.Account
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.Player
;
import
org.quartz.CronScheduleBuilder
;
import
org.quartz.CronTrigger
;
...
...
src/main/java/emu/grasscutter/task/tasks/MoonCard.java
View file @
1c36f078
package
emu.grasscutter.task.tasks
;
import
emu.grasscutter.database.DatabaseManager
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.Player
;
import
emu.grasscutter.task.Task
;
import
emu.grasscutter.task.TaskHandler
;
...
...
@@ -15,8 +15,8 @@ import org.quartz.JobExecutionException;
public
final
class
MoonCard
implements
TaskHandler
{
@Override
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
List
<
Genshin
Player
>
players
=
DatabaseManager
.
getDatastore
().
find
(
Genshin
Player
.
class
).
stream
().
toList
();
for
(
Genshin
Player
player
:
players
)
{
List
<
Player
>
players
=
DatabaseManager
.
getDatastore
().
find
(
Player
.
class
).
stream
().
toList
();
for
(
Player
player
:
players
)
{
if
(
player
.
isOnline
())
{
if
(
player
.
inMoonCard
())
{
player
.
getTodayMoonCard
();
...
...
src/main/java/emu/grasscutter/tools/Tools.java
View file @
1c36f078
...
...
@@ -18,9 +18,9 @@ import java.util.stream.Collectors;
import
com.google.gson.reflect.TypeToken
;
import
emu.grasscutter.G
enshin
Constants
;
import
emu.grasscutter.G
ame
Constants
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.data.G
enshin
Data
;
import
emu.grasscutter.data.G
ame
Data
;
import
emu.grasscutter.data.ResourceLoader
;
import
emu.grasscutter.data.def.AvatarData
;
import
emu.grasscutter.data.def.ItemData
;
...
...
@@ -45,48 +45,48 @@ public final class Tools {
DateTimeFormatter
dtf
=
DateTimeFormatter
.
ofPattern
(
"yyyy/MM/dd HH:mm:ss"
);
LocalDateTime
now
=
LocalDateTime
.
now
();
writer
.
println
(
"// G
enshin Impact "
+
Genshin
Constants
.
VERSION
+
" GM Handbook"
);
writer
.
println
(
"// G
rasscutter "
+
Game
Constants
.
VERSION
+
" GM Handbook"
);
writer
.
println
(
"// Created "
+
dtf
.
format
(
now
)
+
System
.
lineSeparator
()
+
System
.
lineSeparator
());
list
=
new
ArrayList
<>(
G
enshin
Data
.
getAvatarDataMap
().
keySet
());
list
=
new
ArrayList
<>(
G
ame
Data
.
getAvatarDataMap
().
keySet
());
Collections
.
sort
(
list
);
writer
.
println
(
"// Avatars"
);
for
(
Integer
id
:
list
)
{
AvatarData
data
=
G
enshin
Data
.
getAvatarDataMap
().
get
(
id
);
AvatarData
data
=
G
ame
Data
.
getAvatarDataMap
().
get
(
id
);
writer
.
println
(
data
.
getId
()
+
" : "
+
map
.
get
(
data
.
getNameTextMapHash
()));
}
writer
.
println
();
list
=
new
ArrayList
<>(
G
enshin
Data
.
getItemDataMap
().
keySet
());
list
=
new
ArrayList
<>(
G
ame
Data
.
getItemDataMap
().
keySet
());
Collections
.
sort
(
list
);
writer
.
println
(
"// Items"
);
for
(
Integer
id
:
list
)
{
ItemData
data
=
G
enshin
Data
.
getItemDataMap
().
get
(
id
);
ItemData
data
=
G
ame
Data
.
getItemDataMap
().
get
(
id
);
writer
.
println
(
data
.
getId
()
+
" : "
+
map
.
get
(
data
.
getNameTextMapHash
()));
}
writer
.
println
();
writer
.
println
(
"// Scenes"
);
list
=
new
ArrayList
<>(
G
enshin
Data
.
getSceneDataMap
().
keySet
());
list
=
new
ArrayList
<>(
G
ame
Data
.
getSceneDataMap
().
keySet
());
Collections
.
sort
(
list
);
for
(
Integer
id
:
list
)
{
SceneData
data
=
G
enshin
Data
.
getSceneDataMap
().
get
(
id
);
SceneData
data
=
G
ame
Data
.
getSceneDataMap
().
get
(
id
);
writer
.
println
(
data
.
getId
()
+
" : "
+
data
.
getScriptData
());
}
writer
.
println
();
writer
.
println
(
"// Monsters"
);
list
=
new
ArrayList
<>(
G
enshin
Data
.
getMonsterDataMap
().
keySet
());
list
=
new
ArrayList
<>(
G
ame
Data
.
getMonsterDataMap
().
keySet
());
Collections
.
sort
(
list
);
for
(
Integer
id
:
list
)
{
MonsterData
data
=
G
enshin
Data
.
getMonsterDataMap
().
get
(
id
);
MonsterData
data
=
G
ame
Data
.
getMonsterDataMap
().
get
(
id
);
writer
.
println
(
data
.
getId
()
+
" : "
+
map
.
get
(
data
.
getNameTextMapHash
()));
}
}
...
...
src/main/java/emu/grasscutter/utils/Utils.java
View file @
1c36f078
...
...
@@ -174,11 +174,11 @@ public final class Utils {
// Check for resources folder.
if
(!
fileExists
(
resourcesFolder
))
{
logger
.
info
(
"Creating resources folder..."
);
logger
.
info
(
"Place a copy of '
GenshinData
' in the resources folder."
);
logger
.
info
(
"Place a copy of '
BinOutput' and 'ExcelBinOutput
' in the resources folder."
);
createFolder
(
resourcesFolder
);
exit
=
true
;
}
// Check for
GenshinData
.
// Check for
BinOutput + ExcelBinOuput
.
if
(!
fileExists
(
resourcesFolder
+
"BinOutput"
)
||
!
fileExists
(
resourcesFolder
+
"ExcelBinOutput"
))
{
logger
.
info
(
"Place a copy of 'BinOutput' and 'ExcelBinOutput' in the resources folder."
);
...
...
Prev
1
…
10
11
12
13
14
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