Skip to content

Commit

Permalink
Update classes to match protos
Browse files Browse the repository at this point in the history
  • Loading branch information
4Benj authored and Birdulon committed Aug 24, 2022
1 parent d575d1c commit c096d25
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public BattlePassSchedule getScheduleProto() {
.setEndTime(2059483200)
.setIsViewed(this.isViewed())
.setUnlockStatus(this.isPaid() ? BattlePassUnlockStatus.BATTLE_PASS_UNLOCK_STATUS_PAID : BattlePassUnlockStatus.BATTLE_PASS_UNLOCK_STATUS_FREE)
.setJPFMGBEBBBJ(2) // Not bought on Playstation.
.setUnk2700ODHAAHEPFAG(2) // Not bought on Playstation.
.setCurCyclePoints(this.getCyclePoints())
.setCurCycle(BattlePassCycle.newBuilder()
.setBeginTime(0)
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/emu/grasscutter/game/quest/GameMainQuest.java
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ public void tryFinishSubQuests(QuestTrigger condType, String paramStr, int... pa
public void save() {
DatabaseHelper.saveQuest(this);
}

public void delete() {
DatabaseHelper.deleteQuest(this);
}
Expand All @@ -356,7 +356,6 @@ public ParentQuest toProto() {
.setParentQuestId(getParentQuestId())
.setIsFinished(isFinished());


proto.setParentQuestState(getState().getValue())
.setCutsceneEncryptionKey(QuestManager.getQuestKey(parentQuestId));
for (GameQuest quest : this.getChildQuests().values()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ public void handle(GameSession session, byte[] header, byte[] payload) throws Ex
var handler = (MusicGameActivityHandler) playerData.get().getActivityHandler();
boolean isNewRecord = false;
// check if custom beatmap
if(req.getMusicShareId() == 0){

// TODO: PROTO IS OBFUSCATED, NEED TO GET PROPER VALUES.
// Discovered: 23/08/2022.
// Probably was an issue in 2.8 but was discovered in 3.0 port.
// - Benj

/*if(req.getMusicShareId() == 0){
session.getPlayer().getActivityManager().triggerWatcher(
WatcherTriggerType.TRIGGER_FLEUR_FAIR_MUSIC_GAME_REACH_SCORE,
String.valueOf(req.getMusicBasicId()),
Expand All @@ -52,7 +58,7 @@ public void handle(GameSession session, byte[] header, byte[] payload) throws Ex
}
session.send(new PacketMusicGameSettleRsp(req.getMusicBasicId(), req.getMusicShareId(), isNewRecord));
session.send(new PacketMusicGameSettleRsp(req.getMusicBasicId(), req.getMusicShareId(), isNewRecord));*/
}

}

0 comments on commit c096d25

Please sign in to comment.