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
058d3222
Commit
058d3222
authored
Apr 19, 2022
by
Benjamin Elsdon
Browse files
Merge remote-tracking branch 'upstream/main'
parents
dfc956a1
2572d55c
Changes
66
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketSceneUnlockInfoNotify.java
0 → 100644
View file @
058d3222
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SceneUnlockInfoNotifyOuterClass.SceneUnlockInfoNotify
;
import
emu.grasscutter.net.proto.SceneUnlockInfoOuterClass.SceneUnlockInfo
;
public
class
PacketSceneUnlockInfoNotify
extends
GenshinPacket
{
public
PacketSceneUnlockInfoNotify
()
{
super
(
PacketOpcodes
.
SceneUnlockInfoNotify
);
// Rename opcode later
SceneUnlockInfoNotify
proto
=
SceneUnlockInfoNotify
.
newBuilder
()
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
1
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
3
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
4
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
5
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
6
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
7
))
.
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketStoreWeightLimitNotify.java
View file @
058d3222
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.G
enshinConstants
;
import
emu.grasscutter.G
rasscutter
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
...
@@ -13,11 +13,11 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket {
...
@@ -13,11 +13,11 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket {
StoreWeightLimitNotify
p
=
StoreWeightLimitNotify
.
newBuilder
()
StoreWeightLimitNotify
p
=
StoreWeightLimitNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
StorePack
)
.
setStoreType
(
StoreType
.
StorePack
)
.
setWeightLimit
(
G
enshinConstants
.
LIMIT_ALL
)
.
setWeightLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitAll
)
.
setWeaponCountLimit
(
G
enshinConstants
.
LIMIT_WEAPON
)
.
setWeaponCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitWeapon
)
.
setReliquaryCountLimit
(
G
enshinConstants
.
LIMIT_RELIC
)
.
setReliquaryCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitRelic
)
.
setMaterialCountLimit
(
G
enshinConstants
.
LIMIT_MATERIAL
)
.
setMaterialCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitMaterial
)
.
setFurnitureCountLimit
(
G
enshinConstants
.
LIMIT_FURNITURE
)
.
setFurnitureCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitFurniture
)
.
build
();
.
build
();
this
.
setData
(
p
);
this
.
setData
(
p
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerInfoNotify.java
View file @
058d3222
...
@@ -17,7 +17,7 @@ public class PacketWorldPlayerInfoNotify extends GenshinPacket {
...
@@ -17,7 +17,7 @@ public class PacketWorldPlayerInfoNotify extends GenshinPacket {
GenshinPlayer
p
=
world
.
getPlayers
().
get
(
i
);
GenshinPlayer
p
=
world
.
getPlayers
().
get
(
i
);
proto
.
addPlayerInfoList
(
p
.
getOnlinePlayerInfo
());
proto
.
addPlayerInfoList
(
p
.
getOnlinePlayerInfo
());
proto
.
addPlayerUidList
(
p
.
get
I
d
());
proto
.
addPlayerUidList
(
p
.
get
Ui
d
());
}
}
this
.
setData
(
proto
.
build
());
this
.
setData
(
proto
.
build
());
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerRTTNotify.java
View file @
058d3222
...
@@ -17,7 +17,7 @@ public class PacketWorldPlayerRTTNotify extends GenshinPacket {
...
@@ -17,7 +17,7 @@ public class PacketWorldPlayerRTTNotify extends GenshinPacket {
for
(
GenshinPlayer
player
:
world
.
getPlayers
())
{
for
(
GenshinPlayer
player
:
world
.
getPlayers
())
{
proto
.
addPlayerRttList
(
proto
.
addPlayerRttList
(
PlayerRTTInfo
.
newBuilder
()
PlayerRTTInfo
.
newBuilder
()
.
setUid
(
player
.
get
I
d
())
.
setUid
(
player
.
get
Ui
d
())
.
setRtt
(
10
)
// TODO - put player ping here
.
setRtt
(
10
)
// TODO - put player ping here
);
);
}
}
...
...
src/main/java/emu/grasscutter/tools/Tools.java
View file @
058d3222
...
@@ -20,6 +20,7 @@ import emu.grasscutter.data.ResourceLoader;
...
@@ -20,6 +20,7 @@ import emu.grasscutter.data.ResourceLoader;
import
emu.grasscutter.data.def.AvatarData
;
import
emu.grasscutter.data.def.AvatarData
;
import
emu.grasscutter.data.def.ItemData
;
import
emu.grasscutter.data.def.ItemData
;
import
emu.grasscutter.data.def.MonsterData
;
import
emu.grasscutter.data.def.MonsterData
;
import
emu.grasscutter.data.def.SceneData
;
public
final
class
Tools
{
public
final
class
Tools
{
...
@@ -63,6 +64,17 @@ public final class Tools {
...
@@ -63,6 +64,17 @@ public final class Tools {
writer
.
println
();
writer
.
println
();
writer
.
println
(
"// Scenes"
);
list
=
new
ArrayList
<>(
GenshinData
.
getSceneDataMap
().
keySet
());
Collections
.
sort
(
list
);
for
(
Integer
id
:
list
)
{
SceneData
data
=
GenshinData
.
getSceneDataMap
().
get
(
id
);
writer
.
println
(
data
.
getId
()
+
" : "
+
data
.
getScriptData
());
}
writer
.
println
();
writer
.
println
(
"// Monsters"
);
writer
.
println
(
"// Monsters"
);
list
=
new
ArrayList
<>(
GenshinData
.
getMonsterDataMap
().
keySet
());
list
=
new
ArrayList
<>(
GenshinData
.
getMonsterDataMap
().
keySet
());
Collections
.
sort
(
list
);
Collections
.
sort
(
list
);
...
...
src/main/java/emu/grasscutter/utils/Utils.java
View file @
058d3222
...
@@ -165,8 +165,6 @@ public final class Utils {
...
@@ -165,8 +165,6 @@ public final class Utils {
// Check for game data.
// Check for game data.
if
(!
fileExists
(
dataFolder
))
if
(!
fileExists
(
dataFolder
))
createFolder
(
dataFolder
);
createFolder
(
dataFolder
);
if
(!
fileExists
(
dataFolder
+
"AbilityEmbryos.json"
))
copyFromResources
(
"data/AbilityEmbryos.json"
,
dataFolder
);
if
(
exit
)
System
.
exit
(
1
);
if
(
exit
)
System
.
exit
(
1
);
}
}
...
...
Prev
1
2
3
4
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