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
fa9d703d
Commit
fa9d703d
authored
Apr 27, 2022
by
BaiSugar
Committed by
GitHub
Apr 27, 2022
Browse files
Merge branch 'Grasscutters:development' into development
parents
6a5d97a3
d1fc8c1f
Changes
279
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketGetWorldMpInfoRsp.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
world.
World
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.GetWorldMpInfoRspOuterClass.GetWorldMpInfoRsp
;
public
class
PacketGetWorldMpInfoRsp
extends
Genshin
Packet
{
public
class
PacketGetWorldMpInfoRsp
extends
Base
Packet
{
public
PacketGetWorldMpInfoRsp
(
World
world
)
{
super
(
PacketOpcodes
.
GetWorldMpInfoRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketH5ActivityIdsNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.H5ActivityIdsNotifyOuterClass.H5ActivityIdsNotify
;
public
class
PacketH5ActivityIdsNotify
extends
Genshin
Packet
{
public
class
PacketH5ActivityIdsNotify
extends
Base
Packet
{
public
PacketH5ActivityIdsNotify
()
{
super
(
PacketOpcodes
.
H5ActivityIdsNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketHostPlayerNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
world.
World
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.HostPlayerNotifyOuterClass.HostPlayerNotify
;
public
class
PacketHostPlayerNotify
extends
Genshin
Packet
{
public
class
PacketHostPlayerNotify
extends
Base
Packet
{
public
PacketHostPlayerNotify
(
World
world
)
{
super
(
PacketOpcodes
.
HostPlayerNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketItemAddHintNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
java.util.Collection
;
import
java.util.List
;
import
emu.grasscutter.game.inventory.G
enshin
Item
;
import
emu.grasscutter.game.inventory.G
ame
Item
;
import
emu.grasscutter.game.props.ActionReason
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ItemAddHintNotifyOuterClass.ItemAddHintNotify
;
public
class
PacketItemAddHintNotify
extends
Genshin
Packet
{
public
class
PacketItemAddHintNotify
extends
Base
Packet
{
public
PacketItemAddHintNotify
(
G
enshin
Item
item
,
ActionReason
reason
)
{
public
PacketItemAddHintNotify
(
G
ame
Item
item
,
ActionReason
reason
)
{
super
(
PacketOpcodes
.
ItemAddHintNotify
);
ItemAddHintNotify
proto
=
ItemAddHintNotify
.
newBuilder
()
...
...
@@ -21,13 +22,13 @@ public class PacketItemAddHintNotify extends GenshinPacket {
this
.
setData
(
proto
);
}
public
PacketItemAddHintNotify
(
List
<
Genshin
Item
>
items
,
ActionReason
reason
)
{
public
PacketItemAddHintNotify
(
Collection
<
Game
Item
>
items
,
ActionReason
reason
)
{
super
(
PacketOpcodes
.
ItemAddHintNotify
);
ItemAddHintNotify
.
Builder
proto
=
ItemAddHintNotify
.
newBuilder
()
.
setReason
(
reason
.
getValue
());
for
(
G
enshin
Item
item
:
items
)
{
for
(
G
ame
Item
item
:
items
)
{
proto
.
addItemList
(
item
.
toItemHintProto
());
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketLifeStateChangeNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.entity.G
enshin
Entity
;
import
emu.grasscutter.game.entity.G
ame
Entity
;
import
emu.grasscutter.game.props.LifeState
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.LifeStateChangeNotifyOuterClass.LifeStateChangeNotify
;
public
class
PacketLifeStateChangeNotify
extends
Genshin
Packet
{
public
PacketLifeStateChangeNotify
(
G
enshin
Entity
attacker
,
G
enshin
Entity
target
,
LifeState
lifeState
)
{
public
class
PacketLifeStateChangeNotify
extends
Base
Packet
{
public
PacketLifeStateChangeNotify
(
G
ame
Entity
attacker
,
G
ame
Entity
target
,
LifeState
lifeState
)
{
super
(
PacketOpcodes
.
LifeStateChangeNotify
);
LifeStateChangeNotify
proto
=
LifeStateChangeNotify
.
newBuilder
()
...
...
@@ -18,7 +18,7 @@ public class PacketLifeStateChangeNotify extends GenshinPacket {
this
.
setData
(
proto
);
}
public
PacketLifeStateChangeNotify
(
int
attackerId
,
G
enshin
Entity
target
,
LifeState
lifeState
)
{
public
PacketLifeStateChangeNotify
(
int
attackerId
,
G
ame
Entity
target
,
LifeState
lifeState
)
{
super
(
PacketOpcodes
.
LifeStateChangeNotify
);
LifeStateChangeNotify
proto
=
LifeStateChangeNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketMailChangeNotify.java
0 → 100644
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.game.mail.Mail
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.*
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PacketMailChangeNotify
extends
BasePacket
{
public
PacketMailChangeNotify
(
Player
player
,
Mail
message
)
{
this
(
player
,
new
ArrayList
<
Mail
>(){{
add
(
message
);}});
}
public
PacketMailChangeNotify
(
Player
player
,
List
<
Mail
>
mailList
)
{
this
(
player
,
mailList
,
null
);
}
public
PacketMailChangeNotify
(
Player
player
,
List
<
Mail
>
mailList
,
List
<
Integer
>
delMailIdList
)
{
super
(
PacketOpcodes
.
MailChangeNotify
);
MailChangeNotifyOuterClass
.
MailChangeNotify
.
Builder
proto
=
MailChangeNotifyOuterClass
.
MailChangeNotify
.
newBuilder
();
if
(
mailList
!=
null
)
{
for
(
Mail
message
:
mailList
)
{
MailTextContentOuterClass
.
MailTextContent
.
Builder
mailTextContent
=
MailTextContentOuterClass
.
MailTextContent
.
newBuilder
();
mailTextContent
.
setTitle
(
message
.
mailContent
.
title
);
mailTextContent
.
setContent
(
message
.
mailContent
.
content
);
mailTextContent
.
setSender
(
message
.
mailContent
.
sender
);
List
<
MailItemOuterClass
.
MailItem
>
mailItems
=
new
ArrayList
<
MailItemOuterClass
.
MailItem
>();
for
(
Mail
.
MailItem
item
:
message
.
itemList
)
{
MailItemOuterClass
.
MailItem
.
Builder
mailItem
=
MailItemOuterClass
.
MailItem
.
newBuilder
();
ItemParamOuterClass
.
ItemParam
.
Builder
itemParam
=
ItemParamOuterClass
.
ItemParam
.
newBuilder
();
itemParam
.
setItemId
(
item
.
itemId
);
itemParam
.
setCount
(
item
.
itemCount
);
mailItem
.
setItemParam
(
itemParam
.
build
());
mailItems
.
add
(
mailItem
.
build
());
}
MailDataOuterClass
.
MailData
.
Builder
mailData
=
MailDataOuterClass
.
MailData
.
newBuilder
();
mailData
.
setMailId
(
player
.
getMailId
(
message
));
mailData
.
setMailTextContent
(
mailTextContent
.
build
());
mailData
.
addAllItemList
(
mailItems
);
mailData
.
setSendTime
((
int
)
message
.
sendTime
);
mailData
.
setExpireTime
((
int
)
message
.
expireTime
);
mailData
.
setImportance
(
message
.
importance
);
mailData
.
setIsRead
(
message
.
isRead
);
mailData
.
setIsAttachmentGot
(
message
.
isAttachmentGot
);
mailData
.
setStateValue
(
message
.
stateValue
);
proto
.
addMailList
(
mailData
.
build
());
}
}
if
(
delMailIdList
!=
null
)
{
proto
.
addAllDelMailIdList
(
delMailIdList
);
}
this
.
setData
(
proto
.
build
());
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/server/packet/send/PacketNpcTalkRsp.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.NpcTalkRspOuterClass.NpcTalkRsp
;
public
class
PacketNpcTalkRsp
extends
Genshin
Packet
{
public
class
PacketNpcTalkRsp
extends
Base
Packet
{
public
PacketNpcTalkRsp
(
int
npcEntityId
,
int
curTalkId
,
int
entityId
)
{
super
(
PacketOpcodes
.
NpcTalkRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketOpenStateUpdateNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.props.OpenState
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.OpenStateUpdateNotifyOuterClass.OpenStateUpdateNotify
;
public
class
PacketOpenStateUpdateNotify
extends
Genshin
Packet
{
public
class
PacketOpenStateUpdateNotify
extends
Base
Packet
{
public
PacketOpenStateUpdateNotify
()
{
super
(
PacketOpcodes
.
OpenStateUpdateNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPathfindingEnterSceneRsp.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
public
class
PacketPathfindingEnterSceneRsp
extends
Genshin
Packet
{
public
class
PacketPathfindingEnterSceneRsp
extends
Base
Packet
{
public
PacketPathfindingEnterSceneRsp
(
int
clientSequence
)
{
super
(
PacketOpcodes
.
PathfindingEnterSceneRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPingRsp.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PingRspOuterClass.PingRsp
;
public
class
PacketPingRsp
extends
Genshin
Packet
{
public
class
PacketPingRsp
extends
Base
Packet
{
public
PacketPingRsp
(
int
clientSeq
,
int
time
)
{
super
(
PacketOpcodes
.
PingRsp
,
clientSeq
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpNotifyOuterClass.PlayerApplyEnterMpNotify
;
public
class
PacketPlayerApplyEnterMpNotify
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpNotify
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpNotify
(
Genshin
Player
srcPlayer
)
{
public
PacketPlayerApplyEnterMpNotify
(
Player
srcPlayer
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpNotify
);
PlayerApplyEnterMpNotify
proto
=
PlayerApplyEnterMpNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpResultNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpReasonOuterClass.PlayerApplyEnterMpReason
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify
;
public
class
PacketPlayerApplyEnterMpResultNotify
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpResultNotify
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpResultNotify
(
Genshin
Player
target
,
boolean
isAgreed
,
PlayerApplyEnterMpResultNotify
.
Reason
reason
)
{
public
PacketPlayerApplyEnterMpResultNotify
(
Player
target
,
boolean
isAgreed
,
PlayerApplyEnterMpResultNotifyOuterClass
.
PlayerApplyEnterMpResultNotify
.
Reason
reason
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultNotify
);
PlayerApplyEnterMpResultNotify
proto
=
PlayerApplyEnterMpResultNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpResultRsp.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpResultRspOuterClass.PlayerApplyEnterMpResultRsp
;
public
class
PacketPlayerApplyEnterMpResultRsp
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpResultRsp
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpResultRsp
(
int
applyUid
,
boolean
isAgreed
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpResultRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerApplyEnterMpRsp.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerApplyEnterMpRspOuterClass.PlayerApplyEnterMpRsp
;
public
class
PacketPlayerApplyEnterMpRsp
extends
Genshin
Packet
{
public
class
PacketPlayerApplyEnterMpRsp
extends
Base
Packet
{
public
PacketPlayerApplyEnterMpRsp
(
int
targetUid
)
{
super
(
PacketOpcodes
.
PlayerApplyEnterMpRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerChatNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ChatInfoOuterClass.ChatInfo
;
import
emu.grasscutter.net.proto.PlayerChatNotifyOuterClass.PlayerChatNotify
;
import
emu.grasscutter.net.proto.SystemHintOuterClass.SystemHint
;
public
class
PacketPlayerChatNotify
extends
Genshin
Packet
{
public
class
PacketPlayerChatNotify
extends
Base
Packet
{
public
PacketPlayerChatNotify
(
Genshin
Player
sender
,
int
channelId
,
String
message
)
{
public
PacketPlayerChatNotify
(
Player
sender
,
int
channelId
,
String
message
)
{
super
(
PacketOpcodes
.
PlayerChatNotify
);
ChatInfo
info
=
ChatInfo
.
newBuilder
()
...
...
@@ -26,7 +26,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
this
.
setData
(
proto
);
}
public
PacketPlayerChatNotify
(
Genshin
Player
sender
,
int
channelId
,
int
emote
)
{
public
PacketPlayerChatNotify
(
Player
sender
,
int
channelId
,
int
emote
)
{
super
(
PacketOpcodes
.
PlayerChatNotify
);
ChatInfo
info
=
ChatInfo
.
newBuilder
()
...
...
@@ -43,7 +43,7 @@ public class PacketPlayerChatNotify extends GenshinPacket {
this
.
setData
(
proto
);
}
public
PacketPlayerChatNotify
(
Genshin
Player
sender
,
int
channelId
,
ChatInfo
.
SystemHint
systemHint
)
{
public
PacketPlayerChatNotify
(
Player
sender
,
int
channelId
,
ChatInfo
.
SystemHint
systemHint
)
{
super
(
PacketOpcodes
.
PlayerChatNotify
);
ChatInfo
info
=
ChatInfo
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerChatRsp.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerChatRspOuterClass.PlayerChatRsp
;
public
class
PacketPlayerChatRsp
extends
Genshin
Packet
{
public
class
PacketPlayerChatRsp
extends
Base
Packet
{
public
PacketPlayerChatRsp
()
{
super
(
PacketOpcodes
.
PlayerChatRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerDataNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerDataNotifyOuterClass.PlayerDataNotify
;
import
emu.grasscutter.net.proto.PropValueOuterClass.PropValue
;
public
class
PacketPlayerDataNotify
extends
Genshin
Packet
{
public
class
PacketPlayerDataNotify
extends
Base
Packet
{
public
PacketPlayerDataNotify
(
Genshin
Player
player
)
{
public
PacketPlayerDataNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
PlayerDataNotify
,
2
);
PlayerDataNotify
.
Builder
p
=
PlayerDataNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerEnterSceneInfoNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.GenshinPlayer
;
import
emu.grasscutter.game.entity.EntityAvatar
;
import
emu.grasscutter.game.inventory.GenshinItem
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.game.inventory.GameItem
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AbilityControlBlockOuterClass
;
import
emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo
;
...
...
@@ -12,9 +12,9 @@ import emu.grasscutter.net.proto.MPLevelEntityInfoOuterClass.MPLevelEntityInfo;
import
emu.grasscutter.net.proto.PlayerEnterSceneInfoNotifyOuterClass.PlayerEnterSceneInfoNotify
;
import
emu.grasscutter.net.proto.TeamEnterSceneInfoOuterClass.TeamEnterSceneInfo
;
public
class
PacketPlayerEnterSceneInfoNotify
extends
Genshin
Packet
{
public
class
PacketPlayerEnterSceneInfoNotify
extends
Base
Packet
{
public
PacketPlayerEnterSceneInfoNotify
(
Genshin
Player
player
)
{
public
PacketPlayerEnterSceneInfoNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
PlayerEnterSceneInfoNotify
);
AbilitySyncStateInfo
empty
=
AbilitySyncStateInfo
.
newBuilder
().
build
();
...
...
@@ -37,7 +37,7 @@ public class PacketPlayerEnterSceneInfoNotify extends GenshinPacket {
);
for
(
EntityAvatar
avatarEntity
:
player
.
getTeamManager
().
getActiveTeam
())
{
G
enshin
Item
weapon
=
avatarEntity
.
getAvatar
().
getWeapon
();
G
ame
Item
weapon
=
avatarEntity
.
getAvatar
().
getWeapon
();
long
weaponGuid
=
weapon
!=
null
?
weapon
.
getGuid
()
:
0
;
AvatarEnterSceneInfo
avatarInfo
=
AvatarEnterSceneInfo
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerEnterSceneNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
Genshin
Player.SceneLoadState
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.game.
player.
Player.SceneLoadState
;
import
emu.grasscutter.game.props.EnterReason
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.EnterTypeOuterClass.EnterType
;
import
emu.grasscutter.net.proto.PlayerEnterSceneNotifyOuterClass.PlayerEnterSceneNotify
;
import
emu.grasscutter.utils.Position
;
import
emu.grasscutter.utils.Utils
;
public
class
PacketPlayerEnterSceneNotify
extends
Genshin
Packet
{
public
class
PacketPlayerEnterSceneNotify
extends
Base
Packet
{
// Login
public
PacketPlayerEnterSceneNotify
(
Genshin
Player
player
)
{
public
PacketPlayerEnterSceneNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
PlayerEnterSceneNotify
);
player
.
setSceneLoadState
(
SceneLoadState
.
LOADING
);
...
...
@@ -36,12 +36,12 @@ public class PacketPlayerEnterSceneNotify extends GenshinPacket {
this
.
setData
(
proto
);
}
public
PacketPlayerEnterSceneNotify
(
Genshin
Player
player
,
EnterType
type
,
EnterReason
reason
,
int
newScene
,
Position
newPos
)
{
public
PacketPlayerEnterSceneNotify
(
Player
player
,
EnterType
type
,
EnterReason
reason
,
int
newScene
,
Position
newPos
)
{
this
(
player
,
player
,
type
,
reason
,
newScene
,
newPos
);
}
// Teleport or go somewhere
public
PacketPlayerEnterSceneNotify
(
Genshin
Player
player
,
Genshin
Player
target
,
EnterType
type
,
EnterReason
reason
,
int
newScene
,
Position
newPos
)
{
public
PacketPlayerEnterSceneNotify
(
Player
player
,
Player
target
,
EnterType
type
,
EnterReason
reason
,
int
newScene
,
Position
newPos
)
{
super
(
PacketOpcodes
.
PlayerEnterSceneNotify
);
player
.
setEnterSceneToken
(
Utils
.
randomRange
(
1000
,
99999
));
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketPlayerGameTimeNotify.java
View file @
fa9d703d
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.World
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.game.
world.
World
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.PlayerGameTimeNotifyOuterClass.PlayerGameTimeNotify
;
public
class
PacketPlayerGameTimeNotify
extends
Genshin
Packet
{
public
class
PacketPlayerGameTimeNotify
extends
Base
Packet
{
public
PacketPlayerGameTimeNotify
(
Genshin
Player
player
)
{
public
PacketPlayerGameTimeNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
PlayerGameTimeNotify
);
PlayerGameTimeNotify
proto
=
PlayerGameTimeNotify
.
newBuilder
()
...
...
Prev
1
…
7
8
9
10
11
12
13
14
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