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.GetAuthkeyRspOuterClass.GetAuthkeyRsp;
import emu.grasscutter.net.proto.RetcodeOuterClass;
public class PacketGetAuthkeyRsp extends GenshinPacket {
public class PacketGetAuthkeyRsp extends BasePacket {
public PacketGetAuthkeyRsp() {
super(PacketOpcodes.GetAuthkeyRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.gacha.GachaManager;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
public class PacketGetGachaInfoRsp extends GenshinPacket {
public class PacketGetGachaInfoRsp extends BasePacket {
public PacketGetGachaInfoRsp(GachaManager manager) {
super(PacketOpcodes.GetGachaInfoRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.data.GenshinData;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.data.GameData;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.Mail;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.game.props.ActionReason;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.EquipParamOuterClass;
import emu.grasscutter.net.proto.GetMailItemRspOuterClass.GetMailItemRsp;
......@@ -14,9 +14,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class PacketGetMailItemRsp extends GenshinPacket {
public class PacketGetMailItemRsp extends BasePacket {
public PacketGetMailItemRsp(GenshinPlayer player, List<Integer> mailList) {
public PacketGetMailItemRsp(Player player, List<Integer> mailList) {
super(PacketOpcodes.GetMailItemRsp);
List<Mail> claimedMessages = new ArrayList<>();
......@@ -50,11 +50,11 @@ public class PacketGetMailItemRsp extends GenshinPacket {
item.setPromoteLevel(promoteLevel);
claimedItems.add(item.build());
GenshinItem genshinItem = new GenshinItem(GenshinData.getItemDataMap().get(mailItem.itemId));
genshinItem.setCount(mailItem.itemCount);
genshinItem.setLevel(mailItem.itemLevel);
genshinItem.setPromoteLevel(promoteLevel);
player.getInventory().addItem(genshinItem, ActionReason.MailAttachment);
GameItem gameItem = new GameItem(GameData.getItemDataMap().get(mailItem.itemId));
gameItem.setCount(mailItem.itemCount);
gameItem.setLevel(mailItem.itemLevel);
gameItem.setPromoteLevel(promoteLevel);
player.getInventory().addItem(gameItem, ActionReason.MailAttachment);
}
message.isAttachmentGot = true;
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.friends.Friendship;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.GetPlayerAskFriendListRspOuterClass.GetPlayerAskFriendListRsp;
public class PacketGetPlayerAskFriendListRsp extends GenshinPacket {
public class PacketGetPlayerAskFriendListRsp extends BasePacket {
public PacketGetPlayerAskFriendListRsp(GenshinPlayer player) {
public PacketGetPlayerAskFriendListRsp(Player player) {
super(PacketOpcodes.GetPlayerAskFriendListRsp);
GetPlayerAskFriendListRsp.Builder proto = GetPlayerAskFriendListRsp.newBuilder();
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.GenshinConstants;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.GameConstants;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.friends.Friendship;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.FriendBriefOuterClass.FriendBrief;
import emu.grasscutter.net.proto.FriendOnlineStateOuterClass.FriendOnlineState;
......@@ -11,16 +11,16 @@ import emu.grasscutter.net.proto.GetPlayerFriendListRspOuterClass.GetPlayerFrien
import emu.grasscutter.net.proto.HeadImageOuterClass.HeadImage;
import emu.grasscutter.net.proto.PlatformTypeOuterClass;
public class PacketGetPlayerFriendListRsp extends GenshinPacket {
public class PacketGetPlayerFriendListRsp extends BasePacket {
public PacketGetPlayerFriendListRsp(GenshinPlayer player) {
public PacketGetPlayerFriendListRsp(Player player) {
super(PacketOpcodes.GetPlayerFriendListRsp);
FriendBrief serverFriend = FriendBrief.newBuilder()
.setUid(GenshinConstants.SERVER_CONSOLE_UID)
.setUid(GameConstants.SERVER_CONSOLE_UID)
.setNickname("Server")
.setLevel(1)
.setAvatarId(HeadImage.newBuilder().setAvatarId(GenshinConstants.MAIN_CHARACTER_FEMALE).getAvatarId())
.setAvatarId(HeadImage.newBuilder().setAvatarId(GameConstants.MAIN_CHARACTER_FEMALE).getAvatarId())
.setWorldLevel(0)
.setSignature("")
.setLastActiveTime((int) (System.currentTimeMillis() / 1000f))
......
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.GetPlayerSocialDetailRspOuterClass.GetPlayerSocialDetailRsp;
import emu.grasscutter.net.proto.RetcodeOuterClass;
import emu.grasscutter.net.proto.SocialDetailOuterClass.SocialDetail;
public class PacketGetPlayerSocialDetailRsp extends GenshinPacket {
public class PacketGetPlayerSocialDetailRsp extends BasePacket {
public PacketGetPlayerSocialDetailRsp(SocialDetail.Builder detail) {
super(PacketOpcodes.GetPlayerSocialDetailRsp);
......
......@@ -2,13 +2,13 @@ package emu.grasscutter.server.packet.send;
import com.google.protobuf.ByteString;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.GetPlayerTokenRspOuterClass.GetPlayerTokenRsp;
import emu.grasscutter.server.game.GameSession;
import emu.grasscutter.utils.Crypto;
public class PacketGetPlayerTokenRsp extends GenshinPacket {
public class PacketGetPlayerTokenRsp extends BasePacket {
public PacketGetPlayerTokenRsp(GameSession session, boolean doesPlayerExist) {
super(PacketOpcodes.GetPlayerTokenRsp, true);
......
......@@ -3,12 +3,12 @@ package emu.grasscutter.server.packet.send;
import java.util.Arrays;
import java.util.stream.Collectors;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.CityInfoOuterClass.CityInfo;
import emu.grasscutter.net.proto.GetSceneAreaRspOuterClass.GetSceneAreaRsp;
public class PacketGetSceneAreaRsp extends GenshinPacket {
public class PacketGetSceneAreaRsp extends BasePacket {
public PacketGetSceneAreaRsp(int sceneId) {
super(PacketOpcodes.GetSceneAreaRsp);
......
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.GetScenePointRspOuterClass.GetScenePointRsp;
public class PacketGetScenePointRsp extends GenshinPacket {
public class PacketGetScenePointRsp extends BasePacket {
public PacketGetScenePointRsp(int sceneId) {
super(PacketOpcodes.GetScenePointRsp);
......
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.GetShopRspOuterClass.GetShopRsp;
import emu.grasscutter.net.proto.ShopOuterClass.Shop;
public class PacketGetShopRsp extends GenshinPacket {
public class PacketGetShopRsp extends BasePacket {
public PacketGetShopRsp(int shopType) {
super(PacketOpcodes.GetShopRsp);
......
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.GetShopmallDataRspOuterClass.GetShopmallDataRsp;
public class PacketGetShopmallDataRsp extends GenshinPacket {
public class PacketGetShopmallDataRsp extends BasePacket {
public PacketGetShopmallDataRsp() {
super(PacketOpcodes.GetShopmallDataRsp);
......
package emu.grasscutter.server.packet.send;
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.GetWorldMpInfoRspOuterClass.GetWorldMpInfoRsp;
public class PacketGetWorldMpInfoRsp extends GenshinPacket {
public class PacketGetWorldMpInfoRsp extends BasePacket {
public PacketGetWorldMpInfoRsp(World world) {
super(PacketOpcodes.GetWorldMpInfoRsp);
......
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.H5ActivityIdsNotifyOuterClass.H5ActivityIdsNotify;
public class PacketH5ActivityIdsNotify extends GenshinPacket {
public class PacketH5ActivityIdsNotify extends BasePacket {
public PacketH5ActivityIdsNotify() {
super(PacketOpcodes.H5ActivityIdsNotify);
......
package emu.grasscutter.server.packet.send;
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.HostPlayerNotifyOuterClass.HostPlayerNotify;
public class PacketHostPlayerNotify extends GenshinPacket {
public class PacketHostPlayerNotify extends BasePacket {
public PacketHostPlayerNotify(World world) {
super(PacketOpcodes.HostPlayerNotify);
......
......@@ -3,15 +3,15 @@ package emu.grasscutter.server.packet.send;
import java.util.Collection;
import java.util.List;
import emu.grasscutter.game.inventory.GenshinItem;
import emu.grasscutter.game.inventory.GameItem;
import emu.grasscutter.game.props.ActionReason;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.ItemAddHintNotifyOuterClass.ItemAddHintNotify;
public class PacketItemAddHintNotify extends GenshinPacket {
public class PacketItemAddHintNotify extends BasePacket {
public PacketItemAddHintNotify(GenshinItem item, ActionReason reason) {
public PacketItemAddHintNotify(GameItem item, ActionReason reason) {
super(PacketOpcodes.ItemAddHintNotify);
ItemAddHintNotify proto = ItemAddHintNotify.newBuilder()
......@@ -22,13 +22,13 @@ public class PacketItemAddHintNotify extends GenshinPacket {
this.setData(proto);
}
public PacketItemAddHintNotify(Collection<GenshinItem> items, ActionReason reason) {
public PacketItemAddHintNotify(Collection<GameItem> items, ActionReason reason) {
super(PacketOpcodes.ItemAddHintNotify);
ItemAddHintNotify.Builder proto = ItemAddHintNotify.newBuilder()
.setReason(reason.getValue());
for (GenshinItem item : items) {
for (GameItem item : items) {
proto.addItemList(item.toItemHintProto());
}
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.entity.GenshinEntity;
import emu.grasscutter.game.entity.GameEntity;
import emu.grasscutter.game.props.LifeState;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.LifeStateChangeNotifyOuterClass.LifeStateChangeNotify;
public class PacketLifeStateChangeNotify extends GenshinPacket {
public PacketLifeStateChangeNotify(GenshinEntity attacker, GenshinEntity target, LifeState lifeState) {
public class PacketLifeStateChangeNotify extends BasePacket {
public PacketLifeStateChangeNotify(GameEntity attacker, GameEntity 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, GenshinEntity target, LifeState lifeState) {
public PacketLifeStateChangeNotify(int attackerId, GameEntity target, LifeState lifeState) {
super(PacketOpcodes.LifeStateChangeNotify);
LifeStateChangeNotify proto = LifeStateChangeNotify.newBuilder()
......
......@@ -2,26 +2,26 @@ package emu.grasscutter.server.packet.send;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.GenshinPlayer;
import emu.grasscutter.game.Player;
import emu.grasscutter.game.Mail;
import emu.grasscutter.net.packet.GenshinPacket;
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 GenshinPacket {
public class PacketMailChangeNotify extends BasePacket {
public PacketMailChangeNotify(GenshinPlayer player, Mail message) {
public PacketMailChangeNotify(Player player, Mail message) {
this (player, new ArrayList<Mail>(){{add(message);}});
}
public PacketMailChangeNotify(GenshinPlayer player, List<Mail> mailList) {
public PacketMailChangeNotify(Player player, List<Mail> mailList) {
this(player, mailList, null);
}
public PacketMailChangeNotify(GenshinPlayer player, List<Mail> mailList, List<Integer> delMailIdList) {
public PacketMailChangeNotify(Player player, List<Mail> mailList, List<Integer> delMailIdList) {
super(PacketOpcodes.MailChangeNotify);
MailChangeNotifyOuterClass.MailChangeNotify.Builder proto = MailChangeNotifyOuterClass.MailChangeNotify.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.NpcTalkRspOuterClass.NpcTalkRsp;
public class PacketNpcTalkRsp extends GenshinPacket {
public class PacketNpcTalkRsp extends BasePacket {
public PacketNpcTalkRsp(int npcEntityId, int curTalkId, int entityId) {
super(PacketOpcodes.NpcTalkRsp);
......
package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.props.OpenState;
import emu.grasscutter.net.packet.GenshinPacket;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.OpenStateUpdateNotifyOuterClass.OpenStateUpdateNotify;
public class PacketOpenStateUpdateNotify extends GenshinPacket {
public class PacketOpenStateUpdateNotify extends BasePacket {
public PacketOpenStateUpdateNotify() {
super(PacketOpcodes.OpenStateUpdateNotify);
......
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 PacketPathfindingEnterSceneRsp extends GenshinPacket {
public class PacketPathfindingEnterSceneRsp extends BasePacket {
public PacketPathfindingEnterSceneRsp(int clientSequence) {
super(PacketOpcodes.PathfindingEnterSceneRsp);
......
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