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
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketGadgetInteractRsp.java
View file @
b9f7c657
...
@@ -5,6 +5,7 @@ import emu.grasscutter.net.packet.GenshinPacket;
...
@@ -5,6 +5,7 @@ import emu.grasscutter.net.packet.GenshinPacket;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.GadgetInteractRspOuterClass.GadgetInteractRsp
;
import
emu.grasscutter.net.proto.GadgetInteractRspOuterClass.GadgetInteractRsp
;
import
emu.grasscutter.net.proto.InteractTypeOuterClass.InteractType
;
import
emu.grasscutter.net.proto.InteractTypeOuterClass.InteractType
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
public
class
PacketGadgetInteractRsp
extends
GenshinPacket
{
public
class
PacketGadgetInteractRsp
extends
GenshinPacket
{
public
PacketGadgetInteractRsp
(
EntityGadget
gadget
,
InteractType
interact
)
{
public
PacketGadgetInteractRsp
(
EntityGadget
gadget
,
InteractType
interact
)
{
...
@@ -23,7 +24,7 @@ public class PacketGadgetInteractRsp extends GenshinPacket {
...
@@ -23,7 +24,7 @@ public class PacketGadgetInteractRsp extends GenshinPacket {
super
(
PacketOpcodes
.
GadgetInteractRsp
);
super
(
PacketOpcodes
.
GadgetInteractRsp
);
GadgetInteractRsp
proto
=
GadgetInteractRsp
.
newBuilder
()
GadgetInteractRsp
proto
=
GadgetInteractRsp
.
newBuilder
()
.
setRetcode
(
1
)
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetAuthkeyRsp.java
View file @
b9f7c657
...
@@ -3,13 +3,14 @@ package emu.grasscutter.server.packet.send;
...
@@ -3,13 +3,14 @@ package emu.grasscutter.server.packet.send;
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.GetAuthkeyRspOuterClass.GetAuthkeyRsp
;
import
emu.grasscutter.net.proto.GetAuthkeyRspOuterClass.GetAuthkeyRsp
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
public
class
PacketGetAuthkeyRsp
extends
GenshinPacket
{
public
class
PacketGetAuthkeyRsp
extends
GenshinPacket
{
public
PacketGetAuthkeyRsp
()
{
public
PacketGetAuthkeyRsp
()
{
super
(
PacketOpcodes
.
GetAuthkeyRsp
);
super
(
PacketOpcodes
.
GetAuthkeyRsp
);
GetAuthkeyRsp
proto
=
GetAuthkeyRsp
.
newBuilder
().
setRetcode
(
1
).
build
();
GetAuthkeyRsp
proto
=
GetAuthkeyRsp
.
newBuilder
().
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
).
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
View file @
b9f7c657
...
@@ -9,6 +9,7 @@ import emu.grasscutter.net.proto.FriendBriefOuterClass.FriendBrief;
...
@@ -9,6 +9,7 @@ import emu.grasscutter.net.proto.FriendBriefOuterClass.FriendBrief;
import
emu.grasscutter.net.proto.FriendOnlineStateOuterClass.FriendOnlineState
;
import
emu.grasscutter.net.proto.FriendOnlineStateOuterClass.FriendOnlineState
;
import
emu.grasscutter.net.proto.GetPlayerFriendListRspOuterClass.GetPlayerFriendListRsp
;
import
emu.grasscutter.net.proto.GetPlayerFriendListRspOuterClass.GetPlayerFriendListRsp
;
import
emu.grasscutter.net.proto.HeadImageOuterClass.HeadImage
;
import
emu.grasscutter.net.proto.HeadImageOuterClass.HeadImage
;
import
emu.grasscutter.net.proto.PlatformTypeOuterClass
;
public
class
PacketGetPlayerFriendListRsp
extends
GenshinPacket
{
public
class
PacketGetPlayerFriendListRsp
extends
GenshinPacket
{
...
@@ -19,15 +20,15 @@ public class PacketGetPlayerFriendListRsp extends GenshinPacket {
...
@@ -19,15 +20,15 @@ public class PacketGetPlayerFriendListRsp extends GenshinPacket {
.
setUid
(
GenshinConstants
.
SERVER_CONSOLE_UID
)
.
setUid
(
GenshinConstants
.
SERVER_CONSOLE_UID
)
.
setNickname
(
"Server"
)
.
setNickname
(
"Server"
)
.
setLevel
(
1
)
.
setLevel
(
1
)
.
setAvatar
(
HeadImage
.
newBuilder
().
setAvatarId
(
GenshinConstants
.
MAIN_CHARACTER_FEMALE
))
.
setAvatar
Id
(
HeadImage
.
newBuilder
().
setAvatarId
(
GenshinConstants
.
MAIN_CHARACTER_FEMALE
)
.
getAvatarId
()
)
.
setWorldLevel
(
0
)
.
setWorldLevel
(
0
)
.
setSignature
(
""
)
.
setSignature
(
""
)
.
setLastActiveTime
((
int
)
(
System
.
currentTimeMillis
()
/
1000
f
))
.
setLastActiveTime
((
int
)
(
System
.
currentTimeMillis
()
/
1000
f
))
.
setNameCardId
(
210001
)
.
setNameCardId
(
210001
)
.
setOnlineState
(
FriendOnlineState
.
FRIEND_ONLINE
)
.
setOnlineState
(
FriendOnlineState
.
FRIEND_ONLINE
)
.
setParam
(
1
)
.
setParam
(
1
)
.
set
Unk1
(
1
)
.
set
IsGameSource
(
true
)
.
set
Unk2
(
3
)
.
set
PlatformType
(
PlatformTypeOuterClass
.
PlatformType
.
PC
)
.
build
();
.
build
();
GetPlayerFriendListRsp
.
Builder
proto
=
GetPlayerFriendListRsp
.
newBuilder
().
addFriendList
(
serverFriend
);
GetPlayerFriendListRsp
.
Builder
proto
=
GetPlayerFriendListRsp
.
newBuilder
().
addFriendList
(
serverFriend
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerSocialDetailRsp.java
View file @
b9f7c657
...
@@ -3,6 +3,7 @@ package emu.grasscutter.server.packet.send;
...
@@ -3,6 +3,7 @@ package emu.grasscutter.server.packet.send;
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.GetPlayerSocialDetailRspOuterClass.GetPlayerSocialDetailRsp
;
import
emu.grasscutter.net.proto.GetPlayerSocialDetailRspOuterClass.GetPlayerSocialDetailRsp
;
import
emu.grasscutter.net.proto.RetcodeOuterClass
;
import
emu.grasscutter.net.proto.SocialDetailOuterClass.SocialDetail
;
import
emu.grasscutter.net.proto.SocialDetailOuterClass.SocialDetail
;
public
class
PacketGetPlayerSocialDetailRsp
extends
GenshinPacket
{
public
class
PacketGetPlayerSocialDetailRsp
extends
GenshinPacket
{
...
@@ -15,7 +16,7 @@ public class PacketGetPlayerSocialDetailRsp extends GenshinPacket {
...
@@ -15,7 +16,7 @@ public class PacketGetPlayerSocialDetailRsp extends GenshinPacket {
if
(
detail
!=
null
)
{
if
(
detail
!=
null
)
{
proto
.
setDetailData
(
detail
);
proto
.
setDetailData
(
detail
);
}
else
{
}
else
{
proto
.
setRetcode
(
1
);
proto
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
);
}
}
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerTokenRsp.java
View file @
b9f7c657
...
@@ -16,18 +16,18 @@ public class PacketGetPlayerTokenRsp extends GenshinPacket {
...
@@ -16,18 +16,18 @@ public class PacketGetPlayerTokenRsp extends GenshinPacket {
this
.
setUseDispatchKey
(
true
);
this
.
setUseDispatchKey
(
true
);
GetPlayerTokenRsp
p
=
GetPlayerTokenRsp
.
newBuilder
()
GetPlayerTokenRsp
p
=
GetPlayerTokenRsp
.
newBuilder
()
.
set
Player
Uid
(
session
.
getAccount
().
getPlayerUid
())
.
setUid
(
session
.
getAccount
().
getPlayerUid
())
.
set
Account
Token
(
session
.
getAccount
().
getToken
())
.
setToken
(
session
.
getAccount
().
getToken
())
.
setAccountType
(
1
)
.
setAccountType
(
1
)
.
setIsProficientPlayer
(
doesPlayerExist
)
// Not sure where this goes
.
setIsProficientPlayer
(
doesPlayerExist
)
// Not sure where this goes
.
setSecretKey
(
Crypto
.
ENCRYPT_SEED
)
.
setSecretKey
Seed
(
Crypto
.
ENCRYPT_SEED
)
.
setSec
retKey
Buffer
(
ByteString
.
copyFrom
(
Crypto
.
ENCRYPT_SEED_BUFFER
))
.
setSec
urityCmd
Buffer
(
ByteString
.
copyFrom
(
Crypto
.
ENCRYPT_SEED_BUFFER
))
.
setPlatformType
(
3
)
.
setPlatformType
(
3
)
.
setChannelId
(
1
)
.
setChannelId
(
1
)
.
setCountryCode
(
"US"
)
.
setCountryCode
(
"US"
)
.
set
Unk1
(
"c25-314dd05b0b5f"
)
.
set
ClientVersionRandomKey
(
"c25-314dd05b0b5f"
)
.
set
Unk3
(
3
)
.
set
RegPlatform
(
3
)
.
setClientIp
(
session
.
getAddress
().
getAddress
().
getHostAddress
())
.
setClientIp
Str
(
session
.
getAddress
().
getAddress
().
getHostAddress
())
.
build
();
.
build
();
this
.
setData
(
p
.
toByteArray
());
this
.
setData
(
p
.
toByteArray
());
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpResultNotify.java
View file @
b9f7c657
...
@@ -8,7 +8,7 @@ import emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass.Player
...
@@ -8,7 +8,7 @@ import emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass.Player
public
class
PacketPlayerApplyEnterMpResultNotify
extends
GenshinPacket
{
public
class
PacketPlayerApplyEnterMpResultNotify
extends
GenshinPacket
{
public
PacketPlayerApplyEnterMpResultNotify
(
GenshinPlayer
target
,
boolean
isAgreed
,
PlayerApplyEnterMpReason
reason
)
{
public
PacketPlayerApplyEnterMpResultNotify
(
GenshinPlayer
target
,
boolean
isAgreed
,
PlayerApplyEnterMp
ResultNotify
.
Reason
reason
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
...
@@ -21,7 +21,7 @@ public class PacketPlayerApplyEnterMpResultNotify extends GenshinPacket {
...
@@ -21,7 +21,7 @@ public class PacketPlayerApplyEnterMpResultNotify extends GenshinPacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketPlayerApplyEnterMpResultNotify
(
int
targetId
,
String
targetName
,
boolean
isAgreed
,
PlayerApplyEnterMpReason
reason
)
{
public
PacketPlayerApplyEnterMpResultNotify
(
int
targetId
,
String
targetName
,
boolean
isAgreed
,
PlayerApplyEnterMp
ResultNotify
.
Reason
reason
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerChatNotify.java
View file @
b9f7c657
...
@@ -43,7 +43,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
...
@@ -43,7 +43,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketPlayerChatNotify
(
GenshinPlayer
sender
,
int
channelId
,
SystemHint
systemHint
)
{
public
PacketPlayerChatNotify
(
GenshinPlayer
sender
,
int
channelId
,
ChatInfo
.
SystemHint
systemHint
)
{
super
(
PacketOpcodes
.
PlayerChatNotify
);
super
(
PacketOpcodes
.
PlayerChatNotify
);
ChatInfo
info
=
ChatInfo
.
newBuilder
()
ChatInfo
info
=
ChatInfo
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerDataNotify.java
View file @
b9f7c657
...
@@ -13,7 +13,7 @@ public class PacketPlayerDataNotify extends GenshinPacket {
...
@@ -13,7 +13,7 @@ public class PacketPlayerDataNotify extends GenshinPacket {
PlayerDataNotify
.
Builder
p
=
PlayerDataNotify
.
newBuilder
()
PlayerDataNotify
.
Builder
p
=
PlayerDataNotify
.
newBuilder
()
.
setNickName
(
player
.
getNickname
())
.
setNickName
(
player
.
getNickname
())
.
set
Client
Time
(
System
.
currentTimeMillis
())
.
set
Server
Time
(
System
.
currentTimeMillis
())
.
setIsFirstLoginToday
(
true
)
.
setIsFirstLoginToday
(
true
)
.
setRegionId
(
player
.
getRegionId
());
.
setRegionId
(
player
.
getRegionId
());
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerEnterSceneInfoNotify.java
View file @
b9f7c657
...
@@ -5,6 +5,7 @@ import emu.grasscutter.game.entity.EntityAvatar;
...
@@ -5,6 +5,7 @@ import emu.grasscutter.game.entity.EntityAvatar;
import
emu.grasscutter.game.inventory.GenshinItem
;
import
emu.grasscutter.game.inventory.GenshinItem
;
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.AbilityControlBlockOuterClass
;
import
emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo
;
import
emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo
;
import
emu.grasscutter.net.proto.AvatarEnterSceneInfoOuterClass.AvatarEnterSceneInfo
;
import
emu.grasscutter.net.proto.AvatarEnterSceneInfoOuterClass.AvatarEnterSceneInfo
;
import
emu.grasscutter.net.proto.MPLevelEntityInfoOuterClass.MPLevelEntityInfo
;
import
emu.grasscutter.net.proto.MPLevelEntityInfoOuterClass.MPLevelEntityInfo
;
...
@@ -26,7 +27,7 @@ public class PacketPlayerEnterSceneInfoNotify extends GenshinPacket {
...
@@ -26,7 +27,7 @@ public class PacketPlayerEnterSceneInfoNotify extends GenshinPacket {
TeamEnterSceneInfo
.
newBuilder
()
TeamEnterSceneInfo
.
newBuilder
()
.
setTeamEntityId
(
player
.
getTeamManager
().
getEntityId
())
// 150995833
.
setTeamEntityId
(
player
.
getTeamManager
().
getEntityId
())
// 150995833
.
setTeamAbilityInfo
(
empty
)
.
setTeamAbilityInfo
(
empty
)
.
set
Unk
(
empty
)
.
set
AbilityControlBlock
(
AbilityControlBlockOuterClass
.
AbilityControlBlock
.
newBuilder
().
build
()
)
);
);
proto
.
setMpLevelEntityInfo
(
proto
.
setMpLevelEntityInfo
(
MPLevelEntityInfo
.
newBuilder
()
MPLevelEntityInfo
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerEnterSceneNotify.java
View file @
b9f7c657
...
@@ -23,14 +23,14 @@ public class PacketPlayerEnterSceneNotify extends GenshinPacket {
...
@@ -23,14 +23,14 @@ public class PacketPlayerEnterSceneNotify extends GenshinPacket {
.
setSceneId
(
player
.
getSceneId
())
.
setSceneId
(
player
.
getSceneId
())
.
setPos
(
player
.
getPos
().
toProto
())
.
setPos
(
player
.
getPos
().
toProto
())
.
setSceneBeginTime
(
System
.
currentTimeMillis
())
.
setSceneBeginTime
(
System
.
currentTimeMillis
())
.
setType
(
EnterType
.
E
nterSelf
)
.
setType
(
EnterType
.
E
NTER_SELF
)
.
setTargetUid
(
player
.
getUid
())
.
setTargetUid
(
player
.
getUid
())
.
setEnterSceneToken
(
player
.
getEnterSceneToken
())
.
setEnterSceneToken
(
player
.
getEnterSceneToken
())
.
setWorldLevel
(
player
.
getWorldLevel
())
.
setWorldLevel
(
player
.
getWorldLevel
())
.
setEnterReason
(
EnterReason
.
Login
.
getValue
())
.
setEnterReason
(
EnterReason
.
Login
.
getValue
())
.
setIsFirstLoginEnterScene
(
player
.
isFirstLoginEnterScene
())
.
setIsFirstLoginEnterScene
(
player
.
isFirstLoginEnterScene
())
.
set
Unk1
(
1
)
.
set
WorldType
(
1
)
.
set
Unk2
(
"3-"
+
player
.
getUid
()
+
"-"
+
(
int
)
(
System
.
currentTimeMillis
()
/
1000
)
+
"-"
+
18402
)
.
set
SceneTransaction
(
"3-"
+
player
.
getUid
()
+
"-"
+
(
int
)
(
System
.
currentTimeMillis
()
/
1000
)
+
"-"
+
18402
)
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
@@ -62,8 +62,8 @@ public class PacketPlayerEnterSceneNotify extends GenshinPacket {
...
@@ -62,8 +62,8 @@ public class PacketPlayerEnterSceneNotify extends GenshinPacket {
.
addSceneTagIdList
(
109
)
.
addSceneTagIdList
(
109
)
.
addSceneTagIdList
(
113
)
.
addSceneTagIdList
(
113
)
.
addSceneTagIdList
(
117
)
.
addSceneTagIdList
(
117
)
.
set
Unk1
(
1
)
.
set
WorldType
(
1
)
.
set
Unk2
(
newScene
+
"-"
+
target
.
getUid
()
+
"-"
+
(
int
)
(
System
.
currentTimeMillis
()
/
1000
)
+
"-"
+
18402
)
.
set
SceneTransaction
(
newScene
+
"-"
+
target
.
getUid
()
+
"-"
+
(
int
)
(
System
.
currentTimeMillis
()
/
1000
)
+
"-"
+
18402
)
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerLoginRsp.java
View file @
b9f7c657
...
@@ -40,8 +40,8 @@ public class PacketPlayerLoginRsp extends GenshinPacket {
...
@@ -40,8 +40,8 @@ public class PacketPlayerLoginRsp extends GenshinPacket {
QueryCurrRegionHttpRspOuterClass
.
QueryCurrRegionHttpRsp
regionQuery
=
QueryCurrRegionHttpRspOuterClass
.
QueryCurrRegionHttpRsp
.
parseFrom
(
decodedCurRegion
);
QueryCurrRegionHttpRspOuterClass
.
QueryCurrRegionHttpRsp
regionQuery
=
QueryCurrRegionHttpRspOuterClass
.
QueryCurrRegionHttpRsp
.
parseFrom
(
decodedCurRegion
);
RegionInfo
serverRegion
=
regionQuery
.
getRegionInfo
().
toBuilder
()
RegionInfo
serverRegion
=
regionQuery
.
getRegionInfo
().
toBuilder
()
.
setIp
((
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicIp
.
isEmpty
()
?
Grasscutter
.
getConfig
().
getGameServerOptions
().
Ip
:
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicIp
))
.
set
Gateserver
Ip
((
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicIp
.
isEmpty
()
?
Grasscutter
.
getConfig
().
getGameServerOptions
().
Ip
:
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicIp
))
.
setPort
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicPort
!=
0
?
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicPort
:
Grasscutter
.
getConfig
().
getGameServerOptions
().
Port
)
.
set
Gateserver
Port
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicPort
!=
0
?
Grasscutter
.
getConfig
().
getGameServerOptions
().
PublicPort
:
Grasscutter
.
getConfig
().
getGameServerOptions
().
Port
)
.
setSecretKey
(
ByteString
.
copyFrom
(
FileUtils
.
read
(
Grasscutter
.
getConfig
().
KEY_FOLDER
+
"dispatchSeed.bin"
)))
.
setSecretKey
(
ByteString
.
copyFrom
(
FileUtils
.
read
(
Grasscutter
.
getConfig
().
KEY_FOLDER
+
"dispatchSeed.bin"
)))
.
build
();
.
build
();
...
@@ -64,7 +64,7 @@ public class PacketPlayerLoginRsp extends GenshinPacket {
...
@@ -64,7 +64,7 @@ public class PacketPlayerLoginRsp extends GenshinPacket {
.
setClientSilenceDataVersion
(
info
.
getClientSilenceDataVersion
())
.
setClientSilenceDataVersion
(
info
.
getClientSilenceDataVersion
())
.
setClientMd5
(
info
.
getClientDataMd5
())
.
setClientMd5
(
info
.
getClientDataMd5
())
.
setClientSilenceMd5
(
info
.
getClientSilenceDataMd5
())
.
setClientSilenceMd5
(
info
.
getClientSilenceDataMd5
())
.
setResVersionConfig
(
info
.
getConfig
())
.
setResVersionConfig
(
info
.
get
ResVersion
Config
())
.
setClientVersionSuffix
(
info
.
getClientVersionSuffix
())
.
setClientVersionSuffix
(
info
.
getClientVersionSuffix
())
.
setClientSilenceVersionSuffix
(
info
.
getClientSilenceVersionSuffix
())
.
setClientSilenceVersionSuffix
(
info
.
getClientSilenceVersionSuffix
())
.
setIsScOpen
(
false
)
.
setIsScOpen
(
false
)
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerStoreNotify.java
View file @
b9f7c657
...
@@ -18,7 +18,7 @@ public class PacketPlayerStoreNotify extends GenshinPacket {
...
@@ -18,7 +18,7 @@ public class PacketPlayerStoreNotify extends GenshinPacket {
this
.
buildHeader
(
2
);
this
.
buildHeader
(
2
);
PlayerStoreNotify
.
Builder
p
=
PlayerStoreNotify
.
newBuilder
()
PlayerStoreNotify
.
Builder
p
=
PlayerStoreNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
setWeightLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitAll
);
.
setWeightLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitAll
);
for
(
GenshinItem
item
:
player
.
getInventory
())
{
for
(
GenshinItem
item
:
player
.
getInventory
())
{
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneEntityAppearNotify.java
View file @
b9f7c657
...
@@ -15,7 +15,7 @@ public class PacketSceneEntityAppearNotify extends GenshinPacket {
...
@@ -15,7 +15,7 @@ public class PacketSceneEntityAppearNotify extends GenshinPacket {
super
(
PacketOpcodes
.
SceneEntityAppearNotify
,
true
);
super
(
PacketOpcodes
.
SceneEntityAppearNotify
,
true
);
SceneEntityAppearNotify
.
Builder
proto
=
SceneEntityAppearNotify
.
newBuilder
()
SceneEntityAppearNotify
.
Builder
proto
=
SceneEntityAppearNotify
.
newBuilder
()
.
setAppearType
(
VisionType
.
V
isionBorn
)
.
setAppearType
(
VisionType
.
V
ISION_BORN
)
.
addEntityList
(
entity
.
toProto
());
.
addEntityList
(
entity
.
toProto
());
this
.
setData
(
proto
.
build
());
this
.
setData
(
proto
.
build
());
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneEntityDrownRsp.java
0 → 100644
View file @
b9f7c657
src/main/java/emu/grasscutter/server/packet/send/PacketSceneKickPlayerRsp.java
View file @
b9f7c657
...
@@ -2,6 +2,7 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,6 +2,7 @@ package emu.grasscutter.server.packet.send;
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.RetcodeOuterClass
;
import
emu.grasscutter.net.proto.SceneKickPlayerRspOuterClass.SceneKickPlayerRsp
;
import
emu.grasscutter.net.proto.SceneKickPlayerRspOuterClass.SceneKickPlayerRsp
;
public
class
PacketSceneKickPlayerRsp
extends
GenshinPacket
{
public
class
PacketSceneKickPlayerRsp
extends
GenshinPacket
{
...
@@ -20,7 +21,7 @@ public class PacketSceneKickPlayerRsp extends GenshinPacket {
...
@@ -20,7 +21,7 @@ public class PacketSceneKickPlayerRsp extends GenshinPacket {
super
(
PacketOpcodes
.
SceneKickPlayerRsp
);
super
(
PacketOpcodes
.
SceneKickPlayerRsp
);
SceneKickPlayerRsp
proto
=
SceneKickPlayerRsp
.
newBuilder
()
SceneKickPlayerRsp
proto
=
SceneKickPlayerRsp
.
newBuilder
()
.
setRetcode
(
1
)
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneTeamUpdateNotify.java
View file @
b9f7c657
...
@@ -19,7 +19,7 @@ public class PacketSceneTeamUpdateNotify extends GenshinPacket {
...
@@ -19,7 +19,7 @@ public class PacketSceneTeamUpdateNotify extends GenshinPacket {
for
(
GenshinPlayer
p
:
player
.
getWorld
().
getPlayers
())
{
for
(
GenshinPlayer
p
:
player
.
getWorld
().
getPlayers
())
{
for
(
EntityAvatar
entityAvatar
:
p
.
getTeamManager
().
getActiveTeam
())
{
for
(
EntityAvatar
entityAvatar
:
p
.
getTeamManager
().
getActiveTeam
())
{
SceneTeamAvatar
.
Builder
avatarProto
=
SceneTeamAvatar
.
newBuilder
()
SceneTeamAvatar
.
Builder
avatarProto
=
SceneTeamAvatar
.
newBuilder
()
.
setPlayer
I
d
(
p
.
getUid
())
.
setPlayer
Ui
d
(
p
.
getUid
())
.
setAvatarGuid
(
entityAvatar
.
getAvatar
().
getGuid
())
.
setAvatarGuid
(
entityAvatar
.
getAvatar
().
getGuid
())
.
setSceneId
(
p
.
getSceneId
())
.
setSceneId
(
p
.
getSceneId
())
.
setEntityId
(
entityAvatar
.
getId
())
.
setEntityId
(
entityAvatar
.
getId
())
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java
View file @
b9f7c657
...
@@ -5,6 +5,7 @@ import emu.grasscutter.data.custom.ScenePointEntry;
...
@@ -5,6 +5,7 @@ import emu.grasscutter.data.custom.ScenePointEntry;
import
emu.grasscutter.game.GenshinPlayer
;
import
emu.grasscutter.game.GenshinPlayer
;
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.RetcodeOuterClass
;
import
emu.grasscutter.net.proto.SceneTransToPointRspOuterClass.SceneTransToPointRsp
;
import
emu.grasscutter.net.proto.SceneTransToPointRspOuterClass.SceneTransToPointRsp
;
import
emu.grasscutter.utils.Position
;
import
emu.grasscutter.utils.Position
;
...
@@ -26,7 +27,7 @@ public class PacketSceneTransToPointRsp extends GenshinPacket {
...
@@ -26,7 +27,7 @@ public class PacketSceneTransToPointRsp extends GenshinPacket {
super
(
PacketOpcodes
.
SceneTransToPointRsp
);
super
(
PacketOpcodes
.
SceneTransToPointRsp
);
SceneTransToPointRsp
proto
=
SceneTransToPointRsp
.
newBuilder
()
SceneTransToPointRsp
proto
=
SceneTransToPointRsp
.
newBuilder
()
.
setRetcode
(
1
)
// Internal server error
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
// Internal server error
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerBirthdayRsp.java
View file @
b9f7c657
...
@@ -4,6 +4,7 @@ import emu.grasscutter.game.GenshinPlayer;
...
@@ -4,6 +4,7 @@ import emu.grasscutter.game.GenshinPlayer;
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.SetPlayerBirthdayRspOuterClass.SetPlayerBirthdayRsp
;
import
emu.grasscutter.net.proto.SetPlayerBirthdayRspOuterClass.SetPlayerBirthdayRsp
;
import
emu.grasscutter.net.proto.SetPlayerBornDataReqOuterClass
;
public
class
PacketSetPlayerBirthdayRsp
extends
GenshinPacket
{
public
class
PacketSetPlayerBirthdayRsp
extends
GenshinPacket
{
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerHeadImageRsp.java
View file @
b9f7c657
...
@@ -12,7 +12,7 @@ public class PacketSetPlayerHeadImageRsp extends GenshinPacket {
...
@@ -12,7 +12,7 @@ public class PacketSetPlayerHeadImageRsp extends GenshinPacket {
super
(
PacketOpcodes
.
SetPlayerHeadImageRsp
);
super
(
PacketOpcodes
.
SetPlayerHeadImageRsp
);
SetPlayerHeadImageRsp
proto
=
SetPlayerHeadImageRsp
.
newBuilder
()
SetPlayerHeadImageRsp
proto
=
SetPlayerHeadImageRsp
.
newBuilder
()
.
setAvatar
(
HeadImage
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
()))
.
setAvatar
Id
(
HeadImage
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
())
.
getAvatarId
()
)
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSitRsp.java
deleted
100644 → 0
View file @
eb495807
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SitRspOuterClass.SitRsp
;
import
emu.grasscutter.utils.Position
;
public
class
PacketSitRsp
extends
GenshinPacket
{
public
PacketSitRsp
(
long
chairId
,
Position
pos
,
int
EntityId
)
{
super
(
PacketOpcodes
.
SitRsp
);
SitRsp
proto
=
SitRsp
.
newBuilder
()
.
setEntityId
(
EntityId
)
.
setPosition
(
pos
.
toProto
())
.
setChairId
(
chairId
)
.
build
();
this
.
setData
(
proto
);
}
}
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