Fix mirror tower stages; fix tower time challenge and star scoring (#2406)

This commit is contained in:
longfruit
2023-10-19 06:18:12 -07:00
committed by GitHub
Unverified
parent bc8e7c21ce
commit f5703e5964
13 changed files with 264 additions and 53 deletions
@@ -6,27 +6,37 @@ import emu.grasscutter.net.proto.TowerLevelStarCondNotifyOuterClass.TowerLevelSt
public class PacketTowerLevelStarCondNotify extends BasePacket {
public PacketTowerLevelStarCondNotify(int floorId, int levelIndex) {
public PacketTowerLevelStarCondNotify(int floorId, int levelIndex, int lostStar) {
super(PacketOpcodes.TowerLevelStarCondNotify);
TowerLevelStarCondNotify proto =
TowerLevelStarCondNotify.newBuilder()
.setFloorId(floorId)
.setLevelIndex(levelIndex)
.addCondDataList(
TowerLevelStarCondData.newBuilder()
// .setCondValue(1)
.build())
.addCondDataList(
TowerLevelStarCondData.newBuilder()
// .setCondValue(2)
.build())
.addCondDataList(
TowerLevelStarCondData.newBuilder()
// .setCondValue(3)
.build())
.build();
var proto = TowerLevelStarCondNotify.newBuilder()
.setFloorId(floorId)
.setLevelIndex(levelIndex);
this.setData(proto);
if (1 <= lostStar && lostStar <= 3) {
proto.addCondDataList(
TowerLevelStarCondData.newBuilder()
// If these are still obfuscated in the next client version,
// just set all int fields to the star (1 <= star <= 3)
// that failed and set all boolean fields to true.
.setNGHNFHCLFBH(lostStar)
.setIBGHBFANCBK(true)
.setOILLLBMMABH(true)
.setOMOECEGOALC(lostStar)
.build());
} else {
proto
.addCondDataList(
TowerLevelStarCondData.newBuilder()
.build())
.addCondDataList(
TowerLevelStarCondData.newBuilder()
.build())
.addCondDataList(
TowerLevelStarCondData.newBuilder()
.build());
}
this.setData(proto.build());
}
}