Commit fa9d703d authored by BaiSugar's avatar BaiSugar Committed by GitHub
Browse files

Merge branch 'Grasscutters:development' into development

parents 6a5d97a3 d1fc8c1f
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.RetcodeOuterClass;
import emu.grasscutter.net.proto.SceneKickPlayerRspOuterClass.SceneKickPlayerRsp;
public class PacketSceneKickPlayerRsp extends GenshinPacket {
public class PacketSceneKickPlayerRsp extends BasePacket {
public PacketSceneKickPlayerRsp(int targetUid) {
super(PacketOpcodes.SceneKickPlayerRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.World;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.World;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.ScenePlayerInfoNotifyOuterClass.ScenePlayerInfoNotify;
import emu.grasscutter.net.proto.ScenePlayerInfoOuterClass.ScenePlayerInfo;
public class PacketScenePlayerInfoNotify extends GenshinPacket {
public class PacketScenePlayerInfoNotify extends BasePacket {
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++) {
GenshinPlayer p = world.getPlayers().get(i);
Player p = world.getPlayers().get(i);
ScenePlayerInfo pInfo = ScenePlayerInfo.newBuilder()
.setUid(p.getUid())
......
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.game.player.Player;
import emu.grasscutter.game.world.Scene;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.ScenePlayerLocationNotifyOuterClass.ScenePlayerLocationNotify;
public class PacketScenePlayerLocationNotify extends GenshinPacket {
public class PacketScenePlayerLocationNotify extends BasePacket {
public PacketScenePlayerLocationNotify(GenshinScene scene) {
public PacketScenePlayerLocationNotify(Scene scene) {
super(PacketOpcodes.ScenePlayerLocationNotify);
ScenePlayerLocationNotify.Builder proto = ScenePlayerLocationNotify.newBuilder()
.setSceneId(scene.getId());
for (GenshinPlayer p : scene.getPlayers()) {
for (Player p : scene.getPlayers()) {
proto.addPlayerLocList(p.getPlayerLocationInfo());
}
......
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 GenshinPacket {
public class PacketSceneTeamUpdateNotify extends BasePacket {
public PacketSceneTeamUpdateNotify(GenshinPlayer player) {
public PacketSceneTeamUpdateNotify(Player player) {
super(PacketOpcodes.SceneTeamUpdateNotify);
SceneTeamUpdateNotify.Builder proto = SceneTeamUpdateNotify.newBuilder()
.setIsInMp(player.getWorld().isMultiplayer());
for (GenshinPlayer p : player.getWorld().getPlayers()) {
for (Player p : player.getWorld().getPlayers()) {
for (EntityAvatar entityAvatar : p.getTeamManager().getActiveTeam()) {
SceneTeamAvatar.Builder avatarProto = SceneTeamAvatar.newBuilder()
.setPlayerUid(p.getUid())
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
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.SceneTimeNotifyOuterClass.SceneTimeNotify;
public class PacketSceneTimeNotify extends GenshinPacket {
public class PacketSceneTimeNotify extends BasePacket {
public PacketSceneTimeNotify(GenshinPlayer player) {
public PacketSceneTimeNotify(Player player) {
super(PacketOpcodes.SceneTimeNotify);
SceneTimeNotify proto = SceneTimeNotify.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.custom.ScenePointEntry;
import emu.grasscutter.game.GenshinPlayer;
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.RetcodeOuterClass;
import emu.grasscutter.net.proto.SceneTransToPointRspOuterClass.SceneTransToPointRsp;
import emu.grasscutter.utils.Position;
public class PacketSceneTransToPointRsp extends GenshinPacket {
public class PacketSceneTransToPointRsp extends BasePacket {
public PacketSceneTransToPointRsp(GenshinPlayer player, int pointId, int sceneId) {
public PacketSceneTransToPointRsp(Player player, int pointId, int sceneId) {
super(PacketOpcodes.SceneTransToPointRsp);
SceneTransToPointRsp proto = SceneTransToPointRsp.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.SceneUnlockInfoNotifyOuterClass.SceneUnlockInfoNotify;
import emu.grasscutter.net.proto.SceneUnlockInfoOuterClass.SceneUnlockInfo;
public class PacketSceneUnlockInfoNotify extends GenshinPacket {
public class PacketSceneUnlockInfoNotify extends BasePacket {
public PacketSceneUnlockInfoNotify() {
super(PacketOpcodes.SceneUnlockInfoNotify); // Rename opcode later
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.ServerTimeNotifyOuterClass.ServerTimeNotify;
public class PacketServerTimeNotify extends GenshinPacket {
public class PacketServerTimeNotify extends BasePacket {
public PacketServerTimeNotify() {
super(PacketOpcodes.ServerTimeNotify);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.SetEquipLockStateRspOuterClass.SetEquipLockStateRsp;
public class PacketSetEquipLockStateRsp extends GenshinPacket {
public class PacketSetEquipLockStateRsp extends BasePacket {
public PacketSetEquipLockStateRsp(GenshinItem equip) {
public PacketSetEquipLockStateRsp(GameItem equip) {
super(PacketOpcodes.SetEquipLockStateRsp);
this.buildHeader(0);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.SetNameCardRspOuterClass.SetNameCardRsp;
public class PacketSetNameCardRsp extends GenshinPacket {
public class PacketSetNameCardRsp extends BasePacket {
public PacketSetNameCardRsp(int nameCardId) {
super(PacketOpcodes.SetNameCardRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
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.SetPlayerBirthdayRspOuterClass.SetPlayerBirthdayRsp;
import emu.grasscutter.net.proto.SetPlayerBornDataReqOuterClass;
public class PacketSetPlayerBirthdayRsp extends GenshinPacket {
public class PacketSetPlayerBirthdayRsp extends BasePacket {
public PacketSetPlayerBirthdayRsp(int retCode) {
super(PacketOpcodes.SetPlayerBirthdayRsp);
......@@ -18,7 +18,7 @@ public class PacketSetPlayerBirthdayRsp extends GenshinPacket {
this.setData(proto);
}
public PacketSetPlayerBirthdayRsp(GenshinPlayer player) {
public PacketSetPlayerBirthdayRsp(Player player) {
super(PacketOpcodes.SetPlayerBirthdayRsp);
SetPlayerBirthdayRsp proto = SetPlayerBirthdayRsp.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
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.HeadImageOuterClass.HeadImage;
import emu.grasscutter.net.proto.SetPlayerHeadImageRspOuterClass.SetPlayerHeadImageRsp;
public class PacketSetPlayerHeadImageRsp extends GenshinPacket {
public class PacketSetPlayerHeadImageRsp extends BasePacket {
public PacketSetPlayerHeadImageRsp(GenshinPlayer player) {
public PacketSetPlayerHeadImageRsp(Player player) {
super(PacketOpcodes.SetPlayerHeadImageRsp);
SetPlayerHeadImageRsp proto = SetPlayerHeadImageRsp.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
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.SetPlayerNameRspOuterClass.SetPlayerNameRsp;
public class PacketSetPlayerNameRsp extends GenshinPacket {
public class PacketSetPlayerNameRsp extends BasePacket {
public PacketSetPlayerNameRsp(GenshinPlayer player) {
public PacketSetPlayerNameRsp(Player player) {
super(PacketOpcodes.SetPlayerNameRsp);
SetPlayerNameRsp proto = SetPlayerNameRsp.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
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.SetPlayerSignatureRspOuterClass.SetPlayerSignatureRsp;
public class PacketSetPlayerSignatureRsp extends GenshinPacket {
public class PacketSetPlayerSignatureRsp extends BasePacket {
public PacketSetPlayerSignatureRsp(GenshinPlayer player) {
public PacketSetPlayerSignatureRsp(Player player) {
super(PacketOpcodes.SetPlayerSignatureRsp);
SetPlayerSignatureRsp proto = SetPlayerSignatureRsp.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.TeamInfo;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.player.TeamInfo;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.SetUpAvatarTeamRspOuterClass.SetUpAvatarTeamRsp;
public class PacketSetUpAvatarTeamRsp extends GenshinPacket {
public class PacketSetUpAvatarTeamRsp extends BasePacket {
public PacketSetUpAvatarTeamRsp(GenshinPlayer player, int teamId, TeamInfo teamInfo) {
public PacketSetUpAvatarTeamRsp(Player player, int teamId, TeamInfo teamInfo) {
super(PacketOpcodes.SetUpAvatarTeamRsp);
SetUpAvatarTeamRsp.Builder proto = SetUpAvatarTeamRsp.newBuilder()
......
......@@ -2,19 +2,19 @@ package emu.grasscutter.server.packet.send;
import java.util.Collection;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.StoreItemChangeNotifyOuterClass.StoreItemChangeNotify;
import emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType;
public class PacketStoreItemChangeNotify extends GenshinPacket {
public class PacketStoreItemChangeNotify extends BasePacket {
private PacketStoreItemChangeNotify() {
super(PacketOpcodes.StoreItemChangeNotify);
}
public PacketStoreItemChangeNotify(GenshinItem item) {
public PacketStoreItemChangeNotify(GameItem item) {
this();
StoreItemChangeNotify.Builder proto = StoreItemChangeNotify.newBuilder()
......@@ -24,7 +24,7 @@ public class PacketStoreItemChangeNotify extends GenshinPacket {
this.setData(proto);
}
public PacketStoreItemChangeNotify(Collection<GenshinItem> items) {
public PacketStoreItemChangeNotify(Collection<GameItem> items) {
this();
StoreItemChangeNotify.Builder proto = StoreItemChangeNotify.newBuilder()
......
......@@ -2,19 +2,19 @@ package emu.grasscutter.server.packet.send;
import java.util.Collection;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.StoreItemDelNotifyOuterClass.StoreItemDelNotify;
import emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType;
public class PacketStoreItemDelNotify extends GenshinPacket {
public class PacketStoreItemDelNotify extends BasePacket {
private PacketStoreItemDelNotify() {
super(PacketOpcodes.StoreItemDelNotify);
}
public PacketStoreItemDelNotify(GenshinItem item) {
public PacketStoreItemDelNotify(GameItem item) {
this();
StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder()
......@@ -24,7 +24,7 @@ public class PacketStoreItemDelNotify extends GenshinPacket {
this.setData(proto);
}
public PacketStoreItemDelNotify(Collection<GenshinItem> items) {
public PacketStoreItemDelNotify(Collection<GameItem> items) {
this();
StoreItemDelNotify.Builder proto = StoreItemDelNotify.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType;
import emu.grasscutter.net.proto.StoreWeightLimitNotifyOuterClass.StoreWeightLimitNotify;
public class PacketStoreWeightLimitNotify extends GenshinPacket {
public class PacketStoreWeightLimitNotify extends BasePacket {
public PacketStoreWeightLimitNotify() {
super(PacketOpcodes.StoreWeightLimitNotify);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
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.SyncScenePlayTeamEntityNotifyOuterClass.SyncScenePlayTeamEntityNotify;
public class PacketSyncScenePlayTeamEntityNotify extends GenshinPacket {
public class PacketSyncScenePlayTeamEntityNotify extends BasePacket {
public PacketSyncScenePlayTeamEntityNotify(GenshinPlayer player) {
public PacketSyncScenePlayTeamEntityNotify(Player player) {
super(PacketOpcodes.SyncScenePlayTeamEntityNotify);
SyncScenePlayTeamEntityNotify proto = SyncScenePlayTeamEntityNotify.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
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.SyncTeamEntityNotifyOuterClass.SyncTeamEntityNotify;
import emu.grasscutter.net.proto.TeamEntityInfoOuterClass.TeamEntityInfo;
public class PacketSyncTeamEntityNotify extends GenshinPacket {
public class PacketSyncTeamEntityNotify extends BasePacket {
public PacketSyncTeamEntityNotify(GenshinPlayer player) {
public PacketSyncTeamEntityNotify(Player player) {
super(PacketOpcodes.SyncTeamEntityNotify);
SyncTeamEntityNotify.Builder proto = SyncTeamEntityNotify.newBuilder()
.setSceneId(player.getSceneId());
if (player.getWorld().isMultiplayer()) {
for (GenshinPlayer p : player.getWorld().getPlayers()) {
for (Player p : player.getWorld().getPlayers()) {
// Skip if same player
if (player == p) {
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment