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; 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.packet.PacketOpcodes;
import emu.grasscutter.net.proto.WearEquipRspOuterClass.WearEquipRsp; import emu.grasscutter.net.proto.WearEquipRspOuterClass.WearEquipRsp;
public class PacketWearEquipRsp extends GenshinPacket { public class PacketWearEquipRsp extends BasePacket {
public PacketWearEquipRsp(long avatarGuid, long equipGuid) { public PacketWearEquipRsp(long avatarGuid, long equipGuid) {
super(PacketOpcodes.WearEquipRsp); super(PacketOpcodes.WearEquipRsp);
......
package emu.grasscutter.server.packet.send; package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.World; 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.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PropValueOuterClass.PropValue; import emu.grasscutter.net.proto.PropValueOuterClass.PropValue;
import emu.grasscutter.net.proto.WorldDataNotifyOuterClass.WorldDataNotify; import emu.grasscutter.net.proto.WorldDataNotifyOuterClass.WorldDataNotify;
public class PacketWorldDataNotify extends GenshinPacket { public class PacketWorldDataNotify extends BasePacket {
public PacketWorldDataNotify(World world) { public PacketWorldDataNotify(World world) {
super(PacketOpcodes.WorldDataNotify); super(PacketOpcodes.WorldDataNotify);
......
package emu.grasscutter.server.packet.send; 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.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerDieTypeOuterClass.PlayerDieType; import emu.grasscutter.net.proto.PlayerDieTypeOuterClass.PlayerDieType;
import emu.grasscutter.net.proto.WorldPlayerDieNotifyOuterClass.WorldPlayerDieNotify; import emu.grasscutter.net.proto.WorldPlayerDieNotifyOuterClass.WorldPlayerDieNotify;
public class PacketWorldPlayerDieNotify extends GenshinPacket { public class PacketWorldPlayerDieNotify extends BasePacket {
public PacketWorldPlayerDieNotify(PlayerDieType playerDieType, int killerId) { public PacketWorldPlayerDieNotify(PlayerDieType playerDieType, int killerId) {
super(PacketOpcodes.WorldPlayerDieNotify); super(PacketOpcodes.WorldPlayerDieNotify);
......
package emu.grasscutter.server.packet.send; package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer; import emu.grasscutter.game.Player;
import emu.grasscutter.game.World; 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.packet.PacketOpcodes;
import emu.grasscutter.net.proto.WorldPlayerInfoNotifyOuterClass.WorldPlayerInfoNotify; import emu.grasscutter.net.proto.WorldPlayerInfoNotifyOuterClass.WorldPlayerInfoNotify;
public class PacketWorldPlayerInfoNotify extends GenshinPacket { public class PacketWorldPlayerInfoNotify extends BasePacket {
public PacketWorldPlayerInfoNotify(World world) { public PacketWorldPlayerInfoNotify(World world) {
super(PacketOpcodes.WorldPlayerInfoNotify); super(PacketOpcodes.WorldPlayerInfoNotify);
...@@ -14,7 +14,7 @@ public class PacketWorldPlayerInfoNotify extends GenshinPacket { ...@@ -14,7 +14,7 @@ public class PacketWorldPlayerInfoNotify extends GenshinPacket {
WorldPlayerInfoNotify.Builder proto = WorldPlayerInfoNotify.newBuilder(); WorldPlayerInfoNotify.Builder proto = WorldPlayerInfoNotify.newBuilder();
for (int i = 0; i < world.getPlayers().size(); i++) { for (int i = 0; i < world.getPlayers().size(); i++) {
GenshinPlayer p = world.getPlayers().get(i); Player p = world.getPlayers().get(i);
proto.addPlayerInfoList(p.getOnlinePlayerInfo()); proto.addPlayerInfoList(p.getOnlinePlayerInfo());
proto.addPlayerUidList(p.getUid()); proto.addPlayerUidList(p.getUid());
......
package emu.grasscutter.server.packet.send; package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer; import emu.grasscutter.game.Player;
import emu.grasscutter.game.World; 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.packet.PacketOpcodes;
import emu.grasscutter.net.proto.WorldPlayerLocationNotifyOuterClass.WorldPlayerLocationNotify; import emu.grasscutter.net.proto.WorldPlayerLocationNotifyOuterClass.WorldPlayerLocationNotify;
public class PacketWorldPlayerLocationNotify extends GenshinPacket { public class PacketWorldPlayerLocationNotify extends BasePacket {
public PacketWorldPlayerLocationNotify(World world) { public PacketWorldPlayerLocationNotify(World world) {
super(PacketOpcodes.WorldPlayerLocationNotify); super(PacketOpcodes.WorldPlayerLocationNotify);
WorldPlayerLocationNotify.Builder proto = WorldPlayerLocationNotify.newBuilder(); WorldPlayerLocationNotify.Builder proto = WorldPlayerLocationNotify.newBuilder();
for (GenshinPlayer p : world.getPlayers()) { for (Player p : world.getPlayers()) {
proto.addPlayerWorldLocList(p.getWorldPlayerLocationInfo()); proto.addPlayerWorldLocList(p.getWorldPlayerLocationInfo());
} }
......
package emu.grasscutter.server.packet.send; package emu.grasscutter.server.packet.send;
import emu.grasscutter.game.GenshinPlayer; import emu.grasscutter.game.Player;
import emu.grasscutter.game.World; 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.packet.PacketOpcodes;
import emu.grasscutter.net.proto.PlayerRTTInfoOuterClass.PlayerRTTInfo; import emu.grasscutter.net.proto.PlayerRTTInfoOuterClass.PlayerRTTInfo;
import emu.grasscutter.net.proto.WorldPlayerRTTNotifyOuterClass.WorldPlayerRTTNotify; import emu.grasscutter.net.proto.WorldPlayerRTTNotifyOuterClass.WorldPlayerRTTNotify;
public class PacketWorldPlayerRTTNotify extends GenshinPacket { public class PacketWorldPlayerRTTNotify extends BasePacket {
public PacketWorldPlayerRTTNotify(World world) { public PacketWorldPlayerRTTNotify(World world) {
super(PacketOpcodes.WorldPlayerRTTNotify); super(PacketOpcodes.WorldPlayerRTTNotify);
WorldPlayerRTTNotify.Builder proto = WorldPlayerRTTNotify.newBuilder(); WorldPlayerRTTNotify.Builder proto = WorldPlayerRTTNotify.newBuilder();
for (GenshinPlayer player : world.getPlayers()) { for (Player player : world.getPlayers()) {
proto.addPlayerRttList( proto.addPlayerRttList(
PlayerRTTInfo.newBuilder() PlayerRTTInfo.newBuilder()
.setUid(player.getUid()) .setUid(player.getUid())
......
...@@ -2,7 +2,7 @@ package emu.grasscutter.task; ...@@ -2,7 +2,7 @@ package emu.grasscutter.task;
import emu.grasscutter.Grasscutter; import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.Account; import emu.grasscutter.game.Account;
import emu.grasscutter.game.GenshinPlayer; import emu.grasscutter.game.Player;
import org.quartz.CronScheduleBuilder; import org.quartz.CronScheduleBuilder;
import org.quartz.CronTrigger; import org.quartz.CronTrigger;
......
package emu.grasscutter.task.tasks; package emu.grasscutter.task.tasks;
import emu.grasscutter.database.DatabaseManager; import emu.grasscutter.database.DatabaseManager;
import emu.grasscutter.game.GenshinPlayer; import emu.grasscutter.game.Player;
import emu.grasscutter.task.Task; import emu.grasscutter.task.Task;
import emu.grasscutter.task.TaskHandler; import emu.grasscutter.task.TaskHandler;
...@@ -15,8 +15,8 @@ import org.quartz.JobExecutionException; ...@@ -15,8 +15,8 @@ import org.quartz.JobExecutionException;
public final class MoonCard implements TaskHandler { public final class MoonCard implements TaskHandler {
@Override @Override
public void execute(JobExecutionContext context) throws JobExecutionException { public void execute(JobExecutionContext context) throws JobExecutionException {
List<GenshinPlayer> players = DatabaseManager.getDatastore().find(GenshinPlayer.class).stream().toList(); List<Player> players = DatabaseManager.getDatastore().find(Player.class).stream().toList();
for (GenshinPlayer player : players) { for (Player player : players) {
if (player.isOnline()) { if (player.isOnline()) {
if (player.inMoonCard()) { if (player.inMoonCard()) {
player.getTodayMoonCard(); player.getTodayMoonCard();
......
...@@ -18,9 +18,9 @@ import java.util.stream.Collectors; ...@@ -18,9 +18,9 @@ import java.util.stream.Collectors;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import emu.grasscutter.GenshinConstants; import emu.grasscutter.GameConstants;
import emu.grasscutter.Grasscutter; import emu.grasscutter.Grasscutter;
import emu.grasscutter.data.GenshinData; import emu.grasscutter.data.GameData;
import emu.grasscutter.data.ResourceLoader; import emu.grasscutter.data.ResourceLoader;
import emu.grasscutter.data.def.AvatarData; import emu.grasscutter.data.def.AvatarData;
import emu.grasscutter.data.def.ItemData; import emu.grasscutter.data.def.ItemData;
...@@ -45,48 +45,48 @@ public final class Tools { ...@@ -45,48 +45,48 @@ public final class Tools {
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss"); DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
writer.println("// Genshin Impact " + GenshinConstants.VERSION + " GM Handbook"); writer.println("// Grasscutter " + GameConstants.VERSION + " GM Handbook");
writer.println("// Created " + dtf.format(now) + System.lineSeparator() + System.lineSeparator()); writer.println("// Created " + dtf.format(now) + System.lineSeparator() + System.lineSeparator());
list = new ArrayList<>(GenshinData.getAvatarDataMap().keySet()); list = new ArrayList<>(GameData.getAvatarDataMap().keySet());
Collections.sort(list); Collections.sort(list);
writer.println("// Avatars"); writer.println("// Avatars");
for (Integer id : list) { for (Integer id : list) {
AvatarData data = GenshinData.getAvatarDataMap().get(id); AvatarData data = GameData.getAvatarDataMap().get(id);
writer.println(data.getId() + " : " + map.get(data.getNameTextMapHash())); writer.println(data.getId() + " : " + map.get(data.getNameTextMapHash()));
} }
writer.println(); writer.println();
list = new ArrayList<>(GenshinData.getItemDataMap().keySet()); list = new ArrayList<>(GameData.getItemDataMap().keySet());
Collections.sort(list); Collections.sort(list);
writer.println("// Items"); writer.println("// Items");
for (Integer id : list) { for (Integer id : list) {
ItemData data = GenshinData.getItemDataMap().get(id); ItemData data = GameData.getItemDataMap().get(id);
writer.println(data.getId() + " : " + map.get(data.getNameTextMapHash())); writer.println(data.getId() + " : " + map.get(data.getNameTextMapHash()));
} }
writer.println(); writer.println();
writer.println("// Scenes"); writer.println("// Scenes");
list = new ArrayList<>(GenshinData.getSceneDataMap().keySet()); list = new ArrayList<>(GameData.getSceneDataMap().keySet());
Collections.sort(list); Collections.sort(list);
for (Integer id : list) { for (Integer id : list) {
SceneData data = GenshinData.getSceneDataMap().get(id); SceneData data = GameData.getSceneDataMap().get(id);
writer.println(data.getId() + " : " + data.getScriptData()); writer.println(data.getId() + " : " + data.getScriptData());
} }
writer.println(); writer.println();
writer.println("// Monsters"); writer.println("// Monsters");
list = new ArrayList<>(GenshinData.getMonsterDataMap().keySet()); list = new ArrayList<>(GameData.getMonsterDataMap().keySet());
Collections.sort(list); Collections.sort(list);
for (Integer id : list) { for (Integer id : list) {
MonsterData data = GenshinData.getMonsterDataMap().get(id); MonsterData data = GameData.getMonsterDataMap().get(id);
writer.println(data.getId() + " : " + map.get(data.getNameTextMapHash())); writer.println(data.getId() + " : " + map.get(data.getNameTextMapHash()));
} }
} }
......
...@@ -174,11 +174,11 @@ public final class Utils { ...@@ -174,11 +174,11 @@ public final class Utils {
// Check for resources folder. // Check for resources folder.
if(!fileExists(resourcesFolder)) { if(!fileExists(resourcesFolder)) {
logger.info("Creating resources folder..."); logger.info("Creating resources folder...");
logger.info("Place a copy of 'GenshinData' in the resources folder."); logger.info("Place a copy of 'BinOutput' and 'ExcelBinOutput' in the resources folder.");
createFolder(resourcesFolder); exit = true; createFolder(resourcesFolder); exit = true;
} }
// Check for GenshinData. // Check for BinOutput + ExcelBinOuput.
if(!fileExists(resourcesFolder + "BinOutput") || if(!fileExists(resourcesFolder + "BinOutput") ||
!fileExists(resourcesFolder + "ExcelBinOutput")) { !fileExists(resourcesFolder + "ExcelBinOutput")) {
logger.info("Place a copy of 'BinOutput' and 'ExcelBinOutput' in the resources folder."); logger.info("Place a copy of 'BinOutput' and 'ExcelBinOutput' in the resources folder.");
......
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