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
b9f7c657
Commit
b9f7c657
authored
Apr 27, 2022
by
Benjamin Elsdon
Browse files
Merge remote-tracking branch 'upstream/development' into dev-mail
parents
eb495807
782618cd
Changes
86
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketStoreItemChangeNotify.java
View file @
b9f7c657
...
...
@@ -18,7 +18,7 @@ public class PacketStoreItemChangeNotify extends GenshinPacket {
this
();
StoreItemChangeNotify
.
Builder
proto
=
StoreItemChangeNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
addItemList
(
item
.
toProto
());
this
.
setData
(
proto
);
...
...
@@ -28,9 +28,9 @@ public class PacketStoreItemChangeNotify extends GenshinPacket {
this
();
StoreItemChangeNotify
.
Builder
proto
=
StoreItemChangeNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
);
.
setStoreType
(
StoreType
.
S
TORE_PACK
);
items
.
stream
().
forEach
(
item
->
proto
.
addItemList
(
item
.
toProto
()));
items
.
forEach
(
item
->
proto
.
addItemList
(
item
.
toProto
()));
this
.
setData
(
proto
);
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketStoreItemDelNotify.java
View file @
b9f7c657
...
...
@@ -18,7 +18,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket {
this
();
StoreItemDelNotify
.
Builder
proto
=
StoreItemDelNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
addGuidList
(
item
.
getGuid
());
this
.
setData
(
proto
);
...
...
@@ -28,7 +28,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket {
this
();
StoreItemDelNotify
.
Builder
proto
=
StoreItemDelNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
);
.
setStoreType
(
StoreType
.
S
TORE_PACK
);
items
.
stream
().
forEach
(
item
->
proto
.
addGuidList
(
item
.
getGuid
()));
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketStoreWeightLimitNotify.java
View file @
b9f7c657
...
...
@@ -12,7 +12,7 @@ public class PacketStoreWeightLimitNotify extends GenshinPacket {
super
(
PacketOpcodes
.
StoreWeightLimitNotify
);
StoreWeightLimitNotify
p
=
StoreWeightLimitNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
setWeightLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitAll
)
.
setWeaponCountLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitWeapon
)
.
setReliquaryCountLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitRelic
)
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketUseItemRsp.java
View file @
b9f7c657
...
...
@@ -3,6 +3,7 @@ package emu.grasscutter.server.packet.send;
import
emu.grasscutter.game.inventory.GenshinItem
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
import
emu.grasscutter.net.proto.UseItemRspOuterClass.UseItemRsp
;
public
class
PacketUseItemRsp
extends
GenshinPacket
{
...
...
@@ -22,7 +23,7 @@ public class PacketUseItemRsp extends GenshinPacket {
public
PacketUseItemRsp
()
{
super
(
PacketOpcodes
.
UseItemRsp
);
UseItemRsp
proto
=
UseItemRsp
.
newBuilder
().
setRetcode
(
1
).
build
();
UseItemRsp
proto
=
UseItemRsp
.
newBuilder
().
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
).
build
();
this
.
setData
(
proto
);
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerLocationNotify.java
View file @
b9f7c657
...
...
@@ -14,7 +14,7 @@ public class PacketWorldPlayerLocationNotify extends GenshinPacket {
WorldPlayerLocationNotify
.
Builder
proto
=
WorldPlayerLocationNotify
.
newBuilder
();
for
(
GenshinPlayer
p
:
world
.
getPlayers
())
{
proto
.
addPlayerLocList
(
p
.
getWorldPlayerLocationInfo
());
proto
.
addPlayer
World
LocList
(
p
.
getWorldPlayerLocationInfo
());
}
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/utils/Crypto.java
View file @
b9f7c657
...
...
@@ -34,7 +34,7 @@ public final class Crypto {
public
static
void
extractSecretKeyBuffer
(
byte
[]
data
)
{
try
{
GetPlayerTokenRsp
p
=
GetPlayerTokenRsp
.
parseFrom
(
data
);
FileUtils
.
write
(
Grasscutter
.
getConfig
().
KEY_FOLDER
+
"secretKeyBuffer.bin"
,
p
.
getSecretKeyB
uffer
().
toByteArray
());
FileUtils
.
write
(
Grasscutter
.
getConfig
().
KEY_FOLDER
+
"secretKeyBuffer.bin"
,
p
.
getSecretKeyB
ytes
().
toByteArray
());
Grasscutter
.
getLogger
().
info
(
"Secret Key: "
+
p
.
getSecretKey
());
}
catch
(
Exception
e
)
{
Grasscutter
.
getLogger
().
error
(
"Crypto error."
,
e
);
...
...
Prev
1
2
3
4
5
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