Skip to content

Commit

Permalink
Merge pull request #98 from Rollphes/develop
Browse files Browse the repository at this point in the history
v1.2.2
  • Loading branch information
Rollphes committed Apr 30, 2024
2 parents 27e70cf + 3bc7d72 commit 0fff617
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "genshin-manager",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "https://rollphes.github.io/genshin-manager/",
"bugs": "https://github.com/Rollphes/genshin-manager/issues",
"main": "dist/index.js",
Expand Down
50 changes: 26 additions & 24 deletions src/models/DailyFarming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,34 +89,36 @@ export class DailyFarming {
(d) => d.type === 'DUNGEN_ENTRY_TYPE_WEAPON_PROMOTE',
)

;[...weaponDomains, ...skillDomains].forEach((domain) => {
const materialIds = (domain.descriptionCycleRewardList as number[][])[
rewardDateIndex
]
for (let i = 0; i < (dayOfWeek === 0 ? 3 : 0); i++) {
;[...weaponDomains, ...skillDomains].forEach((domain) => {
const materialIds = (domain.descriptionCycleRewardList as number[][])[
dayOfWeek === 0 ? i : rewardDateIndex
]

const nameTextId = Object.keys(DailyFarming.replaceTextMapIdMap).includes(
String(domain.dungeonEntryId),
)
? DailyFarming.replaceTextMapIdMap[domain.dungeonEntryId as number]
: `UI_DUNGEON_ENTRY_${domain.dungeonEntryId as number}`
const nameTextId = Object.keys(
DailyFarming.replaceTextMapIdMap,
).includes(String(domain.dungeonEntryId))
? DailyFarming.replaceTextMapIdMap[domain.dungeonEntryId as number]
: `UI_DUNGEON_ENTRY_${domain.dungeonEntryId as number}`

const manualTextJson = Client._getJsonFromCachedExcelBinOutput(
'ManualTextMapConfigData',
nameTextId,
)
const manualTextJson = Client._getJsonFromCachedExcelBinOutput(
'ManualTextMapConfigData',
nameTextId,
)

this.domains.push({
name:
Client.cachedTextMap.get(
String(manualTextJson.textMapContentTextMapHash),
) || '',
description:
Client.cachedTextMap.get(String(domain.descTextMapHash)) || '',
materialIds: materialIds,
characterInfos: this.getCharacterInfoByMaterialIds(materialIds),
weaponIds: this.getWeaponIdsByMaterialIds(materialIds),
this.domains.push({
name:
Client.cachedTextMap.get(
String(manualTextJson.textMapContentTextMapHash),
) || '',
description:
Client.cachedTextMap.get(String(domain.descTextMapHash)) || '',
materialIds: materialIds,
characterInfos: this.getCharacterInfoByMaterialIds(materialIds),
weaponIds: this.getWeaponIdsByMaterialIds(materialIds),
})
})
})
}

this.talentBookIds = skillDomains.flatMap(
(d) => (d.descriptionCycleRewardList as number[][])[rewardDateIndex],
Expand Down

0 comments on commit 0fff617

Please sign in to comment.