Commit 1c36f078 authored by Melledy's avatar Melledy
Browse files

Renamed all references to a certain game

parent 6b8902be
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.PingRspOuterClass.PingRsp;
public class PacketPingRsp extends GenshinPacket {
public class PacketPingRsp extends BasePacket {
public PacketPingRsp(int clientSeq, int time) {
super(PacketOpcodes.PingRsp, clientSeq);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.Player;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerApplyEnterMpNotifyOuterClass.PlayerApplyEnterMpNotify;
public class PacketPlayerApplyEnterMpNotify extends GenshinPacket {
public class PacketPlayerApplyEnterMpNotify extends BasePacket {
public PacketPlayerApplyEnterMpNotify(GenshinPlayer srcPlayer) {
public PacketPlayerApplyEnterMpNotify(Player srcPlayer) {
super(PacketOpcodes.PlayerApplyEnterMpNotify);
PlayerApplyEnterMpNotify proto = PlayerApplyEnterMpNotify.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.Player;
import emu.grasscutter.net.packet.BasePacket;
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 GenshinPacket {
public class PacketPlayerApplyEnterMpResultNotify extends BasePacket {
public PacketPlayerApplyEnterMpResultNotify(GenshinPlayer target, boolean isAgreed, PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify.Reason reason) {
public PacketPlayerApplyEnterMpResultNotify(Player target, boolean isAgreed, PlayerApplyEnterMpResultNotifyOuterClass.PlayerApplyEnterMpResultNotify.Reason reason) {
super(PacketOpcodes.PlayerApplyEnterMpResultNotify);
PlayerApplyEnterMpResultNotify proto = PlayerApplyEnterMpResultNotify.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.PlayerApplyEnterMpResultRspOuterClass.PlayerApplyEnterMpResultRsp;
public class PacketPlayerApplyEnterMpResultRsp extends GenshinPacket {
public class PacketPlayerApplyEnterMpResultRsp extends BasePacket {
public PacketPlayerApplyEnterMpResultRsp(int applyUid, boolean isAgreed) {
super(PacketOpcodes.PlayerApplyEnterMpResultRsp);
......
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.PlayerApplyEnterMpRspOuterClass.PlayerApplyEnterMpRsp;
public class PacketPlayerApplyEnterMpRsp extends GenshinPacket {
public class PacketPlayerApplyEnterMpRsp extends BasePacket {
public PacketPlayerApplyEnterMpRsp(int targetUid) {
super(PacketOpcodes.PlayerApplyEnterMpRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.Player;
import emu.grasscutter.net.packet.BasePacket;
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 GenshinPacket {
public class PacketPlayerChatNotify extends BasePacket {
public PacketPlayerChatNotify(GenshinPlayer 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(GenshinPlayer 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(GenshinPlayer sender, int channelId, ChatInfo.SystemHint systemHint) {
public PacketPlayerChatNotify(Player sender, int channelId, ChatInfo.SystemHint systemHint) {
super(PacketOpcodes.PlayerChatNotify);
ChatInfo info = ChatInfo.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.PlayerChatRspOuterClass.PlayerChatRsp;
public class PacketPlayerChatRsp extends GenshinPacket {
public class PacketPlayerChatRsp extends BasePacket {
public PacketPlayerChatRsp() {
super(PacketOpcodes.PlayerChatRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.Player;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerDataNotifyOuterClass.PlayerDataNotify;
import emu.grasscutter.net.proto.PropValueOuterClass.PropValue;
public class PacketPlayerDataNotify extends GenshinPacket {
public class PacketPlayerDataNotify extends BasePacket {
public PacketPlayerDataNotify(GenshinPlayer player) {
public PacketPlayerDataNotify(Player player) {
super(PacketOpcodes.PlayerDataNotify, 2);
PlayerDataNotify.Builder p = PlayerDataNotify.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
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.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 GenshinPacket {
public class PacketPlayerEnterSceneInfoNotify extends BasePacket {
public PacketPlayerEnterSceneInfoNotify(GenshinPlayer 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()) {
GenshinItem weapon = avatarEntity.getAvatar().getWeapon();
GameItem weapon = avatarEntity.getAvatar().getWeapon();
long weaponGuid = weapon != null ? weapon.getGuid() : 0;
AvatarEnterSceneInfo avatarInfo = AvatarEnterSceneInfo.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.GenshinPlayer.SceneLoadState;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.Player.SceneLoadState;
import emu.grasscutter.game.props.EnterReason;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
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 GenshinPacket {
public class PacketPlayerEnterSceneNotify extends BasePacket {
// Login
public PacketPlayerEnterSceneNotify(GenshinPlayer 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(GenshinPlayer 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(GenshinPlayer player, GenshinPlayer 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));
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.World;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerGameTimeNotifyOuterClass.PlayerGameTimeNotify;
public class PacketPlayerGameTimeNotify extends GenshinPacket {
public class PacketPlayerGameTimeNotify extends BasePacket {
public PacketPlayerGameTimeNotify(GenshinPlayer player) {
public PacketPlayerGameTimeNotify(Player player) {
super(PacketOpcodes.PlayerGameTimeNotify);
PlayerGameTimeNotify proto = PlayerGameTimeNotify.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.PlayerGetForceQuitBanInfoRspOuterClass.PlayerGetForceQuitBanInfoRsp;
public class PacketPlayerGetForceQuitBanInfoRsp extends GenshinPacket {
public class PacketPlayerGetForceQuitBanInfoRsp extends BasePacket {
public PacketPlayerGetForceQuitBanInfoRsp(int retcode) {
super(PacketOpcodes.PlayerGetForceQuitBanInfoRsp);
......
......@@ -2,11 +2,11 @@ package emu.grasscutter.server.packet.send;
import java.util.Set;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerLevelRewardUpdateNotifyOuterClass.PlayerLevelRewardUpdateNotify;
public class PacketPlayerLevelRewardUpdateNotify extends GenshinPacket {
public class PacketPlayerLevelRewardUpdateNotify extends BasePacket {
public PacketPlayerLevelRewardUpdateNotify(Set<Integer> rewardedLevels) {
super(PacketOpcodes.PlayerLevelRewardUpdateNotify);
......
......@@ -2,7 +2,7 @@ package emu.grasscutter.server.packet.send;
import com.google.protobuf.ByteString;
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.PlayerLoginRspOuterClass.PlayerLoginRsp;
import emu.grasscutter.net.proto.QueryCurrRegionHttpRspOuterClass;
......@@ -14,7 +14,7 @@ import java.io.File;
import java.net.URL;
import java.util.Base64;
public class PacketPlayerLoginRsp extends GenshinPacket {
public class PacketPlayerLoginRsp extends BasePacket {
private static QueryCurrRegionHttpRspOuterClass.QueryCurrRegionHttpRsp regionCache;
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.props.PlayerProperty;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerPropNotifyOuterClass.PlayerPropNotify;
import emu.grasscutter.utils.ProtoHelper;
public class PacketPlayerPropNotify extends GenshinPacket {
public class PacketPlayerPropNotify extends BasePacket {
public PacketPlayerPropNotify(GenshinPlayer player, PlayerProperty prop) {
public PacketPlayerPropNotify(Player player, PlayerProperty prop) {
super(PacketOpcodes.PlayerPropNotify);
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;
public class PacketPlayerSetPauseRsp extends GenshinPacket {
public class PacketPlayerSetPauseRsp extends BasePacket {
public PacketPlayerSetPauseRsp(int clientSequence) {
super(PacketOpcodes.PlayerSetPauseRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.GenshinConstants;
import emu.grasscutter.GameConstants;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.ItemOuterClass.Item;
import emu.grasscutter.net.proto.PlayerStoreNotifyOuterClass.PlayerStoreNotify;
import emu.grasscutter.net.proto.StoreTypeOuterClass.StoreType;
public class PacketPlayerStoreNotify extends GenshinPacket {
public class PacketPlayerStoreNotify extends BasePacket {
public PacketPlayerStoreNotify(GenshinPlayer player) {
public PacketPlayerStoreNotify(Player player) {
super(PacketOpcodes.PlayerStoreNotify);
this.buildHeader(2);
......@@ -21,7 +21,7 @@ public class PacketPlayerStoreNotify extends GenshinPacket {
.setStoreType(StoreType.STORE_PACK)
.setWeightLimit(Grasscutter.getConfig().getGameServerOptions().InventoryLimitAll);
for (GenshinItem item : player.getInventory()) {
for (GameItem item : player.getInventory()) {
Item itemProto = item.toProto();
p.addItemList(itemProto);
}
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.Player;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerTimeNotifyOuterClass.PlayerTimeNotify;
public class PacketPlayerTimeNotify extends GenshinPacket {
public class PacketPlayerTimeNotify extends BasePacket {
public PacketPlayerTimeNotify(GenshinPlayer player) {
public PacketPlayerTimeNotify(Player player) {
super(PacketOpcodes.PlayerTimeNotify);
PlayerTimeNotify proto = PlayerTimeNotify.newBuilder()
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.game.Player;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PostEnterSceneRspOuterClass.PostEnterSceneRsp;
public class PacketPostEnterSceneRsp extends GenshinPacket {
public class PacketPostEnterSceneRsp extends BasePacket {
public PacketPostEnterSceneRsp(GenshinPlayer player) {
public PacketPostEnterSceneRsp(Player player) {
super(PacketOpcodes.PostEnterSceneRsp);
PostEnterSceneRsp p = PostEnterSceneRsp.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.ChatInfoOuterClass.ChatInfo;
import emu.grasscutter.net.proto.PrivateChatNotifyOuterClass.PrivateChatNotify;
public class PacketPrivateChatNotify extends GenshinPacket {
public class PacketPrivateChatNotify extends BasePacket {
public PacketPrivateChatNotify(int senderId, int recvId, String message) {
super(PacketOpcodes.PrivateChatNotify);
......
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