mirror of
https://github.com/Anime-Game-Servers/Grasscutter-Quests.git
synced 2024-11-26 22:10:26 +00:00
[Fix/Refactoring] Fixed SCRIPTS_OVERWRITES_PATH and remove some old code from Player and PlayerCodex
This commit is contained in:
parent
2fa8867db5
commit
07df4a1315
@ -1339,20 +1339,6 @@ public class Player {
|
||||
}
|
||||
|
||||
public void onLogin() {
|
||||
// Quest - Commented out because a problem is caused if you log out while this quest is active
|
||||
/*
|
||||
if (getQuestManager().getMainQuestById(351) == null) {
|
||||
GameQuest quest = getQuestManager().addQuest(35104);
|
||||
if (quest != null) {
|
||||
quest.finish();
|
||||
}
|
||||
getQuestManager().addQuest(35101);
|
||||
|
||||
this.setSceneId(3);
|
||||
this.getPos().set(GameConstants.START_POSITION);
|
||||
}
|
||||
*/
|
||||
|
||||
// Create world
|
||||
World world = new World(this);
|
||||
world.addPlayer(this);
|
||||
|
@ -45,7 +45,6 @@ public class PlayerCodex {
|
||||
|
||||
public void setPlayer(Player player) {
|
||||
this.player = player;
|
||||
this.fixReliquaries();
|
||||
}
|
||||
|
||||
public void checkAddedItem(GameItem item) {
|
||||
@ -113,18 +112,4 @@ public class PlayerCodex {
|
||||
this.player.sendPacket(new PacketCodexDataUpdateNotify(8, id));
|
||||
});
|
||||
}
|
||||
|
||||
@Deprecated // Maybe remove this if we ever stop caring about older dbs
|
||||
private void fixReliquaries() {
|
||||
// Migrate older database entries which were using non-canonical forms of itemIds
|
||||
val newReliquaries = new HashSet<Integer>();
|
||||
this.unlockedReliquary.forEach(i -> newReliquaries.add((i/10)*10));
|
||||
this.unlockedReliquary = newReliquaries;
|
||||
|
||||
GameData.getCodexReliquaryArrayList().stream()
|
||||
.filter(x -> !this.getUnlockedReliquarySuitCodex().contains(x.getId()))
|
||||
.filter(x -> this.getUnlockedReliquary().containsAll(x.getIds()))
|
||||
.forEach(x -> this.getUnlockedReliquarySuitCodex().add(x.getId()));
|
||||
this.player.save();
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public final class FileUtils {
|
||||
return SCRIPTS_PATH.resolve(path);
|
||||
}
|
||||
public static Path getScriptOverwritePath(String path) {
|
||||
return SCRIPTS_PATH.resolve(path);
|
||||
return SCRIPTS_OVERWRITES_PATH.resolve(path);
|
||||
}
|
||||
|
||||
public static void write(String dest, byte[] bytes) {
|
||||
|
Loading…
Reference in New Issue
Block a user