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
1500d2e8
Commit
1500d2e8
authored
Apr 21, 2022
by
Benjamin Elsdon
Browse files
Merge branch 'development' of
https://github.com/Melledy/Grasscutter
into development
parents
9ce43602
4c1dc34c
Changes
28
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/recv/HandlerSetPlayerBornDataReq.java
View file @
1500d2e8
...
...
@@ -43,7 +43,7 @@ public class HandlerSetPlayerBornDataReq extends PacketHandler {
try
{
// Save to db
DatabaseHelper
.
createPlayer
(
player
,
session
.
getAccount
().
getPlayer
I
d
());
DatabaseHelper
.
createPlayer
(
player
,
session
.
getAccount
().
getPlayer
Ui
d
());
// Create avatar
if
(
player
.
getAvatars
().
getAvatarCount
()
==
0
)
{
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketAbilityChangeNotify.java
View file @
1500d2e8
...
...
@@ -8,7 +8,7 @@ import emu.grasscutter.net.proto.AbilityChangeNotifyOuterClass.AbilityChangeNoti
public
class
PacketAbilityChangeNotify
extends
GenshinPacket
{
public
PacketAbilityChangeNotify
(
EntityAvatar
entity
)
{
super
(
PacketOpcodes
.
AbilityChangeNotify
);
super
(
PacketOpcodes
.
AbilityChangeNotify
,
true
);
AbilityChangeNotify
proto
=
AbilityChangeNotify
.
newBuilder
()
.
setEntityId
(
entity
.
getId
())
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerFriendListRsp.java
View file @
1500d2e8
...
...
@@ -23,7 +23,6 @@ public class PacketGetPlayerFriendListRsp extends GenshinPacket {
.
setWorldLevel
(
0
)
.
setSignature
(
""
)
.
setLastActiveTime
((
int
)
(
System
.
currentTimeMillis
()
/
1000
f
))
.
setIsMpModeAvailable
(
true
)
.
setNameCardId
(
210001
)
.
setOnlineState
(
FriendOnlineState
.
FRIEND_ONLINE
)
.
setParam
(
1
)
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketGetPlayerTokenRsp.java
View file @
1500d2e8
...
...
@@ -16,7 +16,7 @@ public class PacketGetPlayerTokenRsp extends GenshinPacket {
this
.
setUseDispatchKey
(
true
);
GetPlayerTokenRsp
p
=
GetPlayerTokenRsp
.
newBuilder
()
.
setPlayerUid
(
session
.
getAccount
().
getPlayer
I
d
())
.
setPlayerUid
(
session
.
getAccount
().
getPlayer
Ui
d
())
.
setAccountToken
(
session
.
getAccount
().
getToken
())
.
setAccountType
(
1
)
.
setIsProficientPlayer
(
doesPlayerExist
)
// Not sure where this goes
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketScenePlayerLocationNotify.java
View file @
1500d2e8
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.GenshinPlayer
;
import
emu.grasscutter.game.GenshinScene
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ScenePlayerLocationNotifyOuterClass.ScenePlayerLocationNotify
;
public
class
PacketScenePlayerLocationNotify
extends
GenshinPacket
{
public
PacketScenePlayerLocationNotify
(
Genshin
Player
player
)
{
public
PacketScenePlayerLocationNotify
(
Genshin
Scene
scene
)
{
super
(
PacketOpcodes
.
ScenePlayerLocationNotify
);
ScenePlayerLocationNotify
.
Builder
proto
=
ScenePlayerLocationNotify
.
newBuilder
()
.
setSceneId
(
player
.
getScene
Id
());
.
setSceneId
(
scene
.
get
Id
());
for
(
GenshinPlayer
p
:
player
.
getWorld
()
.
getPlayers
())
{
for
(
GenshinPlayer
p
:
scene
.
getPlayers
())
{
proto
.
addPlayerLocList
(
p
.
getPlayerLocationInfo
());
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java
View file @
1500d2e8
...
...
@@ -13,17 +13,6 @@ public class PacketSceneTransToPointRsp extends GenshinPacket {
public
PacketSceneTransToPointRsp
(
GenshinPlayer
player
,
int
pointId
,
int
sceneId
)
{
super
(
PacketOpcodes
.
SceneTransToPointRsp
);
String
code
=
sceneId
+
"_"
+
pointId
;
ScenePointEntry
scenePointEntry
=
GenshinData
.
getScenePointEntries
().
get
(
code
);
float
x
=
scenePointEntry
.
getPointData
().
getTranPos
().
getX
();
float
y
=
scenePointEntry
.
getPointData
().
getTranPos
().
getY
();
float
z
=
scenePointEntry
.
getPointData
().
getTranPos
().
getZ
();
player
.
getPos
().
set
(
new
Position
(
x
,
y
,
z
));
player
.
getWorld
().
forceTransferPlayerToScene
(
player
,
sceneId
,
player
.
getPos
());
SceneTransToPointRsp
proto
=
SceneTransToPointRsp
.
newBuilder
()
.
setRetcode
(
0
)
.
setPointId
(
pointId
)
...
...
@@ -32,4 +21,14 @@ public class PacketSceneTransToPointRsp extends GenshinPacket {
this
.
setData
(
proto
);
}
public
PacketSceneTransToPointRsp
()
{
super
(
PacketOpcodes
.
SceneTransToPointRsp
);
SceneTransToPointRsp
proto
=
SceneTransToPointRsp
.
newBuilder
()
.
setRetcode
(
1
)
// Internal server error
.
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketSceneUnlockInfoNotify.java
View file @
1500d2e8
...
...
@@ -13,7 +13,7 @@ public class PacketSceneUnlockInfoNotify extends GenshinPacket {
SceneUnlockInfoNotify
proto
=
SceneUnlockInfoNotify
.
newBuilder
()
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
1
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
3
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
4
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
4
)
.
addSceneTagIdList
(
106
).
addSceneTagIdList
(
109
)
)
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
5
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
6
))
.
addUnlockInfos
(
SceneUnlockInfo
.
newBuilder
().
setSceneId
(
7
))
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketWorldPlayerLocationNotify.java
View file @
1500d2e8
...
...
@@ -14,7 +14,7 @@ public class PacketWorldPlayerLocationNotify extends GenshinPacket {
WorldPlayerLocationNotify
.
Builder
proto
=
WorldPlayerLocationNotify
.
newBuilder
();
for
(
GenshinPlayer
p
:
world
.
getPlayers
())
{
proto
.
addPlayerLocList
(
p
.
getPlayerLocationInfo
());
proto
.
addPlayerLocList
(
p
.
get
World
PlayerLocationInfo
());
}
this
.
setData
(
proto
);
...
...
Prev
1
2
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