Fix relics generating with a sub affix that was the same type as the main affix

This commit is contained in:
Melledy
2023-10-05 04:31:00 -07:00
parent d4173607df
commit 43cc616896
2 changed files with 6 additions and 3 deletions

View File

@@ -43,7 +43,6 @@ public class GameData {
private static Int2ObjectMap<EquipmentExpTypeExcel> equipmentExpTypeExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<RelicExpTypeExcel> relicExpTypeExcelMap = new Int2ObjectOpenHashMap<>();
@Getter
private static Int2ObjectMap<RelicMainAffixExcel> relicMainAffixExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<RelicSubAffixExcel> relicSubAffixExcelMap = new Int2ObjectOpenHashMap<>();
@@ -102,9 +101,13 @@ public class GameData {
var excel = relicExpTypeExcelMap.get((expGroup << 16) + level);
return excel != null ? excel.getExp() : 0;
}
public static RelicMainAffixExcel getRelicMainAffixExcel(int groupId, int affixId) {
return relicMainAffixExcelMap.get((groupId << 16) + affixId);
}
public static RelicSubAffixExcel getRelicSubAffixExcel(int groupId, int affixId) {
return relicSubAffixExcelMap.get((groupId << 8) + affixId);
return relicSubAffixExcelMap.get((groupId << 16) + affixId);
}
public static FloorInfo getFloorInfo(int planeId, int floorId) {

View File

@@ -165,7 +165,7 @@ public class GameItem {
// Blacklist main affix and any sub affixes
AvatarPropertyType mainAffixProperty = AvatarPropertyType.Unknown;
RelicMainAffixExcel mainAffix = GameData.getRelicMainAffixExcelMap().get(this.mainAffix);
RelicMainAffixExcel mainAffix = GameData.getRelicMainAffixExcel(getExcel().getRelicExcel().getMainAffixGroup(), this.mainAffix);
if (mainAffix != null) {
mainAffixProperty = mainAffix.getProperty();
}