diff --git a/src/main/java/emu/nebula/game/gacha/GachaHistoryLog.java b/src/main/java/emu/nebula/game/gacha/GachaHistoryLog.java index 11eb706..c365cbe 100644 --- a/src/main/java/emu/nebula/game/gacha/GachaHistoryLog.java +++ b/src/main/java/emu/nebula/game/gacha/GachaHistoryLog.java @@ -10,6 +10,7 @@ import lombok.Getter; @Entity(value = "banner_info", useDiscriminator = false) public class GachaHistoryLog { private int type; + private int gid; private long time; private IntList ids; @@ -18,8 +19,9 @@ public class GachaHistoryLog { } - public GachaHistoryLog(int type, IntList results) { + public GachaHistoryLog(int type, int gachaId, IntList results) { this.type = type; + this.gid = gachaId; this.time = Nebula.getCurrentTime(); this.ids = results; } @@ -28,7 +30,7 @@ public class GachaHistoryLog { public GachaHistory toProto() { var proto = GachaHistory.newInstance() - .setGid(this.getType()) + .setGid(this.getGid()) .setTime(this.getTime()); for (int id : this.getIds()) { diff --git a/src/main/java/emu/nebula/game/gacha/GachaModule.java b/src/main/java/emu/nebula/game/gacha/GachaModule.java index 98c3e9c..6f82b32 100644 --- a/src/main/java/emu/nebula/game/gacha/GachaModule.java +++ b/src/main/java/emu/nebula/game/gacha/GachaModule.java @@ -162,7 +162,7 @@ public class GachaModule extends GameContextModule { player.getGachaManager().saveBanner(info); // Add history - var log = new GachaHistoryLog(data.getGachaType(), results); + var log = new GachaHistoryLog(data.getStorageId(), data.getId(), results); player.getGachaManager().addGachaHistory(log); // Trigger achievements