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
;
import
emu.grasscutter.G
enshinConstants
;
import
emu.grasscutter.G
rasscutter
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
...
...
@@ -13,11 +13,11 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket {
StoreWeightLimitNotify
p
=
StoreWeightLimitNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
StorePack
)
.
setWeightLimit
(
G
enshinConstants
.
LIMIT_ALL
)
.
setWeaponCountLimit
(
G
enshinConstants
.
LIMIT_WEAPON
)
.
setReliquaryCountLimit
(
G
enshinConstants
.
LIMIT_RELIC
)
.
setMaterialCountLimit
(
G
enshinConstants
.
LIMIT_MATERIAL
)
.
setFurnitureCountLimit
(
G
enshinConstants
.
LIMIT_FURNITURE
)
.
setWeightLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitAll
)
.
setWeaponCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitWeapon
)
.
setReliquaryCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitRelic
)
.
setMaterialCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitMaterial
)
.
setFurnitureCountLimit
(
G
rasscutter
.
getConfig
().
getServerOptions
().
InventoryLimitFurniture
)
.
build
();
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 {
GenshinPlayer
p
=
world
.
getPlayers
().
get
(
i
);
proto
.
addPlayerInfoList
(
p
.
getOnlinePlayerInfo
());
proto
.
addPlayerUidList
(
p
.
get
I
d
());
proto
.
addPlayerUidList
(
p
.
get
Ui
d
());
}
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 {
for
(
GenshinPlayer
player
:
world
.
getPlayers
())
{
proto
.
addPlayerRttList
(
PlayerRTTInfo
.
newBuilder
()
.
setUid
(
player
.
get
I
d
())
.
setUid
(
player
.
get
Ui
d
())
.
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;
import
emu.grasscutter.data.def.AvatarData
;
import
emu.grasscutter.data.def.ItemData
;
import
emu.grasscutter.data.def.MonsterData
;
import
emu.grasscutter.data.def.SceneData
;
public
final
class
Tools
{
...
...
@@ -63,6 +64,17 @@ public final class Tools {
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"
);
list
=
new
ArrayList
<>(
GenshinData
.
getMonsterDataMap
().
keySet
());
Collections
.
sort
(
list
);
...
...
src/main/java/emu/grasscutter/utils/Utils.java
View file @
058d3222
...
...
@@ -165,8 +165,6 @@ public final class Utils {
// Check for game data.
if
(!
fileExists
(
dataFolder
))
createFolder
(
dataFolder
);
if
(!
fileExists
(
dataFolder
+
"AbilityEmbryos.json"
))
copyFromResources
(
"data/AbilityEmbryos.json"
,
dataFolder
);
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