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
01b190bc
Commit
01b190bc
authored
May 07, 2022
by
Magix
Committed by
GitHub
May 07, 2022
Browse files
UPGRADE TO 1.1.0 POG
Merge `development` into `stable`
parents
6b81b888
1beddf16
Changes
497
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/packet/send/PacketSetEquipLockStateRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.inventory.G
enshin
Item
;
import
emu.grasscutter.game.inventory.G
ame
Item
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetEquipLockStateRspOuterClass.SetEquipLockStateRsp
;
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
);
super
(
PacketOpcodes
.
SetEquipLockStateRsp
);
this
.
buildHeader
(
0
);
this
.
buildHeader
(
0
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetNameCardRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
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.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetNameCardRspOuterClass.SetNameCardRsp
;
import
emu.grasscutter.net.proto.SetNameCardRspOuterClass.SetNameCardRsp
;
public
class
PacketSetNameCardRsp
extends
Genshin
Packet
{
public
class
PacketSetNameCardRsp
extends
Base
Packet
{
public
PacketSetNameCardRsp
(
int
nameCardId
)
{
public
PacketSetNameCardRsp
(
int
nameCardId
)
{
super
(
PacketOpcodes
.
SetNameCardRsp
);
super
(
PacketOpcodes
.
SetNameCardRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerBirthdayRsp.java
0 → 100644
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetPlayerBirthdayRspOuterClass.SetPlayerBirthdayRsp
;
import
emu.grasscutter.net.proto.SetPlayerBornDataReqOuterClass
;
public
class
PacketSetPlayerBirthdayRsp
extends
BasePacket
{
public
PacketSetPlayerBirthdayRsp
(
int
retCode
)
{
super
(
PacketOpcodes
.
SetPlayerBirthdayRsp
);
SetPlayerBirthdayRsp
proto
=
SetPlayerBirthdayRsp
.
newBuilder
()
.
setRetcode
(
retCode
)
.
build
();
this
.
setData
(
proto
);
}
public
PacketSetPlayerBirthdayRsp
(
Player
player
)
{
super
(
PacketOpcodes
.
SetPlayerBirthdayRsp
);
SetPlayerBirthdayRsp
proto
=
SetPlayerBirthdayRsp
.
newBuilder
()
.
setBirthday
(
player
.
getBirthday
().
toProto
())
.
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerHeadImageRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.
HeadImageOuterClass.HeadImag
e
;
import
emu.grasscutter.net.proto.
ProfilePictureOuterClass.ProfilePictur
e
;
import
emu.grasscutter.net.proto.SetPlayerHeadImageRspOuterClass.SetPlayerHeadImageRsp
;
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
);
super
(
PacketOpcodes
.
SetPlayerHeadImageRsp
);
SetPlayerHeadImageRsp
proto
=
SetPlayerHeadImageRsp
.
newBuilder
()
SetPlayerHeadImageRsp
proto
=
SetPlayerHeadImageRsp
.
newBuilder
()
.
set
Avatar
(
HeadImag
e
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
()))
.
set
ProfilePicture
(
ProfilePictur
e
.
newBuilder
().
setAvatarId
(
player
.
getHeadImage
()))
.
build
();
.
build
();
this
.
setData
(
proto
);
this
.
setData
(
proto
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerNameRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetPlayerNameRspOuterClass.SetPlayerNameRsp
;
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
);
super
(
PacketOpcodes
.
SetPlayerNameRsp
);
SetPlayerNameRsp
proto
=
SetPlayerNameRsp
.
newBuilder
()
SetPlayerNameRsp
proto
=
SetPlayerNameRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerPropRsp.java
0 → 100644
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.player.Player
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetPlayerPropRspOuterClass
;
import
emu.grasscutter.net.proto.SetPlayerPropRspOuterClass.SetPlayerPropRsp
;
public
class
PacketSetPlayerPropRsp
extends
BasePacket
{
public
PacketSetPlayerPropRsp
(
int
retCode
)
{
super
(
PacketOpcodes
.
SetPlayerPropRsp
);
SetPlayerPropRspOuterClass
.
SetPlayerPropRsp
.
Builder
proto
=
SetPlayerPropRspOuterClass
.
SetPlayerPropRsp
.
newBuilder
();
if
(
retCode
!=
0
)
{
proto
.
setRetcode
(
retCode
);
}
this
.
setData
(
proto
.
build
());
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketSetPlayerSignatureRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetPlayerSignatureRspOuterClass.SetPlayerSignatureRsp
;
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
);
super
(
PacketOpcodes
.
SetPlayerSignatureRsp
);
SetPlayerSignatureRsp
proto
=
SetPlayerSignatureRsp
.
newBuilder
()
SetPlayerSignatureRsp
proto
=
SetPlayerSignatureRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSetUpAvatarTeamRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.game.TeamInfo
;
import
emu.grasscutter.game.
player.
TeamInfo
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SetUpAvatarTeamRspOuterClass.SetUpAvatarTeamRsp
;
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
);
super
(
PacketOpcodes
.
SetUpAvatarTeamRsp
);
SetUpAvatarTeamRsp
.
Builder
proto
=
SetUpAvatarTeamRsp
.
newBuilder
()
SetUpAvatarTeamRsp
.
Builder
proto
=
SetUpAvatarTeamRsp
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketStoreItemChangeNotify.java
View file @
01b190bc
...
@@ -2,35 +2,35 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,35 +2,35 @@ package emu.grasscutter.server.packet.send;
import
java.util.Collection
;
import
java.util.Collection
;
import
emu.grasscutter.game.inventory.G
enshin
Item
;
import
emu.grasscutter.game.inventory.G
ame
Item
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.StoreItemChangeNotifyOuterClass.StoreItemChangeNotify
;
import
emu.grasscutter.net.proto.StoreItemChangeNotifyOuterClass.StoreItemChangeNotify
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
public
class
PacketStoreItemChangeNotify
extends
Genshin
Packet
{
public
class
PacketStoreItemChangeNotify
extends
Base
Packet
{
private
PacketStoreItemChangeNotify
()
{
private
PacketStoreItemChangeNotify
()
{
super
(
PacketOpcodes
.
StoreItemChangeNotify
);
super
(
PacketOpcodes
.
StoreItemChangeNotify
);
}
}
public
PacketStoreItemChangeNotify
(
G
enshin
Item
item
)
{
public
PacketStoreItemChangeNotify
(
G
ame
Item
item
)
{
this
();
this
();
StoreItemChangeNotify
.
Builder
proto
=
StoreItemChangeNotify
.
newBuilder
()
StoreItemChangeNotify
.
Builder
proto
=
StoreItemChangeNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
addItemList
(
item
.
toProto
());
.
addItemList
(
item
.
toProto
());
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketStoreItemChangeNotify
(
Collection
<
G
enshin
Item
>
items
)
{
public
PacketStoreItemChangeNotify
(
Collection
<
G
ame
Item
>
items
)
{
this
();
this
();
StoreItemChangeNotify
.
Builder
proto
=
StoreItemChangeNotify
.
newBuilder
()
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
);
this
.
setData
(
proto
);
}
}
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketStoreItemDelNotify.java
View file @
01b190bc
...
@@ -2,33 +2,33 @@ package emu.grasscutter.server.packet.send;
...
@@ -2,33 +2,33 @@ package emu.grasscutter.server.packet.send;
import
java.util.Collection
;
import
java.util.Collection
;
import
emu.grasscutter.game.inventory.G
enshin
Item
;
import
emu.grasscutter.game.inventory.G
ame
Item
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.StoreItemDelNotifyOuterClass.StoreItemDelNotify
;
import
emu.grasscutter.net.proto.StoreItemDelNotifyOuterClass.StoreItemDelNotify
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
public
class
PacketStoreItemDelNotify
extends
Genshin
Packet
{
public
class
PacketStoreItemDelNotify
extends
Base
Packet
{
private
PacketStoreItemDelNotify
()
{
private
PacketStoreItemDelNotify
()
{
super
(
PacketOpcodes
.
StoreItemDelNotify
);
super
(
PacketOpcodes
.
StoreItemDelNotify
);
}
}
public
PacketStoreItemDelNotify
(
G
enshin
Item
item
)
{
public
PacketStoreItemDelNotify
(
G
ame
Item
item
)
{
this
();
this
();
StoreItemDelNotify
.
Builder
proto
=
StoreItemDelNotify
.
newBuilder
()
StoreItemDelNotify
.
Builder
proto
=
StoreItemDelNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
addGuidList
(
item
.
getGuid
());
.
addGuidList
(
item
.
getGuid
());
this
.
setData
(
proto
);
this
.
setData
(
proto
);
}
}
public
PacketStoreItemDelNotify
(
Collection
<
G
enshin
Item
>
items
)
{
public
PacketStoreItemDelNotify
(
Collection
<
G
ame
Item
>
items
)
{
this
();
this
();
StoreItemDelNotify
.
Builder
proto
=
StoreItemDelNotify
.
newBuilder
()
StoreItemDelNotify
.
Builder
proto
=
StoreItemDelNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
);
.
setStoreType
(
StoreType
.
S
TORE_PACK
);
items
.
stream
().
forEach
(
item
->
proto
.
addGuidList
(
item
.
getGuid
()));
items
.
stream
().
forEach
(
item
->
proto
.
addGuidList
(
item
.
getGuid
()));
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketStoreWeightLimitNotify.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
import
emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType
;
import
emu.grasscutter.net.proto.StoreWeightLimitNotifyOuterClass.StoreWeightLimitNotify
;
import
emu.grasscutter.net.proto.StoreWeightLimitNotifyOuterClass.StoreWeightLimitNotify
;
public
class
PacketStoreWeightLimitNotify
extends
Genshin
Packet
{
public
class
PacketStoreWeightLimitNotify
extends
Base
Packet
{
public
PacketStoreWeightLimitNotify
()
{
public
PacketStoreWeightLimitNotify
()
{
super
(
PacketOpcodes
.
StoreWeightLimitNotify
);
super
(
PacketOpcodes
.
StoreWeightLimitNotify
);
StoreWeightLimitNotify
p
=
StoreWeightLimitNotify
.
newBuilder
()
StoreWeightLimitNotify
p
=
StoreWeightLimitNotify
.
newBuilder
()
.
setStoreType
(
StoreType
.
S
torePack
)
.
setStoreType
(
StoreType
.
S
TORE_PACK
)
.
setWeightLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitAll
)
.
setWeightLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitAll
)
.
setWeaponCountLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitWeapon
)
.
setWeaponCountLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitWeapon
)
.
setReliquaryCountLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitRelic
)
.
setReliquaryCountLimit
(
Grasscutter
.
getConfig
().
getGameServerOptions
().
InventoryLimitRelic
)
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSyncScenePlayTeamEntityNotify.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.SyncScenePlayTeamEntityNotifyOuterClass.SyncScenePlayTeamEntityNotify
;
import
emu.grasscutter.net.proto.SyncScenePlayTeamEntityNotifyOuterClass.SyncScenePlayTeamEntityNotify
;
public
class
PacketSyncScenePlayTeamEntityNotify
extends
Genshin
Packet
{
public
class
PacketSyncScenePlayTeamEntityNotify
extends
Base
Packet
{
public
PacketSyncScenePlayTeamEntityNotify
(
Genshin
Player
player
)
{
public
PacketSyncScenePlayTeamEntityNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
SyncScenePlayTeamEntityNotify
);
super
(
PacketOpcodes
.
SyncScenePlayTeamEntityNotify
);
SyncScenePlayTeamEntityNotify
proto
=
SyncScenePlayTeamEntityNotify
.
newBuilder
()
SyncScenePlayTeamEntityNotify
proto
=
SyncScenePlayTeamEntityNotify
.
newBuilder
()
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketSyncTeamEntityNotify.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.game.
Genshin
Player
;
import
emu.grasscutter.game.
player.
Player
;
import
emu.grasscutter.net.packet.
Genshin
Packet
;
import
emu.grasscutter.net.packet.
Base
Packet
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo
;
import
emu.grasscutter.net.proto.AbilitySyncStateInfoOuterClass.AbilitySyncStateInfo
;
import
emu.grasscutter.net.proto.SyncTeamEntityNotifyOuterClass.SyncTeamEntityNotify
;
import
emu.grasscutter.net.proto.SyncTeamEntityNotifyOuterClass.SyncTeamEntityNotify
;
import
emu.grasscutter.net.proto.TeamEntityInfoOuterClass.TeamEntityInfo
;
import
emu.grasscutter.net.proto.TeamEntityInfoOuterClass.TeamEntityInfo
;
public
class
PacketSyncTeamEntityNotify
extends
Genshin
Packet
{
public
class
PacketSyncTeamEntityNotify
extends
Base
Packet
{
public
PacketSyncTeamEntityNotify
(
Genshin
Player
player
)
{
public
PacketSyncTeamEntityNotify
(
Player
player
)
{
super
(
PacketOpcodes
.
SyncTeamEntityNotify
);
super
(
PacketOpcodes
.
SyncTeamEntityNotify
);
SyncTeamEntityNotify
.
Builder
proto
=
SyncTeamEntityNotify
.
newBuilder
()
SyncTeamEntityNotify
.
Builder
proto
=
SyncTeamEntityNotify
.
newBuilder
()
.
setSceneId
(
player
.
getSceneId
());
.
setSceneId
(
player
.
getSceneId
());
if
(
player
.
getWorld
().
isMultiplayer
())
{
if
(
player
.
getWorld
().
isMultiplayer
())
{
for
(
Genshin
Player
p
:
player
.
getWorld
().
getPlayers
())
{
for
(
Player
p
:
player
.
getWorld
().
getPlayers
())
{
// Skip if same player
// Skip if same player
if
(
player
==
p
)
{
if
(
player
==
p
)
{
continue
;
continue
;
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketTakeAchievementRewardReq.java
0 → 100644
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.AchievementInfoOuterClass
;
import
emu.grasscutter.net.proto.AchievementInfoOuterClass.AchievementInfo
;
import
emu.grasscutter.net.proto.TakeAchievementRewardReqOuterClass.TakeAchievementRewardReq
;
import
emu.grasscutter.server.game.GameSession
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PacketTakeAchievementRewardReq
extends
BasePacket
{
public
PacketTakeAchievementRewardReq
(
GameSession
session
)
{
super
(
PacketOpcodes
.
TakeAchievementRewardReq
);
TakeAchievementRewardReq
proto
=
TakeAchievementRewardReq
.
newBuilder
().
build
();
this
.
setData
(
proto
);
}
}
\ No newline at end of file
src/main/java/emu/grasscutter/server/packet/send/PacketTakePlayerLevelRewardRsp.java
0 → 100644
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.TakePlayerLevelRewardRspOuterClass.TakePlayerLevelRewardRsp
;
public
class
PacketTakePlayerLevelRewardRsp
extends
BasePacket
{
public
PacketTakePlayerLevelRewardRsp
(
int
level
,
int
rewardId
)
{
super
(
PacketOpcodes
.
TakePlayerLevelRewardRsp
);
int
retcode
=
0
;
if
(
rewardId
==
0
)
{
retcode
=
1
;
}
TakePlayerLevelRewardRsp
proto
=
TakePlayerLevelRewardRsp
.
newBuilder
()
.
setLevel
(
level
)
.
setRewardId
(
rewardId
)
.
setRetcode
(
retcode
)
.
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketTakeoffEquipRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
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.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.TakeoffEquipRspOuterClass.TakeoffEquipRsp
;
import
emu.grasscutter.net.proto.TakeoffEquipRspOuterClass.TakeoffEquipRsp
;
public
class
PacketTakeoffEquipRsp
extends
Genshin
Packet
{
public
class
PacketTakeoffEquipRsp
extends
Base
Packet
{
public
PacketTakeoffEquipRsp
(
long
avatarGuid
,
int
slot
)
{
public
PacketTakeoffEquipRsp
(
long
avatarGuid
,
int
slot
)
{
super
(
PacketOpcodes
.
TakeoffEquipRsp
);
super
(
PacketOpcodes
.
TakeoffEquipRsp
);
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketTowerAllDataRsp.java
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.GenshinPacket
;
import
emu.grasscutter.data.GameData
;
import
emu.grasscutter.data.def.TowerFloorData
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.TowerAllDataRspOuterClass.TowerAllDataRsp
;
import
emu.grasscutter.net.proto.TowerAllDataRspOuterClass.TowerAllDataRsp
;
import
emu.grasscutter.net.proto.TowerCurLevelRecordOuterClass.TowerCurLevelRecord
;
import
emu.grasscutter.net.proto.TowerCurLevelRecordOuterClass.TowerCurLevelRecord
;
import
emu.grasscutter.net.proto.TowerFloorRecordOuterClass.TowerFloorRecord
;
import
emu.grasscutter.net.proto.TowerFloorRecordOuterClass.TowerFloorRecord
;
public
class
PacketTowerAllDataRsp
extends
GenshinPacket
{
import
java.util.stream.Collectors
;
public
class
PacketTowerAllDataRsp
extends
BasePacket
{
public
PacketTowerAllDataRsp
()
{
public
PacketTowerAllDataRsp
()
{
super
(
PacketOpcodes
.
TowerAllDataRsp
);
super
(
PacketOpcodes
.
TowerAllDataRsp
);
var
list
=
GameData
.
getTowerFloorDataMap
().
values
().
stream
()
.
map
(
TowerFloorData:
:
getFloorId
)
.
map
(
id
->
TowerFloorRecord
.
newBuilder
().
setFloorId
(
id
).
build
())
.
collect
(
Collectors
.
toList
());
TowerAllDataRsp
proto
=
TowerAllDataRsp
.
newBuilder
()
TowerAllDataRsp
proto
=
TowerAllDataRsp
.
newBuilder
()
.
setTowerScheduleId
(
29
)
.
setTowerScheduleId
(
29
)
.
addTowerFloorRecordList
(
TowerFloorRecord
.
newBuilder
().
setFloorId
(
1001
)
)
.
add
All
TowerFloorRecordList
(
list
)
.
setCurLevelRecord
(
TowerCurLevelRecord
.
newBuilder
().
setIsEmpty
(
true
))
.
setCurLevelRecord
(
TowerCurLevelRecord
.
newBuilder
().
setIsEmpty
(
true
))
.
setNextScheduleChangeTime
(
Integer
.
MAX_VALUE
)
.
setNextScheduleChangeTime
(
Integer
.
MAX_VALUE
)
.
putFloorOpenTimeMap
(
1024
,
1630486800
)
.
putFloorOpenTimeMap
(
1024
,
1630486800
)
...
...
src/main/java/emu/grasscutter/server/packet/send/PacketTowerCurLevelRecordChangeNotify.java
0 → 100644
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.TowerCurLevelRecordChangeNotifyOuterClass.TowerCurLevelRecordChangeNotify
;
import
emu.grasscutter.net.proto.TowerCurLevelRecordOuterClass.TowerCurLevelRecord
;
public
class
PacketTowerCurLevelRecordChangeNotify
extends
BasePacket
{
public
PacketTowerCurLevelRecordChangeNotify
(
int
curFloorId
,
int
curLevelIndex
)
{
super
(
PacketOpcodes
.
TowerCurLevelRecordChangeNotify
);
TowerCurLevelRecordChangeNotify
proto
=
TowerCurLevelRecordChangeNotify
.
newBuilder
()
.
setCurLevelRecord
(
TowerCurLevelRecord
.
newBuilder
()
.
setCurFloorId
(
curFloorId
)
.
setCurLevelIndex
(
curLevelIndex
)
// TODO team info
.
build
())
.
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketTowerEnterLevelRsp.java
0 → 100644
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.TowerEnterLevelRspOuterClass.TowerEnterLevelRsp
;
public
class
PacketTowerEnterLevelRsp
extends
BasePacket
{
public
PacketTowerEnterLevelRsp
(
int
floorId
,
int
levelIndex
)
{
super
(
PacketOpcodes
.
TowerEnterLevelRsp
);
TowerEnterLevelRsp
proto
=
TowerEnterLevelRsp
.
newBuilder
()
.
setFloorId
(
floorId
)
.
setLevelIndex
(
levelIndex
)
.
addTowerBuffIdList
(
4
)
.
addTowerBuffIdList
(
28
)
.
addTowerBuffIdList
(
18
)
.
build
();
this
.
setData
(
proto
);
}
}
src/main/java/emu/grasscutter/server/packet/send/PacketTowerFloorRecordChangeNotify.java
0 → 100644
View file @
01b190bc
package
emu.grasscutter.server.packet.send
;
import
emu.grasscutter.net.packet.BasePacket
;
import
emu.grasscutter.net.packet.PacketOpcodes
;
import
emu.grasscutter.net.proto.TowerFloorRecordChangeNotifyOuterClass.TowerFloorRecordChangeNotify
;
import
emu.grasscutter.net.proto.TowerFloorRecordOuterClass.TowerFloorRecord
;
import
emu.grasscutter.net.proto.TowerLevelRecordOuterClass.TowerLevelRecord
;
public
class
PacketTowerFloorRecordChangeNotify
extends
BasePacket
{
public
PacketTowerFloorRecordChangeNotify
(
int
floorId
)
{
super
(
PacketOpcodes
.
TowerFloorRecordChangeNotify
);
TowerFloorRecordChangeNotify
proto
=
TowerFloorRecordChangeNotify
.
newBuilder
()
.
addTowerFloorRecordList
(
TowerFloorRecord
.
newBuilder
()
.
setFloorId
(
floorId
)
.
setFloorStarRewardProgress
(
3
)
.
addPassedLevelRecordList
(
TowerLevelRecord
.
newBuilder
()
.
setLevelId
(
1
)
.
addSatisfiedCondList
(
1
)
.
addSatisfiedCondList
(
2
)
.
addSatisfiedCondList
(
3
)
.
build
())
.
build
())
.
setIsFinishedEntranceFloor
(
true
)
.
build
();
this
.
setData
(
proto
);
}
}
Prev
1
…
19
20
21
22
23
24
25
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