Persist unlocked blueprints to the database.

This commit is contained in:
ImmuState
2022-06-02 15:06:08 -07:00
committed by Melledy
parent f243c10157
commit e140284d37
3 changed files with 12 additions and 7 deletions

View File

@@ -1,13 +1,9 @@
package emu.grasscutter.server.packet.send;
import java.util.List;
import dev.morphia.AdvancedDatastore;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.net.packet.BasePacket;
import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.net.proto.ForgeDataNotifyOuterClass.ForgeDataNotify;
import emu.grasscutter.net.proto.ForgeQueueDataOuterClass.ForgeQueueData;
public class PacketForgeDataNotify extends BasePacket {
@@ -22,10 +18,13 @@ public class PacketForgeDataNotify extends BasePacket {
: 1;
ForgeDataNotify proto = ForgeDataNotify.newBuilder()
.addAllForgeIdList(List.of(14017, 14009, 14008))
.addAllForgeIdList(player.getUnlockedForgingBlueprints())
.setMaxQueueNum(numQueues)
.build();
// ToDo: Add the information for the actual forging queues
// and ongoing forges.
this.setData(proto);
}
}