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
d32f706c
Commit
d32f706c
authored
Apr 27, 2022
by
KingRainbow44
Browse files
Merge branch 'development' into api
# Conflicts: # src/main/java/emu/grasscutter/plugin/api/ServerHook.java
parents
47d8fd3c
f0d728b4
Changes
308
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketSceneEntityDrownRsp.java
0 → 100644
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SceneEntityDrownRspOuterClass.SceneEntityDrownRsp
;
public
class
PacketSceneEntityDrownRsp
extends
BasePacket
{
public
PacketSceneEntityDrownRsp
(
int
entityId
)
{
super
(
PacketOpcodes
.
SceneEntityDrownRsp
);
SceneEntityDrownRsp
proto
=
SceneEntityDrownRsp
.
newBuilder
().
setEntityId
(
entityId
).
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketSceneEntityMoveNotify.java
View file @
d32f706c
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.EntityMoveInfoOuterClass.EntityMoveInfo
;
import
emu.grasscutter.net.proto.SceneEntityMoveNotifyOuterClass.SceneEntityMoveNotify
;
public
class
PacketSceneEntityMoveNotify
extends
Genshin
Packet
{
public
class
PacketSceneEntityMoveNotify
extends
Base
Packet
{
public
PacketSceneEntityMoveNotify
(
EntityMoveInfo
moveInfo
)
{
super
(
PacketOpcodes
.
SceneEntityMoveNotify
,
true
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneInitFinishRsp.java
View file @
d32f706c
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.SceneInitFinishRspOuterClass.SceneInitFinishRsp
;
public
class
PacketSceneInitFinishRsp
extends
Genshin
Packet
{
public
class
PacketSceneInitFinishRsp
extends
Base
Packet
{
public
PacketSceneInitFinishRsp
(
Genshin
Player
player
)
{
public
PacketSceneInitFinishRsp
(
Player
player
)
{
super
(
PacketOpcodes
.
SceneInitFinishRsp
,
11
);
SceneInitFinishRsp
p
=
SceneInitFinishRsp
.
newBuilder
().
setEnterSceneToken
(
player
.
getEnterSceneToken
()).
build
();
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneKickPlayerRsp.java
View file @
d32f706c
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.RetcodeOuterClass
;
import
emu.grasscutter.net.proto.SceneKickPlayerRspOuterClass.SceneKickPlayerRsp
;
public
class
PacketSceneKickPlayerRsp
extends
Genshin
Packet
{
public
class
PacketSceneKickPlayerRsp
extends
Base
Packet
{
public
PacketSceneKickPlayerRsp
(
int
targetUid
)
{
super
(
PacketOpcodes
.
SceneKickPlayerRsp
);
...
...
@@ -20,7 +21,7 @@ public class PacketSceneKickPlayerRsp extends GenshinPacket {
super
(
PacketOpcodes
.
SceneKickPlayerRsp
);
SceneKickPlayerRsp
proto
=
SceneKickPlayerRsp
.
newBuilder
()
.
setRetcode
(
1
)
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
.
build
();
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketScenePlayerInfoNotify.java
View file @
d32f706c
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.ScenePlayerInfoNotifyOuterClass.ScenePlayerInfoNotify
;
import
emu.grasscutter.net.proto.ScenePlayerInfoOuterClass.ScenePlayerInfo
;
public
class
PacketScenePlayerInfoNotify
extends
Genshin
Packet
{
public
class
PacketScenePlayerInfoNotify
extends
Base
Packet
{
public
PacketScenePlayerInfoNotify
(
World
world
)
{
super
(
PacketOpcodes
.
ScenePlayerInfoNotify
);
...
...
@@ -15,7 +15,7 @@ public class PacketScenePlayerInfoNotify extends GenshinPacket {
ScenePlayerInfoNotify
.
Builder
proto
=
ScenePlayerInfoNotify
.
newBuilder
();
for
(
int
i
=
0
;
i
<
world
.
getPlayers
().
size
();
i
++)
{
Genshin
Player
p
=
world
.
getPlayers
().
get
(
i
);
Player
p
=
world
.
getPlayers
().
get
(
i
);
ScenePlayerInfo
pInfo
=
ScenePlayerInfo
.
newBuilder
()
.
setUid
(
p
.
getUid
())
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketScenePlayerLocationNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
Genshin
Scene
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.game.
world.
Scene
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.ScenePlayerLocationNotifyOuterClass.ScenePlayerLocationNotify
;
public
class
PacketScenePlayerLocationNotify
extends
Genshin
Packet
{
public
class
PacketScenePlayerLocationNotify
extends
Base
Packet
{
public
PacketScenePlayerLocationNotify
(
Genshin
Scene
scene
)
{
public
PacketScenePlayerLocationNotify
(
Scene
scene
)
{
super
(
PacketOpcodes
.
ScenePlayerLocationNotify
);
ScenePlayerLocationNotify
.
Builder
proto
=
ScenePlayerLocationNotify
.
newBuilder
()
.
setSceneId
(
scene
.
getId
());
for
(
Genshin
Player
p
:
scene
.
getPlayers
())
{
for
(
Player
p
:
scene
.
getPlayers
())
{
proto
.
addPlayerLocList
(
p
.
getPlayerLocationInfo
());
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneTeamUpdateNotify.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.GenshinPlayer
;
import
emu.grasscutter.game.entity.EntityAvatar
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo
;
import
emu.grasscutter.net.proto.SceneTeamAvatarOuterClass.SceneTeamAvatar
;
import
emu.grasscutter.net.proto.SceneTeamUpdateNotifyOuterClass.SceneTeamUpdateNotify
;
public
class
PacketSceneTeamUpdateNotify
extends
Genshin
Packet
{
public
class
PacketSceneTeamUpdateNotify
extends
Base
Packet
{
public
PacketSceneTeamUpdateNotify
(
Genshin
Player
player
)
{
public
PacketSceneTeamUpdateNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
SceneTeamUpdateNotify
);
SceneTeamUpdateNotify
.
Builder
proto
=
SceneTeamUpdateNotify
.
newBuilder
()
.
setIsInMp
(
player
.
getWorld
().
isMultiplayer
());
for
(
Genshin
Player
p
:
player
.
getWorld
().
getPlayers
())
{
for
(
Player
p
:
player
.
getWorld
().
getPlayers
())
{
for
(
EntityAvatar
entityAvatar
:
p
.
getTeamManager
().
getActiveTeam
())
{
SceneTeamAvatar
.
Builder
avatarProto
=
SceneTeamAvatar
.
newBuilder
()
.
setPlayer
I
d
(
p
.
getUid
())
.
setPlayer
Ui
d
(
p
.
getUid
())
.
setAvatarGuid
(
entityAvatar
.
getAvatar
().
getGuid
())
.
setSceneId
(
p
.
getSceneId
())
.
setEntityId
(
entityAvatar
.
getId
())
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneTimeNotify.java
View file @
d32f706c
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.SceneTimeNotifyOuterClass.SceneTimeNotify
;
public
class
PacketSceneTimeNotify
extends
Genshin
Packet
{
public
class
PacketSceneTimeNotify
extends
Base
Packet
{
public
PacketSceneTimeNotify
(
Genshin
Player
player
)
{
public
PacketSceneTimeNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
SceneTimeNotify
);
SceneTimeNotify
proto
=
SceneTimeNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneTransToPointRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.data.G
enshin
Data
;
import
emu.grasscutter.data.G
ame
Data
;
import
emu.grasscutter.data.custom.ScenePointEntry
;
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.RetcodeOuterClass
;
import
emu.grasscutter.net.proto.SceneTransToPointRspOuterClass.SceneTransToPointRsp
;
import
emu.grasscutter.utils.Position
;
public
class
PacketSceneTransToPointRsp
extends
Genshin
Packet
{
public
class
PacketSceneTransToPointRsp
extends
Base
Packet
{
public
PacketSceneTransToPointRsp
(
Genshin
Player
player
,
int
pointId
,
int
sceneId
)
{
public
PacketSceneTransToPointRsp
(
Player
player
,
int
pointId
,
int
sceneId
)
{
super
(
PacketOpcodes
.
SceneTransToPointRsp
);
SceneTransToPointRsp
proto
=
SceneTransToPointRsp
.
newBuilder
()
...
...
@@ -26,7 +27,7 @@ public class PacketSceneTransToPointRsp extends GenshinPacket {
super
(
PacketOpcodes
.
SceneTransToPointRsp
);
SceneTransToPointRsp
proto
=
SceneTransToPointRsp
.
newBuilder
()
.
setRetcode
(
1
)
// Internal server error
.
setRetcode
(
RetcodeOuterClass
.
Retcode
.
RET_SVR_ERROR_VALUE
)
// Internal server error
.
build
();
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSceneUnlockInfoNotify.java
View file @
d32f706c
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.SceneUnlockInfoNotifyOuterClass.SceneUnlockInfoNotify
;
import
emu.grasscutter.net.proto.SceneUnlockInfoOuterClass.SceneUnlockInfo
;
public
class
PacketSceneUnlockInfoNotify
extends
Genshin
Packet
{
public
class
PacketSceneUnlockInfoNotify
extends
Base
Packet
{
public
PacketSceneUnlockInfoNotify
()
{
super
(
PacketOpcodes
.
SceneUnlockInfoNotify
);
// Rename opcode later
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketServerTimeNotify.java
View file @
d32f706c
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.ServerTimeNotifyOuterClass.ServerTimeNotify
;
public
class
PacketServerTimeNotify
extends
Genshin
Packet
{
public
class
PacketServerTimeNotify
extends
Base
Packet
{
public
PacketServerTimeNotify
()
{
super
(
PacketOpcodes
.
ServerTimeNotify
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetEquipLockStateRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.inventory.G
enshin
Item
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.inventory.G
ame
Item
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetEquipLockStateRspOuterClass.SetEquipLockStateRsp
;
public
class
PacketSetEquipLockStateRsp
extends
Genshin
Packet
{
public
class
PacketSetEquipLockStateRsp
extends
Base
Packet
{
public
PacketSetEquipLockStateRsp
(
G
enshin
Item
equip
)
{
public
PacketSetEquipLockStateRsp
(
G
ame
Item
equip
)
{
super
(
PacketOpcodes
.
SetEquipLockStateRsp
);
this
.
buildHeader
(
0
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetNameCardRsp.java
View file @
d32f706c
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.SetNameCardRspOuterClass.SetNameCardRsp
;
public
class
PacketSetNameCardRsp
extends
Genshin
Packet
{
public
class
PacketSetNameCardRsp
extends
Base
Packet
{
public
PacketSetNameCardRsp
(
int
nameCardId
)
{
super
(
PacketOpcodes
.
SetNameCardRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerBirthdayRsp.java
View file @
d32f706c
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.SetPlayerBirthdayRspOuterClass.SetPlayerBirthdayRsp
;
import
emu.grasscutter.net.proto.SetPlayerBornDataReqOuterClass
;
public
class
PacketSetPlayerBirthdayRsp
extends
Genshin
Packet
{
public
class
PacketSetPlayerBirthdayRsp
extends
Base
Packet
{
public
PacketSetPlayerBirthdayRsp
(
int
retCode
)
{
super
(
PacketOpcodes
.
SetPlayerBirthdayRsp
);
...
...
@@ -17,7 +18,7 @@ public class PacketSetPlayerBirthdayRsp extends GenshinPacket {
this
.
setData
(
proto
);
}
public
PacketSetPlayerBirthdayRsp
(
Genshin
Player
player
)
{
public
PacketSetPlayerBirthdayRsp
(
Player
player
)
{
super
(
PacketOpcodes
.
SetPlayerBirthdayRsp
);
SetPlayerBirthdayRsp
proto
=
SetPlayerBirthdayRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerHeadImageRsp.java
View file @
d32f706c
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.HeadImageOuterClass.HeadImage
;
import
emu.grasscutter.net.proto.SetPlayerHeadImageRspOuterClass.SetPlayerHeadImageRsp
;
public
class
PacketSetPlayerHeadImageRsp
extends
Genshin
Packet
{
public
class
PacketSetPlayerHeadImageRsp
extends
Base
Packet
{
public
PacketSetPlayerHeadImageRsp
(
Genshin
Player
player
)
{
public
PacketSetPlayerHeadImageRsp
(
Player
player
)
{
super
(
PacketOpcodes
.
SetPlayerHeadImageRsp
);
SetPlayerHeadImageRsp
proto
=
SetPlayerHeadImageRsp
.
newBuilder
()
.
setAvatar
(
HeadImage
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
()))
.
setAvatar
Id
(
HeadImage
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
())
.
getAvatarId
()
)
.
build
();
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerNameRsp.java
View file @
d32f706c
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.SetPlayerNameRspOuterClass.SetPlayerNameRsp
;
public
class
PacketSetPlayerNameRsp
extends
Genshin
Packet
{
public
class
PacketSetPlayerNameRsp
extends
Base
Packet
{
public
PacketSetPlayerNameRsp
(
Genshin
Player
player
)
{
public
PacketSetPlayerNameRsp
(
Player
player
)
{
super
(
PacketOpcodes
.
SetPlayerNameRsp
);
SetPlayerNameRsp
proto
=
SetPlayerNameRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerSignatureRsp.java
View file @
d32f706c
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.SetPlayerSignatureRspOuterClass.SetPlayerSignatureRsp
;
public
class
PacketSetPlayerSignatureRsp
extends
Genshin
Packet
{
public
class
PacketSetPlayerSignatureRsp
extends
Base
Packet
{
public
PacketSetPlayerSignatureRsp
(
Genshin
Player
player
)
{
public
PacketSetPlayerSignatureRsp
(
Player
player
)
{
super
(
PacketOpcodes
.
SetPlayerSignatureRsp
);
SetPlayerSignatureRsp
proto
=
SetPlayerSignatureRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetUpAvatarTeamRsp.java
View file @
d32f706c
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.TeamInfo
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.game.
player.
TeamInfo
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetUpAvatarTeamRspOuterClass.SetUpAvatarTeamRsp
;
public
class
PacketSetUpAvatarTeamRsp
extends
Genshin
Packet
{
public
class
PacketSetUpAvatarTeamRsp
extends
Base
Packet
{
public
PacketSetUpAvatarTeamRsp
(
Genshin
Player
player
,
int
teamId
,
TeamInfo
teamInfo
)
{
public
PacketSetUpAvatarTeamRsp
(
Player
player
,
int
teamId
,
TeamInfo
teamInfo
)
{
super
(
PacketOpcodes
.
SetUpAvatarTeamRsp
);
SetUpAvatarTeamRsp
.
Builder
proto
=
SetUpAvatarTeamRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSitRsp.java
deleted
100644 → 0
View file @
47d8fd3c
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
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketStoreItemChangeNotify.java
View file @
d32f706c
...
...
@@ -2,35 +2,35 @@ package emu.grasscutter.server.packet.send;
import
java.util.Collection
;
import
emu.grasscutter.game.inventory.G
enshin
Item
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.game.inventory.G
ame
Item
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.StoreItemChangeNotifyOuterClass.StoreItemChangeNotify
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
public
class
PacketStoreItemChangeNotify
extends
Genshin
Packet
{
public
class
PacketStoreItemChangeNotify
extends
Base
Packet
{
private
PacketStoreItemChangeNotify
()
{
super
(
PacketOpcodes
.
StoreItemChangeNotify
);
}
public
PacketStoreItemChangeNotify
(
G
enshin
Item
item
)
{
public
PacketStoreItemChangeNotify
(
G
ame
Item
item
)
{
this
();
StoreItemChangeNotify
.
Builder
proto
=
StoreItemChangeNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
addItemList
(
item
.
toProto
());
this
.
setData
(
proto
);
}
public
PacketStoreItemChangeNotify
(
Collection
<
G
enshin
Item
>
items
)
{
public
PacketStoreItemChangeNotify
(
Collection
<
G
ame
Item
>
items
)
{
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
);
}
...
...
Prev
1
…
10
11
12
13
14
15
16
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