ghostId fixes

This commit is contained in:
vvo
2024-11-01 22:40:36 +08:00
parent 5179e79ca5
commit 7fe1b0536e
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -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.
+2 -1
View File
@@ -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
}