diff --git a/README.md b/README.md index 1bc8667..54dc60a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DanceDanceRevolution -**Plugin Version:** fork-mdx-3.0.3a +**Plugin Version:** fork-mdx-3.0.3b **Supported game versions:** WORLD (2024101500) @@ -26,9 +26,10 @@ musicdb.xml Usage Guide Changelog =========== -### fork-mdx-3.0.3a +### fork-mdx-3.0.3b - Fixed WebUI flare skill calculation mistake. +- Fixed getLastGhostId function. - Added "unlock all songs" option. - Still requires musicdb.xml to get the song ids. - Added Triple Tribe 4 event data. diff --git a/handlers/ddrworld.ts b/handlers/ddrworld.ts index 337872f..5b161a9 100644 --- a/handlers/ddrworld.ts +++ b/handlers/ddrworld.ts @@ -3,7 +3,8 @@ import { ProfileWorld, ScoreWorld, EventWorld, GhostWorld, RivalWorld, HiScoreWo import { SONGS_WORLD, SONGS_OVERRIDE_WORLD, EVENTS_WORLD, LEAGUE_WORLD, LOCKED_SONGS } from "../data/world"; function getLastGhostId(ghost: any) { - if(ghost.length > 0) return ghost.filter(a => (a.ghostId !== undefined)).sort((a, b) => b.ghostId - a.ghostId)[0].ghostId + let ghostFiltered = ghost.filter(a => (a.ghostId !== undefined)) + if(ghostFiltered.length > 0) return ghostFiltered.sort((a, b) => b.ghostId - a.ghostId)[0].ghostId else return 0 }