Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbfcf60ac7 | ||
|
|
c94b6cb36f | ||
|
|
7fe1b0536e | ||
|
|
5179e79ca5 | ||
|
|
8e862231c0 | ||
|
|
8465294b38 | ||
|
|
f6b0115fea | ||
|
|
d07f822f70 | ||
|
|
5ca14ab461 | ||
|
|
02a2c7d973 | ||
|
|
649a30a90e | ||
|
|
9996c5ead4 | ||
|
|
39d517ba5a | ||
|
|
97a9e65682 | ||
|
|
c9c59e0872 |
-13
@@ -1,13 +0,0 @@
|
||||
# Editor configs
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
# External modules
|
||||
node_modules
|
||||
|
||||
# Project files
|
||||
asphyxia-core.d.ts
|
||||
package.json
|
||||
package-lock.json
|
||||
typedoc.json
|
||||
tsconfig.json
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"endOfLine": "lf",
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"bracketSpacing": true,
|
||||
"arrowParens": "avoid",
|
||||
"quoteProps": "consistent"
|
||||
}
|
||||
@@ -1,25 +1,106 @@
|
||||
## Asphyxia Plugins
|
||||
|
||||
### Plugins included
|
||||
|
||||
1. [SOUND VOLTEX (KFC)](https://github.com/22vv0/asphyxia_plugins/tree/kfc)
|
||||
2. [DanceDanceRevolution (MDX)](https://github.com/22vv0/asphyxia_plugins/tree/mdx)
|
||||
|
||||
### Usage
|
||||
|
||||
1. Download the Asphyxia plugin of your choosing via one of two methods:
|
||||
- Method 1:
|
||||
1. Select the branch of the game plugin you want to use. Branch names use the game's codenames:
|
||||
- kfc for SDVX
|
||||
- mdx for DDR
|
||||
2. Click the green "Code" button and then click "Download ZIP" to start downloading.
|
||||
- Method 2:
|
||||
1. Go to the [Releases](https://github.com/22vv0/asphyxia_plugins/releases) page.
|
||||
2. Find the latest version release of the plugin for your game, indicated again by their codenames.
|
||||
3. Click "Source code (zip)" to start downloading.
|
||||
2. Once downloaded, open and extract the files inside the zip to your specific game plugin folder, overwriting any files.
|
||||
- If you're starting fresh, extract the files to a new folder named ddr@asphyxia or sdvx@asphyxia, depending on the plugin you've downloaded.
|
||||
|
||||
### Special thanks
|
||||
|
||||
1. Team Asphyxia for providing the plugins repo that I used as a starting point for this 'project' I started for fun.
|
||||
# DanceDanceRevolution
|
||||
|
||||
**Plugin Version:** fork-mdx-3.0.3d
|
||||
|
||||
**Supported game versions:** WORLD (2024101500)
|
||||
|
||||
**Required Asphyxia Core version** [1.50c](https://github.com/asphyxia-core/asphyxia-core.github.io/releases/tag/v1.50)
|
||||
|
||||
**Notes:**
|
||||
- This is a WIP plugin for DDR World and things might break so please use this at your own risk.
|
||||
- Please be aware that this plugin and the savefile it produces are incompatible with the official plugin, or any other forks. Please be cautious of using other plugins' savefiles with this fork of the plugin, or using this fork's savefile with other plugins.
|
||||
- Please back up your save data to prevent unwanted issues, especially while using this experimental plugin.
|
||||
- Please please please feel free to open PRs!
|
||||
|
||||
musicdb.xml Usage Guide
|
||||
===========
|
||||
1. Put your musicdb.xml file(s) in the _ddr@asphyxia/data_ directory.
|
||||
2. Configure plugin settings:
|
||||
- There are 2 related fields in the plugin settings:
|
||||
- **_musicdb.xml for musicdata\_load_**: mdb file where song difficulty and limited info will be retrieved. Set this config to the filename of the musicdb.xml file you copied. This file is required for other songs to appear.
|
||||
- **_musicdb.xml for WebUI_**: mdb file where song titles will be retrieved, this will be used for WebUI stuff. If you have a different xml file you want to use, set this config to the filename of that other musicdb.xml file, or keep it blank to use the same musicdb.xml as above.
|
||||
- **Sample setup 1**: I use a modified World musicdb with all difficulties and limited info defined for all songs. I do not need to use a separate musicdb.xml for WebUI (but I would also update this file to include upcoming songs.)
|
||||
- **Sample setup 2**: I use the last A3 musicdb for musicdata\_load. This will set difficulty and limited data for songs released up until A3. World songs info will be set using SONGS\_WORLD defined in _data/world.ts_. Then I use World musicdb for WebUI, so I could get all titles of songs released up until World (I would need to replace this file every time the game updates its song list.)
|
||||
|
||||
|
||||
|
||||
Changelog
|
||||
===========
|
||||
### fork-mdx-3.0.3d
|
||||
|
||||
- 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.
|
||||
- Gold cab exclusive, otherwise the songs will not appear in the songs list.
|
||||
- You can use patches to force the game to imitate gold cab.
|
||||
- Added "Step This Way" Challenge difficulties
|
||||
- Added "MVP" to SONGS_WORLD.
|
||||
- Added "Time to HYPERDRIVE" to SONGS_WORLD.
|
||||
- Song should appear if you're Silver rank in WORLD LEAGUE.
|
||||
- Added new charts to advanced play
|
||||
- "1116"
|
||||
- "Sahara"
|
||||
- "High & Low" (CHA)
|
||||
- "ONYX" (CHA)
|
||||
- Added new player customization options in Profile Settings.
|
||||
- BPL Team Supporter Appeal Board
|
||||
- Added 2nd WORLD LEAGUE info
|
||||
- Will start 11/14 10:00 JST.
|
||||
- Will add Hakken difficulties as soon as it is revealed.
|
||||
|
||||
|
||||
### fork-mdx-3.0.2
|
||||
|
||||
- WORLD LEAGUE
|
||||
- I did my best emulating what I understand how WORLD LEAGUE works, so my apologies if there's something that isn't accurately implemented. But this is how it works right now:
|
||||
- Promotion and demotion borders are determined by the league score of the player in rank 1. If you play alone on your server, you'll automatically be rank 1 all the time.
|
||||
- Bronze class promotion border is set to >= 50% of the rank 1's score.
|
||||
- Silver class promotion and demotion borders are set to >= 65% and <= 15% of the rank 1's score, respectively.
|
||||
- Gold class demotion border is set to <= 15% as well.
|
||||
- League info and period is defined in data/world.ts:LEAGUE_WORLD.
|
||||
- League period ends after 'end' datetime.
|
||||
- Promotion/demotion occurs after 'summary' datetime.
|
||||
- Class benefits will apply depending on your class.
|
||||
- Note: Since difficulty level info isn't revealed until the songs are officially released, I cannot add them to the list yet. I will update this plugin with the correct song info once they are released officially.
|
||||
- Privilege of early play: this filter now displays applicable songs (Grand Prix advanced play songs)
|
||||
- WebUI stuff
|
||||
- Flare Data Page: displays your top 30 songs for Classic, White and Gold.
|
||||
- Fixes
|
||||
- Rewrote getLastGhostId function.
|
||||
- Fixed "So What" and "Akatsuki" diffLv mix up.
|
||||
|
||||
|
||||
### fork-mdx-3.0.1
|
||||
|
||||
- Support for 2024091000.
|
||||
- Added list of old songs' re-rates in _data/world.ts:SONGS\_OVERRIDE\_WORLD_.
|
||||
- Updated events list & event loading code:
|
||||
- Galaxy Play
|
||||
- EXTRA SAVIOR
|
||||
- MYSTICAL Re:UNION (songs automatically unlocked on login)
|
||||
- Attempts to fix ghost data loading:
|
||||
- Added ghost id to score and ghost data
|
||||
- Ghost data gets created when there is no existing \[compatible\] data; and it gets updated when getting a higher or the same score. Side effect of this is when you have set a high score prior to this plugin update, the ghost data won't be updated unless you break or match that high score.
|
||||
- Unfortunately I could not find a way to match the old scores to their respective ghost data, since the old ghost data only stored the song id and difficulty, and not the style (single/double.)
|
||||
- World, Area and Machine #1 high score saving/loading (WIP)
|
||||
- Area high score: uses locationid to search, save and load scores.
|
||||
- Machine high score: uses locationid and pcbid.
|
||||
- Ghost data also gets created for each new high score (overwritten when high score is broken/matched)
|
||||
- WebUI stuff (WIP) - musicdb.xml required for proper score display.
|
||||
- Basic profile info
|
||||
- Flare skill info
|
||||
- Music/score table
|
||||
|
||||
|
||||
|
||||
To do:
|
||||
===========
|
||||
|
||||
1. Look for more missing features
|
||||
2. Refactor hiscore code
|
||||
3. More WebUI stuff
|
||||
4. Figure out unknown values in score_str
|
||||
5. Rival loading and figure out unknown values in rival record_str
|
||||
6. Proper loading of Flare skill in-game (make sure to include only top 30 scores from classic, white and gold)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*.xml
|
||||
+343
@@ -0,0 +1,343 @@
|
||||
export const SONGS_WORLD = [
|
||||
{ mcode: 38665, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [3, 6, 10, 13, 15, 0, 6, 10, 13, 15] },
|
||||
{ mcode: 38661, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 5, 9, 12, 0, 0, 5, 9, 12, 0] },
|
||||
{ mcode: 38659, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [3, 7, 12, 14, 16, 0, 7, 12, 14, 16] },
|
||||
{ mcode: 38669, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [3, 7, 11, 14, 15, 0, 7, 11, 14, 15] },
|
||||
{ mcode: 38668, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 6, 10, 13, 0, 0, 6, 10, 13, 0] },
|
||||
{ mcode: 38667, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 6, 9, 12, 0, 0, 6, 9, 12, 0] },
|
||||
{ mcode: 38663, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 7, 10, 13, 0, 0, 7, 10, 13, 0] },
|
||||
{ mcode: 38660, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [1, 4, 8, 12, 0, 0, 4, 8, 12, 0] },
|
||||
{ mcode: 38688, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 7, 11, 14, 0, 0, 7, 11, 14, 0] },
|
||||
{ mcode: 38672, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 4, 9, 13, 0, 0, 4, 9, 13, 0] },
|
||||
{ mcode: 38662, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 8, 13, 0, 0, 4, 8, 13, 0] },
|
||||
{ mcode: 38731, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [1, 3, 9, 13, 0, 0, 3, 9, 12, 0] },
|
||||
{ mcode: 38722, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 6, 10, 14, 0, 0, 6, 10, 14, 0] },
|
||||
{ mcode: 38704, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [1, 4, 9, 12, 0, 0, 4, 9, 12, 0] },
|
||||
{ mcode: 38724, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 5, 9, 13, 0, 0, 4, 9, 13, 0] },
|
||||
{ mcode: 38730, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 4, 8, 13, 0, 0, 4, 8, 13, 0] },
|
||||
{ mcode: 38723, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [2, 4, 9, 14, 12, 0, 5, 10, 14, 12] },
|
||||
{ mcode: 38721, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 4, 8, 12, 0, 0, 4, 8, 12, 0] },
|
||||
{ mcode: 38706, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [1, 4, 9, 13, 0, 0, 4, 9, 13, 0] },
|
||||
{ mcode: 38705, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 6, 10, 13, 0, 0, 6, 10, 13, 0] },
|
||||
{ mcode: 38727, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 7, 11, 14, 0, 0, 7, 11, 14, 0] },
|
||||
{ mcode: 38739, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 5, 9, 12, 15, 0, 5, 9, 12, 15] },
|
||||
{ mcode: 38664, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 7, 9, 12, 0, 0, 7, 9, 12, 0] },
|
||||
{ mcode: 38670, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [4, 7, 10, 13, 0, 0, 7, 10, 13, 0] },
|
||||
{ mcode: 38680, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 6, 11, 14, 0, 0, 6, 11, 14, 0] },
|
||||
{ mcode: 38666, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 7, 10, 14, 0, 0, 7, 10, 14, 0] },
|
||||
{ mcode: 38671, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [1, 4, 8, 13, 0, 0, 4, 8, 13, 0] },
|
||||
{ mcode: 38677, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 6, 9, 12, 0, 0, 6, 9, 12, 0] },
|
||||
{ mcode: 38678, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [1, 5, 9, 11, 0, 0, 3, 9, 12, 0] },
|
||||
{ mcode: 38707, limited_ary: [0, -1, -1, -1, -1, -1, -1, -1, -1, -1], diffLv: [6, 0, 0, 0, 0, 0, 0, 0, 0, 0] },
|
||||
{ mcode: 38695, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 7, 11, 14, 0, 0, 7, 11, 14, 0] },
|
||||
{ mcode: 38692, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 7, 12, 15, 0, 0, 7, 12, 15, 0] },
|
||||
{ mcode: 38694, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 6, 11, 14, 0, 0, 6, 11, 14, 0] },
|
||||
{ mcode: 38691, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 8, 12, 15, 0, 0, 7, 12, 15, 0] },
|
||||
{ mcode: 38693, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [3, 7, 11, 15, 0, 0, 7, 11, 15, 0] },
|
||||
{ mcode: 38733, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 9, 12, 0, 0, 5, 9, 12, 0] },
|
||||
{ mcode: 38736, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [2, 5, 8, 13, 0, 0, 5, 8, 13, 0] },
|
||||
{ mcode: 38735, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 6, 10, 16, 0, 0, 6, 10, 16, 0] },
|
||||
{ mcode: 38728, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 7, 12, 15, 0, 0, 7, 12, 15, 0] },
|
||||
{ mcode: 38746, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [4, 8, 14, 16, 0, 0, 8, 14, 16, 0] },
|
||||
{ mcode: 38745, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 7, 12, 16, 0, 0, 7, 12, 16, 0] },
|
||||
{ mcode: 38744, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [4, 7, 13, 17, 0, 0, 7, 13, 17, 0] },
|
||||
{ mcode: 38747, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [4, 10, 15, 18, 0, 0, 10, 15, 18, 0] },
|
||||
{ mcode: 38748, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [4, 9, 13, 16, 0, 0, 9, 13, 16, 0] },
|
||||
{ mcode: 38749, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [2, 2, 7, 11, 13, 0, 2, 7, 11, 14] },
|
||||
{ mcode: 38734, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 6, 10, 13, 8, 0, 6, 10, 13, 9] },
|
||||
{ mcode: 38737, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [3, 6, 11, 13, 16, 0, 6, 11, 13, 16] },
|
||||
{ mcode: 38738, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [2, 5, 8, 12, 17, 5, 8, 12, 17] },
|
||||
{ mcode: 37222, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [2, 4, 10, 13, 0, 0, 4, 9, 13, 0] },
|
||||
{ mcode: 37604, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [2, 6, 9, 12, 14, 0, 5, 9, 12, 14] },
|
||||
{ mcode: 37234, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [1, 3, 7, 11, 0, 0, 3, 7, 11, 0] },
|
||||
{ mcode: 37363, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [2, 5, 9, 13, 0, 0, 5, 9, 13, 0] },
|
||||
{ mcode: 38756, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 8, 15, 18, 0, 0, 8, 14, 18, 0] },
|
||||
{ mcode: 38758, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [5, 10, 13, 17, 0, 0, 10, 13, 17, 0] },
|
||||
{ mcode: 38759, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [3, 6, 13, 15, 0, 0, 7, 13, 15, 0] },
|
||||
{ mcode: 38757, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 8, 13, 0, 0, 5, 8, 13, 0] },
|
||||
{ mcode: 38622, limited_ary: [12, 12, 12, 12, -1, -1, 12, 12, 12, -1], diffLv: [2, 7, 12, 15, 0, 0, 7, 12, 15, 0] },
|
||||
{ mcode: 38760, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [4, 8, 13, 16, 18, 0, 8, 13, 16, 18] },
|
||||
{ mcode: 38761, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [4, 8, 12, 15, 0, 0, 8, 12, 15, 0] },
|
||||
|
||||
// songs that have yet to release. unknown difficulty lvls.
|
||||
// { mcode: 38629, limited_ary: [13, 13, 13, 13, -1, -1 13, 13 13, -1], diffLv: [] } // hakken
|
||||
]
|
||||
|
||||
export const SONGS_OVERRIDE_WORLD = [
|
||||
// Override info for old songs
|
||||
{ mcode: 38624, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [2, 5, 10, 15, 17, 0, 5, 10, 15, 17] },
|
||||
{ mcode: 38623, limited_ary: [2, 2, 2, 2, 2, -1, 2, 2, 2, 2], diffLv: [3, 11, 15, 17, 18, 0, 11, 14, 17, 18] },
|
||||
{ mcode: 38628, limited_ary: [2, 2, 2, 2, -1, -1, 2, 2, 2, -1], diffLv: [5, 9, 14, 18, 0, 0, 9, 14, 18, 0] },
|
||||
{ mcode: 11, limited_ary: [], diffLv: [3, 6, 6, 10, 10, 0, 6, 8, 9, 10] },
|
||||
{ mcode: 13, limited_ary: [], diffLv: [4, 6, 8, 9, 12, 0, 7, 8, 9, 12] },
|
||||
{ mcode: 84, limited_ary: [], diffLv: [3, 7, 8, 11, 0, 0, 9, 11, 12, 0] },
|
||||
{ mcode: 137, limited_ary: [], diffLv: [2, 3, 6, 8, 0, 0, 5, 6, 8, 0] },
|
||||
{ mcode: 126, limited_ary: [], diffLv: [3, 6, 10, 12, 12, 0, 7, 8, 11, 12] },
|
||||
{ mcode: 128, limited_ary: [], diffLv: [4, 7, 8, 10, 0, 0, 5, 9, 13, 0] },
|
||||
{ mcode: 182, limited_ary: [], diffLv: [2, 2, 4, 7, 0, 0, 3, 5, 8, 0] },
|
||||
{ mcode: 155, limited_ary: [], diffLv: [3, 5, 7, 11, 0, 0, 5, 7, 12, 0] },
|
||||
{ mcode: 221, limited_ary: [], diffLv: [3, 6, 8, 11, 0, 0, 7, 8, 10, 0] },
|
||||
{ mcode: 159, limited_ary: [], diffLv: [5, 7, 8, 11, 0, 0, 4, 8, 10, 0] },
|
||||
{ mcode: 160, limited_ary: [], diffLv: [5, 9, 10, 12, 0, 0, 7, 10, 13, 0] },
|
||||
{ mcode: 257, limited_ary: [], diffLv: [3, 5, 7, 10, 0, 0, 6, 8, 11, 0] },
|
||||
{ mcode: 267, limited_ary: [], diffLv: [4, 7, 9, 12, 0, 0, 8, 9, 13, 0] },
|
||||
{ mcode: 238, limited_ary: [], diffLv: [5, 6, 9, 12, 0, 0, 7, 9, 12, 0] },
|
||||
{ mcode: 365, limited_ary: [], diffLv: [4, 5, 7, 10, 0, 0, 4, 7, 10, 0] },
|
||||
{ mcode: 472, limited_ary: [], diffLv: [3, 4, 6, 9, 0, 0, 5, 7, 9, 0] },
|
||||
{ mcode: 480, limited_ary: [], diffLv: [5, 6, 8, 12, 12, 0, 7, 8, 12, 11] },
|
||||
{ mcode: 478, limited_ary: [], diffLv: [3, 4, 7, 10, 0, 0, 6, 9, 11, 0] },
|
||||
{ mcode: 436, limited_ary: [], diffLv: [4, 5, 7, 12, 0, 0, 5, 8, 12, 0] },
|
||||
{ mcode: 429, limited_ary: [], diffLv: [3, 6, 7, 9, 0, 0, 5, 7, 11, 0] },
|
||||
{ mcode: 476, limited_ary: [], diffLv: [3, 4, 7, 10, 0, 0, 4, 7, 10, 0] },
|
||||
{ mcode: 467, limited_ary: [], diffLv: [2, 4, 7, 9, 0, 0, 4, 7, 11, 0] },
|
||||
{ mcode: 437, limited_ary: [], diffLv: [3, 5, 7, 8, 0, 0, 4, 7, 9, 0] },
|
||||
{ mcode: 33811, limited_ary: [], diffLv: [2, 3, 9, 11, 0, 0, 3, 6, 10, 0] },
|
||||
{ mcode: 36914, limited_ary: [], diffLv: [2, 3, 7, 12, 0, 0, 4, 9, 11, 0] },
|
||||
{ mcode: 415, limited_ary: [], diffLv: [3, 4, 7, 11, 0, 0, 5, 7, 10, 0] },
|
||||
{ mcode: 33818, limited_ary: [], diffLv: [7, 10, 13, 15, 16, 0, 10, 12, 15, 17] },
|
||||
{ mcode: 33806, limited_ary: [], diffLv: [3, 7, 9, 10, 0, 0, 8, 10, 12, 0] },
|
||||
{ mcode: 33048, limited_ary: [], diffLv: [3, 6, 7, 11, 0, 0, 5, 7, 8, 0] },
|
||||
{ mcode: 36931, limited_ary: [], diffLv: [4, 4, 8, 10, 0, 0, 4, 8, 10, 0] },
|
||||
{ mcode: 36873, limited_ary: [], diffLv: [5, 5, 9, 11, 0, 0, 4, 9, 11, 0] },
|
||||
{ mcode: 36935, limited_ary: [], diffLv: [3, 6, 8, 11, 0, 0, 5, 8, 11, 0] },
|
||||
{ mcode: 36878, limited_ary: [], diffLv: [3, 4, 7, 9, 0, 0, 4, 7, 9, 0] },
|
||||
{ mcode: 37267, limited_ary: [], diffLv: [3, 4, 7, 10, 0, 0, 5, 7, 11, 0] },
|
||||
{ mcode: 37190, limited_ary: [], diffLv: [3, 5, 7, 9, 11, 0, 5, 7, 9, 12] },
|
||||
{ mcode: 37121, limited_ary: [], diffLv: [3, 7, 9, 13, 0, 0, 6, 9, 12, 0] },
|
||||
{ mcode: 37290, limited_ary: [], diffLv: [2, 5, 9, 12, 0, 0, 5, 7, 12, 0] },
|
||||
{ mcode: 37295, limited_ary: [], diffLv: [4, 6, 9, 11, 0, 0, 7, 8, 11, 0] },
|
||||
{ mcode: 37408, limited_ary: [], diffLv: [2, 3, 7, 9, 0, 0, 5, 6, 9, 0] },
|
||||
{ mcode: 37228, limited_ary: [], diffLv: [2, 4, 7, 11, 0, 0, 5, 7, 11, 0] },
|
||||
{ mcode: 37686, limited_ary: [], diffLv: [2, 4, 7, 10, 8, 0, 4, 7, 11, 8] },
|
||||
{ mcode: 37623, limited_ary: [], diffLv: [2, 4, 6, 9, 12, 0, 4, 7, 10, 12] },
|
||||
{ mcode: 37694, limited_ary: [], diffLv: [2, 5, 8, 11, 13, 0, 5, 8, 11, 13] },
|
||||
{ mcode: 37666, limited_ary: [], diffLv: [3, 5, 8, 11, 0, 0, 4, 8, 13, 0] },
|
||||
{ mcode: 37749, limited_ary: [], diffLv: [4, 6, 9, 12, 16, 0, 6, 9, 12, 16] },
|
||||
{ mcode: 37511, limited_ary: [], diffLv: [2, 4, 7, 9, 0, 0, 4, 7, 9, 0] },
|
||||
{ mcode: 37698, limited_ary: [], diffLv: [2, 2, 8, 11, 0, 0, 2, 9, 11, 0] },
|
||||
{ mcode: 37662, limited_ary: [], diffLv: [3, 8, 10, 14, 16, 0, 9, 11, 15, 16] },
|
||||
{ mcode: 37532, limited_ary: [], diffLv: [2, 4, 6, 9, 0, 0, 5, 7, 10, 0] },
|
||||
{ mcode: 37644, limited_ary: [], diffLv: [3, 6, 11, 15, 18, 0, 6, 9, 14, 18] },
|
||||
{ mcode: 37803, limited_ary: [], diffLv: [2, 4, 8, 12, 15, 0, 4, 8, 12, 15] },
|
||||
{ mcode: 37775, limited_ary: [], diffLv: [2, 5, 7, 10, 13, 0, 5, 8, 11, 13] },
|
||||
{ mcode: 37784, limited_ary: [], diffLv: [2, 4, 7, 9, 0, 0, 4, 6, 9, 0] },
|
||||
{ mcode: 37765, limited_ary: [], diffLv: [2, 4, 7, 10, 0, 0, 4, 7, 11, 0] },
|
||||
{ mcode: 37586, limited_ary: [], diffLv: [2, 4, 7, 9, 0, 0, 5, 8, 10, 0] },
|
||||
{ mcode: 37793, limited_ary: [], diffLv: [3, 6, 7, 10, 0, 0, 6, 7, 11, 0] },
|
||||
{ mcode: 37736, limited_ary: [], diffLv: [2, 4, 8, 10, 0, 0, 4, 8, 10, 0] },
|
||||
{ mcode: 37794, limited_ary: [], diffLv: [3, 4, 7, 11, 12, 0, 5, 7, 11, 12] },
|
||||
{ mcode: 37798, limited_ary: [], diffLv: [2, 5, 7, 11, 0, 0, 3, 7, 11, 0] },
|
||||
{ mcode: 37862, limited_ary: [], diffLv: [2, 5, 8, 13, 0, 0, 5, 9, 13, 0] },
|
||||
{ mcode: 37657, limited_ary: [], diffLv: [2, 3, 8, 10, 0, 0, 4, 8, 10, 0] },
|
||||
{ mcode: 37587, limited_ary: [], diffLv: [2, 5, 7, 9, 0, 0, 5, 7, 10, 0] },
|
||||
{ mcode: 37840, limited_ary: [], diffLv: [2, 4, 8, 11, 10, 0, 4, 8, 11, 11] },
|
||||
{ mcode: 37800, limited_ary: [], diffLv: [3, 5, 10, 12, 16, 0, 6, 9, 12, 16] },
|
||||
{ mcode: 37565, limited_ary: [], diffLv: [2, 5, 7, 12, 0, 0, 5, 7, 11, 0] },
|
||||
{ mcode: 37588, limited_ary: [], diffLv: [2, 4, 6, 9, 0, 0, 4, 6, 9, 0] },
|
||||
{ mcode: 37907, limited_ary: [], diffLv: [3, 7, 9, 13, 16, 0, 7, 10, 13, 16] },
|
||||
{ mcode: 37930, limited_ary: [], diffLv: [2, 7, 9, 14, 13, 0, 7, 9, 14, 13] },
|
||||
{ mcode: 37827, limited_ary: [], diffLv: [2, 5, 8, 11, 0, 0, 5, 9, 11, 0] },
|
||||
{ mcode: 37543, limited_ary: [], diffLv: [2, 3, 7, 9, 13, 0, 4, 7, 9, 13] },
|
||||
{ mcode: 37239, limited_ary: [], diffLv: [3, 4, 7, 12, 15, 0, 4, 7, 12, 15] },
|
||||
{ mcode: 37934, limited_ary: [], diffLv: [3, 7, 10, 14, 0, 0, 6, 10, 14, 0] },
|
||||
{ mcode: 37908, limited_ary: [], diffLv: [3, 7, 9, 11, 13, 0, 6, 9, 11, 13] },
|
||||
{ mcode: 37597, limited_ary: [], diffLv: [2, 4, 6, 10, 0, 0, 4, 6, 10, 0] },
|
||||
{ mcode: 37927, limited_ary: [], diffLv: [2, 6, 9, 13, 0, 0, 6, 9, 13, 0] },
|
||||
{ mcode: 37932, limited_ary: [], diffLv: [3, 4, 11, 16, 9, 0, 7, 12, 16, 9] },
|
||||
{ mcode: 37889, limited_ary: [], diffLv: [2, 7, 9, 12, 15, 0, 7, 10, 12, 15] },
|
||||
{ mcode: 37965, limited_ary: [], diffLv: [2, 4, 8, 10, 0, 0, 5, 9, 13, 0] },
|
||||
{ mcode: 37887, limited_ary: [], diffLv: [2, 5, 8, 11, 13, 0, 5, 8, 11, 13] },
|
||||
{ mcode: 38030, limited_ary: [], diffLv: [6, 10, 13, 16, 18, 0, 9, 13, 16, 18] },
|
||||
{ mcode: 38032, limited_ary: [], diffLv: [8, 12, 15, 16, 19, 0, 12, 16, 18, 19] },
|
||||
{ mcode: 38027, limited_ary: [], diffLv: [3, 7, 12, 15, 0, 0, 7, 12, 15, 0] },
|
||||
{ mcode: 38051, limited_ary: [], diffLv: [7, 10, 13, 17, 0, 0, 10, 13, 18, 0] },
|
||||
{ mcode: 37988, limited_ary: [], diffLv: [3, 4, 10, 14, 0, 0, 4, 10, 14, 0] },
|
||||
{ mcode: 38010, limited_ary: [], diffLv: [4, 8, 11, 15, 18, 0, 7, 12, 15, 18] },
|
||||
{ mcode: 38054, limited_ary: [], diffLv: [4, 6, 11, 15, 0, 0, 6, 11, 15, 0] },
|
||||
{ mcode: 38079, limited_ary: [], diffLv: [2, 5, 8, 10, 0, 0, 5, 8, 10, 0] },
|
||||
{ mcode: 38149, limited_ary: [], diffLv: [9, 13, 16, 18, 19, 0, 13, 16, 18, 19] },
|
||||
{ mcode: 38092, limited_ary: [], diffLv: [2, 5, 9, 12, 0, 0, 4, 9, 12, 0] },
|
||||
{ mcode: 38069, limited_ary: [], diffLv: [2, 5, 9, 13, 0, 0, 5, 9, 13, 0] },
|
||||
{ mcode: 38218, limited_ary: [], diffLv: [9, 12, 16, 18, 19, 0, 12, 16, 18, 19] },
|
||||
{ mcode: 38215, limited_ary: [], diffLv: [3, 6, 8, 11, 14, 0, 5, 8, 12, 14] },
|
||||
{ mcode: 38199, limited_ary: [], diffLv: [2, 3, 8, 11, 0, 0, 3, 8, 11, 0] },
|
||||
{ mcode: 38187, limited_ary: [], diffLv: [3, 5, 9, 12, 0, 0, 5, 9, 12, 0] },
|
||||
{ mcode: 38122, limited_ary: [], diffLv: [4, 6, 10, 13, 0, 0, 7, 10, 13, 0] },
|
||||
{ mcode: 38207, limited_ary: [], diffLv: [2, 4, 8, 13, 15, 0, 5, 9, 13, 15] },
|
||||
{ mcode: 38073, limited_ary: [], diffLv: [2, 4, 10, 13, 0, 0, 5, 11, 13, 0] },
|
||||
{ mcode: 38160, limited_ary: [], diffLv: [4, 5, 10, 13, 0, 0, 5, 11, 13, 0] },
|
||||
{ mcode: 38104, limited_ary: [], diffLv: [4, 6, 9, 12, 0, 0, 6, 10, 12, 0] },
|
||||
{ mcode: 38103, limited_ary: [], diffLv: [3, 7, 11, 15, 16, 0, 7, 11, 15, 17] },
|
||||
{ mcode: 38209, limited_ary: [], diffLv: [2, 3, 8, 11, 0, 0, 3, 8, 11, 0] },
|
||||
{ mcode: 38186, limited_ary: [], diffLv: [3, 5, 10, 14, 0, 0, 5, 10, 14, 0] },
|
||||
{ mcode: 38158, limited_ary: [], diffLv: [3, 6, 10, 13, 0, 0, 7, 11, 13, 0] },
|
||||
{ mcode: 38189, limited_ary: [], diffLv: [2, 4, 8, 12, 0, 0, 5, 9, 12, 0] },
|
||||
{ mcode: 38219, limited_ary: [], diffLv: [4, 10, 14, 17, 18, 0, 10, 14, 18, 18] },
|
||||
{ mcode: 38268, limited_ary: [], diffLv: [2, 5, 10, 13, 0, 0, 5, 10, 14, 0] },
|
||||
{ mcode: 38274, limited_ary: [], diffLv: [2, 3, 7, 11, 0, 0, 4, 7, 11, 0] },
|
||||
{ mcode: 38273, limited_ary: [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1], diffLv: [3, 5, 9, 12, 0, 0, 5, 9, 11, 0] },
|
||||
{ mcode: 38231, limited_ary: [], diffLv: [2, 5, 8, 11, 0, 0, 5, 8, 10, 0] },
|
||||
{ mcode: 38332, limited_ary: [], diffLv: [5, 8, 13, 16, 0, 0, 8, 13, 16, 0] },
|
||||
{ mcode: 38395, limited_ary: [], diffLv: [3, 6, 10, 14, 18, 0, 6, 10, 14, 18] },
|
||||
{ mcode: 38316, limited_ary: [], diffLv: [2, 6, 10, 14, 15, 0, 6, 10, 14, 14] },
|
||||
{ mcode: 38410, limited_ary: [], diffLv: [5, 10, 14, 17, 0, 0, 10, 14, 18, 0] },
|
||||
{ mcode: 38343, limited_ary: [], diffLv: [3, 7, 10, 14, 0, 0, 7, 10, 14, 0] },
|
||||
{ mcode: 38377, limited_ary: [], diffLv: [3, 7, 10, 15, 0, 0, 7, 10, 15, 0] },
|
||||
{ mcode: 38423, limited_ary: [], diffLv: [4, 9, 12, 16, 0, 0, 9, 12, 16, 0] },
|
||||
{ mcode: 38380, limited_ary: [], diffLv: [3, 5, 8, 11, 0, 0, 4, 8, 10, 0] },
|
||||
{ mcode: 38384, limited_ary: [], diffLv: [2, 4, 7, 10, 0, 0, 4, 7, 10, 0] },
|
||||
{ mcode: 38440, limited_ary: [], diffLv: [2, 4, 8, 12, 14, 0, 4, 8, 12, 14] },
|
||||
{ mcode: 38562, limited_ary: [], diffLv: [2, 5, 10, 13, 0, 0, 5, 11, 14, 0] },
|
||||
{ mcode: 38591, limited_ary: [], diffLv: [6, 10, 15, 18, 19, 0, 10, 15, 18, 19] },
|
||||
{ mcode: 37224, limited_ary: [], diffLv: [2, 6, 10, 15, 0, 0, 6, 11, 15, 0] },
|
||||
{ mcode: 38598, limited_ary: [], diffLv: [2, 7, 12, 17, 0, 0, 7, 12, 17, 0] },
|
||||
{ mcode: 38406, limited_ary: [], diffLv: [6, 11, 15, 17, 18, 0, 11, 15, 17, 18] },
|
||||
{ mcode: 38555, limited_ary: [], diffLv: [2, 4, 10, 14, 0, 0, 5, 10, 14, 0] },
|
||||
{ mcode: 38614, limited_ary: [], diffLv: [2, 5, 10, 14, 0, 0, 5, 10, 14, 0] },
|
||||
{ mcode: 38547, limited_ary: [], diffLv: [4, 9, 14, 17, 0, 0, 9, 15, 17, 0] },
|
||||
{ mcode: 38558, limited_ary: [], diffLv: [2, 5, 10, 14, 0, 0, 5, 10, 13, 0] },
|
||||
{ mcode: 37233, limited_ary: [], diffLv: [2, 5, 7, 11, 0, 0, 5, 8, 11, 0] },
|
||||
{ mcode: 38552, limited_ary: [], diffLv: [2, 8, 13, 16, 0, 0, 8, 13, 16, 0] },
|
||||
{ mcode: 37523, limited_ary: [], diffLv: [2, 6, 9, 12, 0, 0, 5, 9, 12, 0] },
|
||||
{ mcode: 38597, limited_ary: [], diffLv: [2, 7, 12, 18, 0, 0, 7, 12, 18, 0] },
|
||||
{ mcode: 38570, limited_ary: [], diffLv: [2, 3, 7, 13, 0, 0, 3, 7, 13, 0] },
|
||||
{ mcode: 37563, limited_ary: [], diffLv: [2, 5, 7, 11, 0, 0, 5, 7, 11, 0] },
|
||||
{ mcode: 37308, limited_ary: [], diffLv: [2, 5, 9, 13, 0, 0, 4, 9, 13, 0] },
|
||||
{ mcode: 38605, limited_ary: [], diffLv: [4, 7, 11, 15, 18, 0, 7, 11, 15, 17] },
|
||||
{ mcode: 38602, limited_ary: [], diffLv: [2, 4, 7, 11, 0, 0, 4, 7, 11, 0] },
|
||||
{ mcode: 37435, limited_ary: [], diffLv: [2, 6, 11, 14, 0, 0, 7, 12, 15, 0] },
|
||||
{ mcode: 38643, limited_ary: [], diffLv: [2, 5, 9, 13, 16, 0, 4, 9, 13, 16] },
|
||||
{ mcode: 38516, limited_ary: [], diffLv: [4, 8, 11, 14, 17, 0, 7, 11, 14, 17] },
|
||||
{ mcode: 38269, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 7, 10, 0, 0, 5, 7, 10, 0] },
|
||||
{ mcode: 38652, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [2, 6, 10, 15, 17, 0, 6, 10, 15, 17] },
|
||||
{ mcode: 37251, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [6, 10, 12, 15, 18, 0, 10, 11, 16, 17] },
|
||||
{ mcode: 38212, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 7, 10, 15, 16, 0, 8, 11, 15, 16] },
|
||||
{ mcode: 38295, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 7, 11, 14, 17, 0, 7, 11, 14, 17] },
|
||||
{ mcode: 38258, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [2, 6, 10, 14, 16, 0, 6, 11, 14, 16] },
|
||||
{ mcode: 38263, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [4, 7, 11, 14, 16, 0, 8, 12, 15, 16] },
|
||||
{ mcode: 38195, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [5, 7, 10, 13, 17, 0, 7, 10, 13, 17] },
|
||||
{ mcode: 38420, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [4, 8, 12, 15, 17, 0, 8, 12, 15, 17] },
|
||||
{ mcode: 38405, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 6, 9, 13, 17, 0, 5, 9, 14, 17] },
|
||||
{ mcode: 38442, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [3, 8, 13, 16, 18, 0, 8, 13, 16, 18] },
|
||||
{ mcode: 38436, limited_ary: [0, 0, 0, 0, 2, -1, 0, 0, 0, 2], diffLv: [4, 7, 11, 14, 17, 0, 7, 11, 14, 17] },
|
||||
{ mcode: 38407, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 9, 12, 16, 17, 0, 9, 12, 16, 17] },
|
||||
{ mcode: 38428, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 8, 12, 16, 18, 0, 8, 12, 16, 18] },
|
||||
{ mcode: 38424, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 8, 11, 14, 17, 0, 8, 11, 14, 17] }
|
||||
|
||||
// new charts
|
||||
// { mcode: 38339, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 7, 11, 14, ?, 0, 7, 11, 14, ?] }, cbme
|
||||
]
|
||||
|
||||
export const EVENTS_WORLD = [
|
||||
{ id: 89, no: 0, cond: 0, rwrd: 0, type: 9999 },
|
||||
{ id: 96, no: 0, cond: 0, rwrd: 0, type: 9999 },
|
||||
{ id: 101, no: 0, cond: 0, rwrd: 0, type: 9999 },
|
||||
|
||||
{ id: 1, no: 1, cond: 1, rwrd: 38667, type: 70 }, { id: 2, no: 1, cond: 1, rwrd: 38667, type: 71 }, { id: 3, no: 1, cond: 1, rwrd: 38667, type: 72 }, { id: 4, no: 1, cond: 1, rwrd: 38667, type: 73 },
|
||||
{ id: 5, no: 1, cond: 1, rwrd: 38661, type: 70 }, { id: 6, no: 1, cond: 1, rwrd: 38661, type: 71 }, { id: 7, no: 1, cond: 1, rwrd: 38661, type: 72 }, { id: 8, no: 1, cond: 1, rwrd: 38661, type: 73 },
|
||||
{ id: 9, no: 1, cond: 1, rwrd: 38668, type: 70 }, { id: 10, no: 1, cond: 1, rwrd: 38668, type: 71 }, { id: 11, no: 1, cond: 1, rwrd: 38668, type: 72 }, { id: 12, no: 1, cond: 1, rwrd: 38668, type: 73 },
|
||||
{ id: 13, no: 1, cond: 1, rwrd: 38665, type: 70 }, { id: 14, no: 1, cond: 1, rwrd: 38665, type: 71 }, { id: 15, no: 1, cond: 1, rwrd: 38665, type: 72 }, { id: 16, no: 1, cond: 1, rwrd: 38665, type: 73 }, { id: 17, no: 1, cond: 1, rwrd: 38665, type: 74 },
|
||||
{ id: 18, no: 1, cond: 1, rwrd: 38669, type: 70 }, { id: 19, no: 1, cond: 1, rwrd: 38669, type: 71 }, { id: 20, no: 1, cond: 1, rwrd: 38669, type: 72 }, { id: 21, no: 1, cond: 1, rwrd: 38669, type: 73 }, { id: 22, no: 1, cond: 1, rwrd: 38669, type: 74 },
|
||||
{ id: 23, no: 1, cond: 1, rwrd: 38659, type: 70 }, { id: 24, no: 1, cond: 1, rwrd: 38659, type: 71 }, { id: 25, no: 1, cond: 1, rwrd: 38659, type: 72 }, { id: 26, no: 1, cond: 1, rwrd: 38659, type: 73 }, { id: 27, no: 1, cond: 1, rwrd: 38659, type: 74 },
|
||||
{ id: 28, no: 1, cond: 1, rwrd: 38667, type: 81 }, { id: 29, no: 1, cond: 1, rwrd: 38667, type: 82 }, { id: 30, no: 1, cond: 1, rwrd: 38667, type: 83 },
|
||||
{ id: 31, no: 1, cond: 1, rwrd: 38661, type: 81 }, { id: 32, no: 1, cond: 1, rwrd: 38661, type: 82 }, { id: 33, no: 1, cond: 1, rwrd: 38661, type: 83 },
|
||||
{ id: 34, no: 1, cond: 1, rwrd: 38668, type: 81 }, { id: 35, no: 1, cond: 1, rwrd: 38668, type: 82 }, { id: 36, no: 1, cond: 1, rwrd: 38668, type: 83 },
|
||||
{ id: 37, no: 1, cond: 1, rwrd: 38665, type: 81 }, { id: 38, no: 1, cond: 1, rwrd: 38665, type: 82 }, { id: 39, no: 1, cond: 1, rwrd: 38665, type: 83 }, { id: 40, no: 1, cond: 1, rwrd: 38665, type: 84 },
|
||||
{ id: 41, no: 1, cond: 1, rwrd: 38669, type: 81 }, { id: 42, no: 1, cond: 1, rwrd: 38669, type: 82 }, { id: 43, no: 1, cond: 1, rwrd: 38669, type: 83 }, { id: 44, no: 1, cond: 1, rwrd: 38669, type: 84 },
|
||||
{ id: 45, no: 1, cond: 1, rwrd: 38659, type: 81 }, { id: 46, no: 1, cond: 1, rwrd: 38659, type: 82 }, { id: 47, no: 1, cond: 1, rwrd: 38659, type: 83 }, { id: 48, no: 1, cond: 1, rwrd: 38659, type: 84 },
|
||||
{ id: 49, no: 0, cond: 2, rwrd: 38736, type: 27 }, { id: 50, no: 0, cond: 2, rwrd: 38735, type: 27 }, { id: 51, no: 0, cond: 2, rwrd: 38728, type: 27 },
|
||||
{ id: 52, no: 0, cond: 1, rwrd: 38624, type: 27 }, { id: 53, no: 0, cond: 1, rwrd: 38623, type: 27 }, { id: 54, no: 0, cond: 1, rwrd: 38628, type: 27 },
|
||||
{ id: 55, no: 0, cond: 1, rwrd: 38736, type: 25 }, { id: 56, no: 1, cond: 1, rwrd: 38736, type: 25 }, { id: 57, no: 2, cond: 1, rwrd: 38736, type: 25 }, { id: 58, no: 3, cond: 1, rwrd: 38736, type: 25 },
|
||||
{ id: 59, no: 0, cond: 1, rwrd: 38735, type: 25 }, { id: 60, no: 1, cond: 1, rwrd: 38735, type: 25 }, { id: 61, no: 2, cond: 1, rwrd: 38735, type: 25 }, { id: 62, no: 3, cond: 1, rwrd: 38735, type: 25 },
|
||||
{ id: 63, no: 0, cond: 1, rwrd: 38728, type: 25 }, { id: 64, no: 1, cond: 1, rwrd: 38728, type: 25 }, { id: 65, no: 2, cond: 1, rwrd: 38728, type: 25 }, { id: 66, no: 3, cond: 1, rwrd: 38728, type: 25 },
|
||||
{ id: 67, no: 0, cond: 1, rwrd: 38624, type: 25 }, { id: 68, no: 1, cond: 1, rwrd: 38624, type: 25 }, { id: 69, no: 2, cond: 1, rwrd: 38624, type: 25 }, { id: 70, no: 3, cond: 1, rwrd: 38624, type: 25 }, { id: 71, no: 4, cond: 1, rwrd: 38624, type: 25, dep: [67, 68, 69, 70, 72, 73, 74, 75, 77, 78, 79, 80] },
|
||||
{ id: 72, no: 0, cond: 1, rwrd: 38623, type: 25 }, { id: 73, no: 1, cond: 1, rwrd: 38623, type: 25 }, { id: 74, no: 2, cond: 1, rwrd: 38623, type: 25 }, { id: 75, no: 3, cond: 1, rwrd: 38623, type: 25 }, { id: 76, no: 4, cond: 1, rwrd: 38623, type: 25, dep: [67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80] },
|
||||
{ id: 77, no: 0, cond: 1, rwrd: 38628, type: 25 }, { id: 78, no: 1, cond: 1, rwrd: 38628, type: 25 }, { id: 79, no: 2, cond: 1, rwrd: 38628, type: 25 }, { id: 80, no: 3, cond: 1, rwrd: 38628, type: 25 },
|
||||
{ id: 81, no: 0, cond: 1, rwrd: 1185, type: 201, save: 1, dep: [67, 68, 69, 70, 72, 73, 74, 75, 77, 78, 79, 80] },
|
||||
{ id: 82, no: 0, cond: 1, rwrd: 1186, type: 201, save: 1, dep: [67, 68, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79, 80] },
|
||||
{ id: 83, no: 0, cond: 1, rwrd: 38746, type: 17, comp: 0, save: 1 },
|
||||
{ id: 84, no: 0, cond: 1, rwrd: 38745, type: 17, comp: 0, save: 1 },
|
||||
{ id: 85, no: 0, cond: 1, rwrd: 38744, type: 17, comp: 0, save: 1 },
|
||||
{ id: 86, no: 0, cond: 1, rwrd: 38747, type: 17, comp: 0, save: 1 },
|
||||
{ id: 87, no: 0, cond: 1, rwrd: 38748, type: 17, comp: 0, save: 1 },
|
||||
{ id: 88, no: 0, cond: 1, rwrd: 1189, type: 201, save: 1 },
|
||||
{ id: 89, no: 0, cond: 1, rwrd: 1188, type: 201, save: 1 },
|
||||
{ id: 90, no: 0, cond: 1, rwrd: 38737, type: 50 },
|
||||
{ id: 91, no: 0, cond: 1, rwrd: 38737, type: 52 },
|
||||
{ id: 92, no: 0, cond: 1, rwrd: 38738, type: 50 },
|
||||
{ id: 93, no: 0, cond: 1, rwrd: 38738, type: 52 },
|
||||
{ id: 94, no: 0, cond: 1, rwrd: 38212, type: 52 },
|
||||
{ id: 95, no: 0, cond: 1, rwrd: 38295, type: 52 },
|
||||
{ id: 96, no: 0, cond: 1, rwrd: 38258, type: 52 },
|
||||
{ id: 97, no: 0, cond: 1, rwrd: 38263, type: 52 },
|
||||
{ id: 98, no: 0, cond: 1, rwrd: 38195, type: 52 },
|
||||
{ id: 99, no: 0, cond: 1, rwrd: 38739, type: 52 },
|
||||
{ id: 100, no: 0, cond: 1, rwrd: 38420, type: 52 },
|
||||
{ id: 101, no: 0, cond: 1, rwrd: 38405, type: 52 },
|
||||
{ id: 102, no: 0, cond: 1, rwrd: 38442, type: 52 },
|
||||
{ id: 103, no: 0, cond: 1, rwrd: 37222, type: 50 },
|
||||
{ id: 104, no: 0, cond: 1, rwrd: 37604, type: 50 },
|
||||
{ id: 105, no: 0, cond: 1, rwrd: 37604, type: 52 },
|
||||
{ id: 106, no: 0, cond: 1, rwrd: 37234, type: 50 },
|
||||
{ id: 107, no: 0, cond: 1, rwrd: 37363, type: 50 },
|
||||
{ id: 108, no: 0, cond: 1, rwrd: 38436, type: 52 },
|
||||
{ id: 109, no: 0, cond: 1, rwrd: 1197, type: 201, save: 1 },
|
||||
{ id: 110, no: 0, cond: 1, rwrd: 38759, type: 43, comp: 0, save: 1 },
|
||||
{ id: 111, no: 0, cond: 1, rwrd: 38758, type: 43, comp: 0, save: 1 },
|
||||
{ id: 112, no: 0, cond: 1, rwrd: 38756, type: 43, comp: 0, save: 1 },
|
||||
{ id: 113, no: 0, cond: 1, rwrd: 1201, type: 201, save: 1 },
|
||||
{ id: 114, no: 0, cond: 1, rwrd: 38760, type: 50 },
|
||||
{ id: 115, no: 0, cond: 1, rwrd: 38760, type: 52 },
|
||||
{ id: 116, no: 0, cond: 1, rwrd: 38761, type: 50 },
|
||||
{ id: 117, no: 0, cond: 1, rwrd: 38428, type: 52 },
|
||||
{ id: 118, no: 0, cond: 1, rwrd: 38424, type: 52 }
|
||||
]
|
||||
|
||||
export const LEAGUE_WORLD = [
|
||||
{
|
||||
id: 1,
|
||||
name: "第1回 WORLD LEAGUE",
|
||||
name_eng: "The 1st WORLD LEAGUE",
|
||||
start: BigInt(Date.parse('8 Oct 2024 01:00:00 GMT')),
|
||||
end: BigInt(Date.parse('6 Nov 2024 08:00:00 GMT')),
|
||||
summary: BigInt(Date.parse('6 Nov 2024 09:00:00 GMT')),
|
||||
advanceBorder: [0, 0, 0]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "第2回 WORLD LEAGUE",
|
||||
name_eng: "The 2nd WORLD LEAGUE",
|
||||
start: BigInt(Date.parse('14 Nov 2024 01:00:00 GMT')),
|
||||
end: BigInt(Date.parse('11 Dec 2024 08:00:00 GMT')),
|
||||
summary: BigInt(Date.parse('11 Dec 2024 09:00:00 GMT')),
|
||||
advanceBorder: [0, 0, 0]
|
||||
}
|
||||
]
|
||||
|
||||
export const LOCKED_SONGS = [
|
||||
{
|
||||
unlock_date: BigInt(Date.parse("1 Jul 2024 01:00:00 GMT")),
|
||||
ids: [38583],
|
||||
ids_cha: []
|
||||
},
|
||||
{
|
||||
unlock_date: BigInt(Date.parse("31 Jul 2024 01:00:00 GMT")),
|
||||
ids: [38591, 38593, 38597, 38592, 38598, 38595, 38596, 38594, 38599],
|
||||
ids_cha: [38591]
|
||||
},
|
||||
{
|
||||
unlock_date: BigInt(Date.parse("30 Aug 2024 01:00:00 GMT")),
|
||||
ids: [],
|
||||
ids_cha: [38625, 38626, 38627]
|
||||
},
|
||||
{
|
||||
unlock_date: BigInt(Date.parse("29 Nov 2024 01:00:00 GMT")),
|
||||
ids: [38632, 38618, 38619, 38637, 38639, 38638],
|
||||
ids_cha: [38102, 38517]
|
||||
},
|
||||
{
|
||||
unlock_date: BigInt(Date.parse("27 Dec 2024 01:00:00 GMT")),
|
||||
ids: [38644, 38647, 38645, 38651, 38648, 38650, 38646, 38649],
|
||||
ids_cha: [38138, 38017]
|
||||
}
|
||||
];
|
||||
@@ -0,0 +1,18 @@
|
||||
export const eventLog: EPR = (info, data, send) => {
|
||||
return send.object({
|
||||
gamesession: K.ITEM("s64", BigInt(1)),
|
||||
logsendflg: K.ITEM("s32", 0),
|
||||
logerrlevel: K.ITEM("s32", 0),
|
||||
evtidnosendflg: K.ITEM("s32", 0)
|
||||
});
|
||||
};
|
||||
|
||||
export const convcardnumber: EPR = (info, data, send) => {
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
|
||||
data: {
|
||||
card_number: K.ITEM("str", $(data).str("data.card_id").split("|")[0])
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,907 @@
|
||||
import { Profile } from "../models/profile";
|
||||
import { ProfileWorld, ScoreWorld, EventWorld, GhostWorld, RivalWorld, HiScoreWorld, LeagueWorld, CustomizeWorld } from "../models/ddrworld";
|
||||
import { SONGS_WORLD, SONGS_OVERRIDE_WORLD, EVENTS_WORLD, LEAGUE_WORLD, LOCKED_SONGS } from "../data/world";
|
||||
|
||||
function getLastGhostId(ghost: any) {
|
||||
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
|
||||
}
|
||||
|
||||
async function saveScores(refid: string, hiScoreInfo: any, songId: number, style: number, difficulty: number, rank: number, clearKind: number, score: number, exScore: number, maxCombo: number, flareForce: number, ghostSize: number, ghost: string) {
|
||||
let stepScore = await DB.FindOne<ScoreWorld>(refid, {collection: "score3", songId: songId, style: style, difficulty: difficulty})
|
||||
let ghostData = await DB.Find<GhostWorld>(null, {collection: "ghost3"})
|
||||
let lastGhostId = getLastGhostId(ghostData)
|
||||
let hiScoreCheck = score
|
||||
let ghostId = 0
|
||||
if(lastGhostId === 0) {
|
||||
ghostId = 1
|
||||
} else ghostId = lastGhostId += 1
|
||||
/*
|
||||
Ghost data gets created when there is no existing data and it gets updated when getting a higher or the same score
|
||||
Side effect of this is when you have set a high score prior to this update, the ghost data wouldn't be updated unless you break or match that high score.
|
||||
Unfortunately I could not find a way to match the old scores to their respective ghost data, since the old ghost data only stored the song id and difficulty, and not the style (single/double.) Stupid me.
|
||||
Still needs more work.
|
||||
*/
|
||||
if(stepScore) {
|
||||
ghostId = (stepScore.ghostId) ? stepScore.ghostId : ghostId
|
||||
let stepGhost = await DB.FindOne<GhostWorld>(null, {collection: "ghost3", ghostId: ghostId })
|
||||
|
||||
if(stepGhost) {
|
||||
ghostSize = (score >= stepScore.score) ? ghostSize : stepGhost.ghostSize
|
||||
ghost = (score >= stepScore.score) ? ghost : stepGhost.ghost
|
||||
}
|
||||
|
||||
rank = (rank < stepScore.rank) ? rank : stepScore.rank;
|
||||
clearKind = (clearKind != 6 && clearKind > stepScore.clearKind) ? clearKind : stepScore.clearKind;
|
||||
score = (score > stepScore.score) ? score : stepScore.score;
|
||||
exScore = (exScore > stepScore.exScore) ? exScore : stepScore.exScore;
|
||||
maxCombo = (maxCombo > stepScore.maxCombo) ? maxCombo : stepScore.maxCombo;
|
||||
flareForce = (flareForce > stepScore.flareForce) ? flareForce : stepScore.flareForce;
|
||||
|
||||
}
|
||||
|
||||
await DB.Upsert<ScoreWorld>(refid, {
|
||||
collection: "score3",
|
||||
songId,
|
||||
style,
|
||||
difficulty
|
||||
}, {
|
||||
$set: {
|
||||
ghostId,
|
||||
rank,
|
||||
clearKind,
|
||||
score,
|
||||
exScore,
|
||||
maxCombo,
|
||||
flareForce
|
||||
}
|
||||
});
|
||||
|
||||
await DB.Upsert<GhostWorld>(refid, {
|
||||
collection: "ghost3",
|
||||
ghostId,
|
||||
}, {
|
||||
$set: {
|
||||
ghostSize,
|
||||
ghost
|
||||
}
|
||||
});
|
||||
|
||||
let slot = 0
|
||||
let country = hiScoreInfo.country
|
||||
let region = hiScoreInfo.region
|
||||
let customerCode = hiScoreInfo.customerCode
|
||||
let companyCode = hiScoreInfo.companyCode
|
||||
let locationId = hiScoreInfo.locationId
|
||||
let pcbid = hiScoreInfo.pcbid
|
||||
let dancerName = hiScoreInfo.dancerName
|
||||
|
||||
let worldBreak = false
|
||||
let areaBreak = false
|
||||
let machineBreak = false
|
||||
|
||||
// Hiscore stuff
|
||||
let hiScoreWorld1 = await DB.FindOne<HiScoreWorld>(null, {collection: 'hiscore3', slot: 1, songId: songId, style: style, difficulty: difficulty})
|
||||
ghostData = await DB.Find<GhostWorld>(null, {collection: "ghost3"})
|
||||
lastGhostId = getLastGhostId(ghostData)
|
||||
ghostId = 0
|
||||
if(lastGhostId === 0) ghostId = 1
|
||||
else ghostId = lastGhostId += 1
|
||||
|
||||
if(hiScoreWorld1) {
|
||||
if(hiScoreCheck >= hiScoreWorld1.score) {
|
||||
worldBreak = true
|
||||
ghostId = (hiScoreWorld1.ghostId) ? hiScoreWorld1.ghostId : ghostId
|
||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
||||
}
|
||||
} else {
|
||||
worldBreak = true
|
||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
||||
}
|
||||
slot = 1
|
||||
if(worldBreak) {
|
||||
await DB.Upsert<HiScoreWorld>(refid, {collection: "hiscore3", slot, songId, style, difficulty}, { $set: { country, region, customerCode, companyCode, locationId, pcbid, dancerName, score: hiScoreCheck, ghostId }});
|
||||
}
|
||||
|
||||
let hiScoreArea1 = await DB.FindOne<HiScoreWorld>(null, {collection: 'hiscore3', slot: 2, locationId: locationId, songId: songId, style: style, difficulty: difficulty})
|
||||
ghostData = await DB.Find<GhostWorld>(null, {collection: "ghost3"})
|
||||
lastGhostId = getLastGhostId(ghostData)
|
||||
ghostId = 0
|
||||
if(lastGhostId === 0) ghostId = 1
|
||||
else ghostId = lastGhostId += 1
|
||||
|
||||
if(hiScoreArea1) {
|
||||
if(hiScoreCheck >= hiScoreArea1.score) {
|
||||
areaBreak = true
|
||||
ghostId = (hiScoreArea1.ghostId) ? hiScoreArea1.ghostId : ghostId
|
||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
||||
}
|
||||
} else {
|
||||
areaBreak = true
|
||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
||||
}
|
||||
slot = 2
|
||||
if(areaBreak) {
|
||||
await DB.Upsert<HiScoreWorld>(refid, {collection: "hiscore3", slot, locationId, songId, style, difficulty}, { $set: { country, region, customerCode, companyCode, pcbid, dancerName, score: hiScoreCheck, ghostId }});
|
||||
}
|
||||
|
||||
|
||||
let hiScoreMachine1 = await DB.FindOne<HiScoreWorld>(null, {collection: 'hiscore3', slot: 3, locationId: locationId, pcbid: pcbid, songId: songId, style: style, difficulty: difficulty})
|
||||
ghostData = await DB.Find<GhostWorld>(null, {collection: "ghost3"})
|
||||
lastGhostId = getLastGhostId(ghostData)
|
||||
ghostId = 0
|
||||
if(lastGhostId === 0) ghostId = 1
|
||||
else ghostId = lastGhostId += 1
|
||||
|
||||
if(hiScoreMachine1) {
|
||||
if(hiScoreCheck >= hiScoreMachine1.score) {
|
||||
machineBreak = true
|
||||
ghostId = (hiScoreMachine1.ghostId) ? hiScoreMachine1.ghostId : ghostId
|
||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
||||
}
|
||||
} else {
|
||||
machineBreak = true
|
||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
||||
}
|
||||
slot = 3
|
||||
if(machineBreak) {
|
||||
await DB.Upsert<HiScoreWorld>(refid, {collection: "hiscore3", slot, locationId, pcbid, songId, style, difficulty}, { $set: { country, region, customerCode, companyCode, dancerName, score: hiScoreCheck, ghostId }});
|
||||
}
|
||||
}
|
||||
|
||||
export const playerdatanew: EPR = async (info, data, send) => {
|
||||
const refid = $(data).str("data.refid");
|
||||
let ddrCode = _.random(1, 99999999)
|
||||
await DB.Upsert<ProfileWorld>(refid, { collection: "profile3" }, {
|
||||
collection: "profile3",
|
||||
ddrCode: ddrCode
|
||||
})
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
refid: K.ITEM("str", refid),
|
||||
ddrcode: K.ITEM("s32", ddrCode),
|
||||
istakeover: K.ITEM('bool', false)
|
||||
})
|
||||
}
|
||||
|
||||
export const playerdatasave: EPR = async (info, data, send) => {
|
||||
const refid = $(data).str("data.refid");
|
||||
if(!refid.startsWith("X000")) {
|
||||
if($(data).number("data.savekind") === 1) {
|
||||
await DB.Upsert<ProfileWorld>(refid, { collection: "profile3" }, {
|
||||
collection: "profile3",
|
||||
|
||||
ddrCode: $(data).number('data.common.ddrcode'),
|
||||
dancerName: $(data).str('data.common.dancername'),
|
||||
area: $(data).number('data.common.area'),
|
||||
extraStar: $(data).number('data.common.extrastar'),
|
||||
playCount: 0,
|
||||
weight: 0,
|
||||
todayCal: $(data).number('data.common.today_cal'),
|
||||
isDispWeight: true,
|
||||
prePlayableNum: 0,
|
||||
|
||||
opHispeed: $(data).number('data.option.hispeed'),
|
||||
opGauge: $(data).number('data.option.gauge'),
|
||||
opFastSlow: $(data).number('data.option.fastslow'),
|
||||
opGuideline: $(data).number('data.option.guideline'),
|
||||
opStepZone: $(data).number('data.option.stepzone'),
|
||||
opTimingDisp: $(data).number('data.option.timing_disp'),
|
||||
opVisibility: $(data).number('data.option.visibility'),
|
||||
opVisibleTime: $(data).number('data.option.visible_time'),
|
||||
opLane: $(data).number('data.option.lane'),
|
||||
opLaneHiddenPos: $(data).number('data.option.lane_hiddenpos'),
|
||||
opLaneSuddenPos: $(data).number('data.option.lane_suddenpos'),
|
||||
opLaneHidSudPos: $(data).number('data.option.lane_hidsudpos'),
|
||||
opLaneFilter: $(data).number('data.option.lane_filter'),
|
||||
opScrollDirection: $(data).number('data.option.scroll_direction'),
|
||||
opScrollMoving: $(data).number('data.option.scroll_moving'),
|
||||
opArrowPriority: $(data).number('data.option.arrow_priority'),
|
||||
opArrowPlacement: $(data).number('data.option.arrow_placement'),
|
||||
opArrowColor: $(data).number('data.option.arrow_color'),
|
||||
opArrowDesign: $(data).number('data.option.arrow_design'),
|
||||
opCutTiming: $(data).number('data.option.cut_timing'),
|
||||
opCutFreeze: $(data).number('data.option.cut_freeze'),
|
||||
opCutJump: $(data).number('data.option.cut_jump'),
|
||||
|
||||
lpMode: $(data).number('data.lastplay.mode'),
|
||||
lpFolder: $(data).number('data.lastplay.folder'),
|
||||
lpMcode: $(data).number('data.lastplay.mcode'),
|
||||
lpStyle: $(data).number('data.lastplay.style'),
|
||||
lpDifficulty: $(data).number('data.lastplay.difficulty'),
|
||||
lpWindowMain: $(data).number('data.lastplay.window_main'),
|
||||
lpWindowSub: $(data).number('data.lastplay.window_sub'),
|
||||
lpTarget: $(data).number('data.lastplay.target'),
|
||||
lpTabMain: $(data).number('data.lastplay.tab_main'),
|
||||
lpTabSub: $(data).number('data.lastplay.tab_sub'),
|
||||
|
||||
fsTitle: $(data).number('data.filtersort.title'),
|
||||
fsVersion: $(data).number('data.filtersort.version'),
|
||||
fsGenre: $(data).number('data.filtersort.genre'),
|
||||
fsBpm: $(data).number('data.filtersort.bpm'),
|
||||
fsEvent: $(data).number('data.filtersort.event'),
|
||||
fsLevel: $(data).number('data.filtersort.level'),
|
||||
fsFlareRank: $(data).number('data.filtersort.flare_rank'),
|
||||
fsClearRank: $(data).number('data.filtersort.clear_rank'),
|
||||
fsFlareSkillTarget: $(data).number('data.filtersort.flare_skill_target'),
|
||||
fsRivalFlareSkill: $(data).number('data.filtersort.rival_flare_skill'),
|
||||
fsRivalScoreRank: $(data).number('data.filtersort.rival_score_rank'),
|
||||
fsSortType: $(data).number('data.filtersort.sort_type'),
|
||||
fsOrderType: $(data).number('data.filtersort.order_type'),
|
||||
|
||||
cgTipsBasic: $(data).number('data.checkguide.tips_basic'),
|
||||
cgTipsOption: $(data).number('data.checkguide.tips_option'),
|
||||
cgTipsEvent: $(data).number('data.checkguide.tips_event'),
|
||||
cgTipsGimmick: $(data).number('data.checkguide.tips_gimmick'),
|
||||
cgTipsAdvance: $(data).number('data.checkguide.tips_advance'),
|
||||
cgGuideScene: $(data).number('data.checkguide.guide_scene')
|
||||
})
|
||||
}
|
||||
else if($(data).number("data.savekind") === 2) {
|
||||
let hiScoreInfo = {
|
||||
country: $(data).str("data.country"),
|
||||
region: $(data).str("data.region"),
|
||||
customerCode: $(data).str("data.customercode"),
|
||||
companyCode: $(data).str("data.companycode"),
|
||||
locationId: $(data).str("data.locationid"),
|
||||
pcbid: $(data).str("data.pcbid"),
|
||||
dancerName: $(data).str("data.common.dancername")
|
||||
}
|
||||
|
||||
let songId = $(data).number("data.result.mcode");
|
||||
let style = $(data).number("data.result.style");
|
||||
let difficulty = $(data).number("data.result.difficulty");
|
||||
let rank = $(data).number("data.result.rank");
|
||||
let clearKind = $(data).number("data.result.clearkind");
|
||||
let score = $(data).number("data.result.score");
|
||||
let exScore = $(data).number("data.result.exscore");
|
||||
let maxCombo = $(data).number("data.result.maxcombo");
|
||||
let flareForce = $(data).number("data.result.flare_force");
|
||||
let ghostSize = $(data).number("data.result.ghostsize");
|
||||
let ghost = $(data).str("data.result.ghost");
|
||||
await saveScores(refid, hiScoreInfo, songId, style, difficulty, rank, clearKind, score, exScore, maxCombo, flareForce, ghostSize, ghost)
|
||||
}
|
||||
else if($(data).number("data.savekind") === 3) {
|
||||
let profile = await DB.FindOne<ProfileWorld>(refid, {collection: "profile3"})
|
||||
await DB.Upsert<ProfileWorld>(refid, { collection: "profile3" }, {
|
||||
collection: "profile3",
|
||||
|
||||
ddrCode: $(data).number('data.common.ddrcode'),
|
||||
dancerName: $(data).str('data.common.dancername'),
|
||||
area: $(data).number('data.common.area'),
|
||||
extraStar: $(data).number('data.common.extrastar'),
|
||||
playCount: profile.playCount += 1,
|
||||
weight: 0,
|
||||
todayCal: $(data).number('data.common.today_cal'),
|
||||
isDispWeight: true,
|
||||
prePlayableNum: 0,
|
||||
|
||||
opHispeed: $(data).number('data.option.hispeed'),
|
||||
opGauge: $(data).number('data.option.gauge'),
|
||||
opFastSlow: $(data).number('data.option.fastslow'),
|
||||
opGuideline: $(data).number('data.option.guideline'),
|
||||
opStepZone: $(data).number('data.option.stepzone'),
|
||||
opTimingDisp: $(data).number('data.option.timing_disp'),
|
||||
opVisibility: $(data).number('data.option.visibility'),
|
||||
opVisibleTime: $(data).number('data.option.visible_time'),
|
||||
opLane: $(data).number('data.option.lane'),
|
||||
opLaneHiddenPos: $(data).number('data.option.lane_hiddenpos'),
|
||||
opLaneSuddenPos: $(data).number('data.option.lane_suddenpos'),
|
||||
opLaneHidSudPos: $(data).number('data.option.lane_hidsudpos'),
|
||||
opLaneFilter: $(data).number('data.option.lane_filter'),
|
||||
opScrollDirection: $(data).number('data.option.scroll_direction'),
|
||||
opScrollMoving: $(data).number('data.option.scroll_moving'),
|
||||
opArrowPriority: $(data).number('data.option.arrow_priority'),
|
||||
opArrowPlacement: $(data).number('data.option.arrow_placement'),
|
||||
opArrowColor: $(data).number('data.option.arrow_color'),
|
||||
opArrowDesign: $(data).number('data.option.arrow_design'),
|
||||
opCutTiming: $(data).number('data.option.cut_timing'),
|
||||
opCutFreeze: $(data).number('data.option.cut_freeze'),
|
||||
opCutJump: $(data).number('data.option.cut_jump'),
|
||||
|
||||
lpMode: $(data).number('data.lastplay.mode'),
|
||||
lpFolder: $(data).number('data.lastplay.folder'),
|
||||
lpMcode: $(data).number('data.lastplay.mcode'),
|
||||
lpStyle: $(data).number('data.lastplay.style'),
|
||||
lpDifficulty: $(data).number('data.lastplay.difficulty'),
|
||||
lpWindowMain: $(data).number('data.lastplay.window_main'),
|
||||
lpWindowSub: $(data).number('data.lastplay.window_sub'),
|
||||
lpTarget: $(data).number('data.lastplay.target'),
|
||||
lpTabMain: $(data).number('data.lastplay.tab_main'),
|
||||
lpTabSub: $(data).number('data.lastplay.tab_sub'),
|
||||
|
||||
fsTitle: $(data).number('data.filtersort.title'),
|
||||
fsVersion: $(data).number('data.filtersort.version'),
|
||||
fsGenre: $(data).number('data.filtersort.genre'),
|
||||
fsBpm: $(data).number('data.filtersort.bpm'),
|
||||
fsEvent: $(data).number('data.filtersort.event'),
|
||||
fsLevel: $(data).number('data.filtersort.level'),
|
||||
fsFlareRank: $(data).number('data.filtersort.flare_rank'),
|
||||
fsClearRank: $(data).number('data.filtersort.clear_rank'),
|
||||
fsFlareSkillTarget: $(data).number('data.filtersort.flare_skill_target'),
|
||||
fsRivalFlareSkill: $(data).number('data.filtersort.rival_flare_skill'),
|
||||
fsRivalScoreRank: $(data).number('data.filtersort.rival_score_rank'),
|
||||
fsSortType: $(data).number('data.filtersort.sort_type'),
|
||||
fsOrderType: $(data).number('data.filtersort.order_type'),
|
||||
|
||||
cgTipsBasic: $(data).number('data.checkguide.tips_basic'),
|
||||
cgTipsOption: $(data).number('data.checkguide.tips_option'),
|
||||
cgTipsEvent: $(data).number('data.checkguide.tips_event'),
|
||||
cgTipsGimmick: $(data).number('data.checkguide.tips_gimmick'),
|
||||
cgTipsAdvance: $(data).number('data.checkguide.tips_advance'),
|
||||
cgGuideScene: $(data).number('data.checkguide.guide_scene')
|
||||
})
|
||||
|
||||
let eventData = $(data).elements('data.event')
|
||||
if(eventData) {
|
||||
for(const e of eventData) {
|
||||
let eid = e.number('eventid')
|
||||
let eno = e.number('eventno')
|
||||
let etype = e.number('eventtype')
|
||||
let ctime = e.number('comptime')
|
||||
let sdata = e.number('savedata')
|
||||
|
||||
await DB.Upsert<EventWorld>(refid, { collection: "event3", eventId: eid, eventNo: eno, eventType: etype }, {
|
||||
collection: "event3",
|
||||
eventId: eid,
|
||||
eventNo: eno,
|
||||
eventType: etype,
|
||||
compTime: ctime,
|
||||
saveData: sdata
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let leagueData = $(data).element('data.league.current')
|
||||
if(leagueData) {
|
||||
let leagueId = leagueData.number("league_id")
|
||||
let score = leagueData.number("score")
|
||||
let playCount = leagueData.number("playcount")
|
||||
let leagueExist = await DB.FindOne<LeagueWorld>(refid, {collection: 'league3', id: leagueId})
|
||||
|
||||
await DB.Upsert<LeagueWorld>(refid, { collection: "league3", id: leagueId }, {
|
||||
$set: {
|
||||
class: ((leagueExist.class === 0) ? 1 : leagueExist.class),
|
||||
score: score,
|
||||
playCount: playCount
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0)
|
||||
})
|
||||
}
|
||||
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 1)
|
||||
})
|
||||
};
|
||||
|
||||
export const playerdataload: EPR = async (info, data, send) => {
|
||||
const refid = $(data).str("data.refid");
|
||||
const profile = await DB.FindOne<ProfileWorld>(refid, { collection: "profile3" });
|
||||
|
||||
if (!profile || !profile.dancerName || refid.startsWith("X000")) {
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
refid: K.ITEM("str", refid),
|
||||
gamesession: K.ITEM('s64', BigInt(1)),
|
||||
servertime: K.ITEM("u64", BigInt(getDate())),
|
||||
is_locked: K.ITEM('bool', false),
|
||||
common: {
|
||||
ddrcode: K.ITEM("s32", profile ? profile.ddrCode : 0),
|
||||
dancername: K.ITEM("str", ''),
|
||||
is_new: K.ITEM('bool', (!profile || refid.startsWith("X000")) ? true : false),
|
||||
is_registering: K.ITEM('bool', (profile && !profile.dancerName) ? true : false),
|
||||
is_takeover: K.ITEM('bool', false),
|
||||
area: K.ITEM("s32", 0),
|
||||
extrastar: K.ITEM("s32", 0),
|
||||
playcount: K.ITEM("s32", 0),
|
||||
weight: K.ITEM("s32", 0),
|
||||
today_cal: K.ITEM("u64", BigInt(0)),
|
||||
is_disp_weight: K.ITEM("bool", false),
|
||||
pre_playable_num: K.ITEM("s32", 0)
|
||||
},
|
||||
option: {
|
||||
hispeed: K.ITEM("s32", 0),
|
||||
gauge: K.ITEM("s32", 0),
|
||||
fastslow: K.ITEM("s32", 0),
|
||||
guideline: K.ITEM("s32", 0),
|
||||
stepzone: K.ITEM("s32", 0),
|
||||
timing_disp: K.ITEM("s32", 0),
|
||||
visibility: K.ITEM("s32", 0),
|
||||
visible_time: K.ITEM("s32", 0),
|
||||
lane: K.ITEM("s32", 0),
|
||||
lane_hiddenpos: K.ITEM("s32", 0),
|
||||
lane_suddenpos: K.ITEM("s32", 0),
|
||||
lane_hidsudpos: K.ITEM("s32", 0),
|
||||
lane_filter: K.ITEM("s32", 0),
|
||||
scroll_direction: K.ITEM("s32", 0),
|
||||
scroll_moving: K.ITEM("s32", 0),
|
||||
arrow_priority: K.ITEM("s32", 0),
|
||||
arrow_placement: K.ITEM("s32", 0),
|
||||
arrow_color: K.ITEM("s32", 0),
|
||||
arrow_design: K.ITEM("s32", 0),
|
||||
cut_timing: K.ITEM("s32", 0),
|
||||
cut_freeze: K.ITEM("s32", 0),
|
||||
cut_jump: K.ITEM("s32", 0)
|
||||
},
|
||||
lastplay: {
|
||||
mode: K.ITEM("s32", 0),
|
||||
folder: K.ITEM("s32", 0),
|
||||
mcode: K.ITEM("s32", 0),
|
||||
style: K.ITEM("s32", 0),
|
||||
difficulty: K.ITEM("s32", 0),
|
||||
window_main: K.ITEM("s32", 0),
|
||||
window_sub: K.ITEM("s32", 0),
|
||||
target: K.ITEM("s32", 0),
|
||||
tab_main: K.ITEM("s32", 0),
|
||||
tab_sub: K.ITEM("s32", 0)
|
||||
},
|
||||
filtersort: {
|
||||
title: K.ITEM("u64", BigInt(0)),
|
||||
version: K.ITEM("u64", BigInt(0)),
|
||||
genre: K.ITEM("u64", BigInt(0)),
|
||||
bpm: K.ITEM("u64", BigInt(0)),
|
||||
event: K.ITEM("u64", BigInt(0)),
|
||||
level: K.ITEM("u64", BigInt(0)),
|
||||
flare_rank: K.ITEM("u64", BigInt(0)),
|
||||
clear_rank: K.ITEM("u64", BigInt(0)),
|
||||
flare_skill_target: K.ITEM("u64", BigInt(0)),
|
||||
rival_flare_skill: K.ITEM("u64", BigInt(0)),
|
||||
rival_score_rank: K.ITEM("u64", BigInt(0)),
|
||||
sort_type: K.ITEM("u64", BigInt(0)),
|
||||
order_type: K.ITEM("s32", 0),
|
||||
},
|
||||
checkguide: {
|
||||
tips_basic: K.ITEM("u64", BigInt(0)),
|
||||
tips_option: K.ITEM("u64", BigInt(0)),
|
||||
tips_event: K.ITEM("u64", BigInt(0)),
|
||||
tips_gimmick: K.ITEM("u64", BigInt(0)),
|
||||
tips_advance: K.ITEM("u64", BigInt(0)),
|
||||
guide_scene: K.ITEM("u64", BigInt(0)),
|
||||
},
|
||||
rival: [
|
||||
{
|
||||
slot: K.ITEM("s32", 0),
|
||||
rivalcode: K.ITEM("s32", 0)
|
||||
}
|
||||
],
|
||||
score: [
|
||||
{
|
||||
mcode: K.ITEM("s32", 0),
|
||||
score_single: {
|
||||
score_str: K.ITEM("str", "")
|
||||
},
|
||||
score_double: {
|
||||
score_str: K.ITEM("str", "")
|
||||
}
|
||||
}
|
||||
],
|
||||
event: {
|
||||
event_str: K.ITEM("str", "")
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
// await addGhostId(refid)
|
||||
const scores = await DB.Find<ScoreWorld>(refid, { collection: "score3" });
|
||||
let scoreFin = []
|
||||
if(scores) {
|
||||
for(const scoreData of scores) {
|
||||
let mcodeIndex = scoreFin.findIndex(x => $(x).number('mcode') === scoreData.songId)
|
||||
if(mcodeIndex < 0) {
|
||||
let scr = {}
|
||||
scr['mcode'] = K.ITEM('s32', scoreData.songId)
|
||||
scr['score_single'] = []
|
||||
scr['score_double'] = []
|
||||
/*
|
||||
difficulty,idk,grade,clearkind,score,ghostid,flaredisp,flarepoints,idk
|
||||
needs more work, 9 vals
|
||||
*/
|
||||
scr[(scoreData.style === 0) ? 'score_single' : 'score_double'] = [
|
||||
{
|
||||
score_str: K.ITEM('str', scoreData.difficulty + ',1,' + scoreData.rank + ',' + scoreData.clearKind + ',' + scoreData.score + ',' + scoreData.ghostId + ',' + scoreData.flareForce + ',' + scoreData.flareForce)
|
||||
}
|
||||
]
|
||||
scoreFin.push(scr)
|
||||
|
||||
} else {
|
||||
scoreFin[mcodeIndex][(scoreData.style === 0) ? 'score_single' : 'score_double'].push({
|
||||
score_str: K.ITEM('str', scoreData.difficulty + ',1,' + scoreData.rank + ',' + scoreData.clearKind + ',' + scoreData.score + ',' + scoreData.ghostId + ',' + scoreData.flareForce + ',' + scoreData.flareForce)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let eventFin = []
|
||||
let eventData = await DB.Find<EventWorld>(refid, { collection: "event3"});
|
||||
for(const event of EVENTS_WORLD) {
|
||||
let eData = eventData.find(e => e.eventId === event.id)
|
||||
let condmet = true
|
||||
let compTime = 0
|
||||
if(event.dep) {
|
||||
event.dep.forEach(dep => {
|
||||
let eData = eventData.find(e => e.eventId === dep)
|
||||
if(eData === undefined) condmet = false
|
||||
else if(eData.compTime === 0) condmet = false
|
||||
})
|
||||
}
|
||||
// id,type,no,condition,reward,comptime,savedata
|
||||
if(condmet) {
|
||||
if([17, 43].includes(event.type)) {
|
||||
if (eData) eData.compTime = eData.compTime ? 0 : 1
|
||||
compTime = event.comp ? 0 : 1
|
||||
}
|
||||
eventFin.push({
|
||||
event_str: K.ITEM('str', event.id + ',' + event.type + ',' + event.no + ',' + event.cond + ',' + event.rwrd + ',' + (eData ? BigInt(eData.compTime) : compTime) + ',' + ((eData) ? eData.saveData : ((event.save !== undefined) ? event.save : '0')))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
let leagueData = {}
|
||||
let curLeague = LEAGUE_WORLD[1]
|
||||
let league = await DB.FindOne(refid, {collection: 'league3', id: curLeague.id})
|
||||
if(!league) {
|
||||
let leagueClass = 0
|
||||
let prevLeague = await DB.FindOne(refid, {collection: 'league3', id: curLeague.id - 1})
|
||||
if(prevLeague) leagueClass = prevLeague['class']
|
||||
await DB.Upsert<LeagueWorld>(refid, { collection: "league3", id: curLeague.id }, {
|
||||
collection: "league3",
|
||||
|
||||
id: curLeague.id,
|
||||
class: leagueClass,
|
||||
score: 0,
|
||||
playCount: 0,
|
||||
ended: false,
|
||||
})
|
||||
}
|
||||
league = await DB.FindOne(refid, {collection: 'league3', id: curLeague.id})
|
||||
if(league) {
|
||||
let leagueAll = await DB.Find(null, {collection: 'league3', id: curLeague.id, class: league['class']})
|
||||
let joinNum = leagueAll.length
|
||||
let resultClass = league['class']
|
||||
let promoteScore = 0
|
||||
let promoteRank = 0
|
||||
let demoteScore = 0
|
||||
let demoteRank = 0
|
||||
let leagueStatus = 0
|
||||
let leagueScores = leagueAll.map(a => a['score']).sort((a, b) => b - a)
|
||||
if(leagueScores[0] > 0) {
|
||||
if(league['class'] === 1) {
|
||||
promoteScore = Math.round(leagueScores[0] / 2)
|
||||
leagueScores = leagueScores.concat([promoteScore]).sort((a, b) => b - a)
|
||||
promoteRank = leagueScores.findIndex(s => s === promoteScore) + 1
|
||||
joinNum += ((joinNum < 2) ? 2 : 1)
|
||||
} else if(league['class'] === 2) {
|
||||
promoteScore = Math.round(leagueScores[0] - (leagueScores[0] - (35 / 100 * leagueScores[0])))
|
||||
demoteScore = Math.round(leagueScores[0] - (leagueScores[0] - (85 / 100 * leagueScores[0])))
|
||||
leagueScores = leagueScores.concat([promoteScore, demoteScore]).sort((a, b) => b - a)
|
||||
promoteRank = leagueScores.findIndex(s => s === promoteScore) + 1
|
||||
demoteScore = leagueScores.findIndex(s => s === demoteScore) + 1
|
||||
joinNum += 2
|
||||
} else if(league['class'] === 3) {
|
||||
demoteScore = Math.round(leagueScores[0] - (leagueScores[0] - (85 / 100 * leagueScores[0])))
|
||||
leagueScores = leagueScores.concat([demoteScore]).sort((a, b) => b - a)
|
||||
demoteRank = leagueScores.findIndex(s => s === demoteScore) + 1
|
||||
joinNum += ((joinNum < 2) ? 2 : 1)
|
||||
}
|
||||
}
|
||||
let rank = leagueScores.findIndex(s => s === league['score']) + 1
|
||||
let leagueClass = (league['class'] === 0) ? 1 : league['class']
|
||||
|
||||
if(leagueClass === 1 && league['score'] >= promoteScore) resultClass += 1
|
||||
else if(leagueClass === 2) {
|
||||
if(league['score'] >= promoteScore) resultClass += 1
|
||||
else if(league['score'] < demoteScore) resultClass -= 1
|
||||
}
|
||||
else if(leagueClass === 3 && league['score'] < demoteScore) resultClass -= 1
|
||||
|
||||
if(BigInt(Date.now()) >= curLeague.start) leagueStatus = 1
|
||||
if(BigInt(Date.now()) >= curLeague.end) leagueStatus = 2
|
||||
if(BigInt(Date.now()) >= curLeague.summary) {
|
||||
leagueStatus = 0
|
||||
if(!league['ended']) await DB.Upsert<LeagueWorld>(refid, {collection: 'league3', id: curLeague.id}, {$set: {ended: true, class: resultClass}})
|
||||
}
|
||||
leagueData = {
|
||||
league_class: K.ITEM("s32", (BigInt(Date.now()) >= curLeague.summary && !league['ended']) ? resultClass : league['class']),
|
||||
current: {
|
||||
league_id: K.ITEM("s32", curLeague.id),
|
||||
league_name: K.ITEM("str", Buffer.from(curLeague.name, 'utf8').toString('base64')),
|
||||
league_name_eng: K.ITEM("str", Buffer.from(curLeague.name_eng, 'utf8').toString('base64')),
|
||||
starttime: K.ITEM("u64", curLeague.start),
|
||||
endtime: K.ITEM("u64", curLeague.end),
|
||||
summarytime: K.ITEM("u64", curLeague.summary),
|
||||
league_status: K.ITEM("s32", leagueStatus),
|
||||
league_class: K.ITEM("s32", leagueClass),
|
||||
result_league_class: K.ITEM("s32", resultClass),
|
||||
rank: K.ITEM("s32", rank),
|
||||
score: K.ITEM("s32", league['score']),
|
||||
playcount: K.ITEM("s32", league['playCount']),
|
||||
advance_border: K.ITEM("s32", curLeague.advanceBorder[leagueClass - 1]),
|
||||
join_num: K.ITEM("s32", joinNum),
|
||||
promote_rank: K.ITEM("s32", promoteRank),
|
||||
promote_score: K.ITEM("s32", promoteScore),
|
||||
demote_rank: K.ITEM("s32", demoteRank),
|
||||
demote_score: K.ITEM("s32", demoteScore),
|
||||
ranking_score: K.ITEM("s32", league['score'])
|
||||
},
|
||||
result: (BigInt(Date.now()) >= curLeague.summary && !league['ended']) ? [
|
||||
{
|
||||
league_id: K.ITEM("s32", curLeague.id),
|
||||
league_name: K.ITEM("str", Buffer.from(curLeague.name, 'utf8').toString('base64')),
|
||||
league_name_eng: K.ITEM("str", Buffer.from(curLeague.name_eng, 'utf8').toString('base64')),
|
||||
starttime: K.ITEM("u64", curLeague.start),
|
||||
endtime: K.ITEM("u64", curLeague.end),
|
||||
summarytime: K.ITEM("u64", curLeague.summary),
|
||||
league_status: K.ITEM("s32", 1),
|
||||
league_class: K.ITEM("s32", league['class']),
|
||||
result_league_class: K.ITEM("s32", resultClass),
|
||||
rank: K.ITEM("s32", rank),
|
||||
score: K.ITEM("s32", league['score']),
|
||||
playcount: K.ITEM("s32", league['playCount']),
|
||||
advance_border: K.ITEM("s32", curLeague.advanceBorder[leagueClass - 1]),
|
||||
join_num: K.ITEM("s32", joinNum),
|
||||
promote_rank: K.ITEM("s32", promoteRank),
|
||||
promote_score: K.ITEM("s32", promoteScore),
|
||||
demote_rank: K.ITEM("s32", demoteRank),
|
||||
demote_score: K.ITEM("s32", demoteScore)
|
||||
}
|
||||
] : []
|
||||
}
|
||||
}
|
||||
|
||||
let userCustomize = []
|
||||
let customize = await DB.Find<CustomizeWorld>(refid, {collection: 'customize3'})
|
||||
customize.forEach(cus => {
|
||||
userCustomize.push({
|
||||
category: K.ITEM('s32', cus.category),
|
||||
key: K.ITEM('s32', cus.key),
|
||||
pattern: K.ITEM('s32', cus.pattern)
|
||||
})
|
||||
})
|
||||
|
||||
// test
|
||||
if(IO.Exists('data/test.json')) {
|
||||
let bufTest = await IO.ReadFile('data/test.json')
|
||||
let eventTest = JSON.parse(bufTest.toString())
|
||||
for(const ex in eventTest['eventtest']) {
|
||||
eventFin.push({ event_str: K.ITEM('str', eventTest['eventtest'][ex]) })
|
||||
}
|
||||
}
|
||||
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
refid: K.ITEM("str", refid),
|
||||
gamesession: K.ITEM('s64', BigInt(1)),
|
||||
servertime: K.ITEM("u64", BigInt(getDate())),
|
||||
is_locked: K.ITEM('bool', false),
|
||||
common: {
|
||||
ddrcode: K.ITEM("s32", profile.ddrCode),
|
||||
dancername: K.ITEM("str", profile.dancerName),
|
||||
is_new: K.ITEM('bool', false),
|
||||
is_registering: K.ITEM('bool', false),
|
||||
is_takeover: K.ITEM('bool', false),
|
||||
area: K.ITEM("s32", profile.area),
|
||||
extrastar: K.ITEM("s32", profile.extraStar),
|
||||
playcount: K.ITEM("s32", profile.playCount),
|
||||
weight: K.ITEM("s32", profile.weight),
|
||||
today_cal: K.ITEM("u64", BigInt(profile.todayCal)),
|
||||
is_disp_weight: K.ITEM("bool", profile.isDispWeight),
|
||||
pre_playable_num: K.ITEM("s32", profile.prePlayableNum)
|
||||
},
|
||||
option: {
|
||||
hispeed: K.ITEM("s32", profile.opHispeed),
|
||||
gauge: K.ITEM("s32", profile.opGauge),
|
||||
fastslow: K.ITEM("s32", profile.opFastSlow),
|
||||
guideline: K.ITEM("s32", profile.opGuideline),
|
||||
stepzone: K.ITEM("s32", profile.opStepZone),
|
||||
timing_disp: K.ITEM("s32", profile.opTimingDisp),
|
||||
visibility: K.ITEM("s32", profile.opVisibility),
|
||||
visible_time: K.ITEM("s32", profile.opVisibleTime),
|
||||
lane: K.ITEM("s32", profile.opLane),
|
||||
lane_hiddenpos: K.ITEM("s32", profile.opLaneHiddenPos),
|
||||
lane_suddenpos: K.ITEM("s32", profile.opLaneSuddenPos),
|
||||
lane_hidsudpos: K.ITEM("s32", profile.opLaneHidSudPos),
|
||||
lane_filter: K.ITEM("s32", profile.opLaneFilter),
|
||||
scroll_direction: K.ITEM("s32", profile.opScrollDirection),
|
||||
scroll_moving: K.ITEM("s32", profile.opScrollMoving),
|
||||
arrow_priority: K.ITEM("s32", profile.opArrowPriority),
|
||||
arrow_placement: K.ITEM("s32", profile.opArrowPlacement),
|
||||
arrow_color: K.ITEM("s32", profile.opArrowColor),
|
||||
arrow_design: K.ITEM("s32", profile.opArrowDesign),
|
||||
cut_timing: K.ITEM("s32", profile.opCutTiming),
|
||||
cut_freeze: K.ITEM("s32", profile.opCutFreeze),
|
||||
cut_jump: K.ITEM("s32", profile.opCutJump)
|
||||
},
|
||||
lastplay: {
|
||||
mode: K.ITEM("s32", profile.lpMode),
|
||||
folder: K.ITEM("s32", profile.lpFolder),
|
||||
mcode: K.ITEM("s32", profile.lpMcode),
|
||||
style: K.ITEM("s32", profile.lpStyle),
|
||||
difficulty: K.ITEM("s32", profile.lpDifficulty),
|
||||
window_main: K.ITEM("s32", profile.lpWindowMain),
|
||||
window_sub: K.ITEM("s32", profile.lpWindowSub),
|
||||
target: K.ITEM("s32", profile.lpTarget),
|
||||
tab_main: K.ITEM("s32", profile.lpTabMain),
|
||||
tab_sub: K.ITEM("s32", profile.lpTabSub)
|
||||
},
|
||||
filtersort: {
|
||||
title: K.ITEM("u64", BigInt(profile.fsTitle)),
|
||||
version: K.ITEM("u64", BigInt(profile.fsVersion)),
|
||||
genre: K.ITEM("u64", BigInt(profile.fsGenre)),
|
||||
bpm: K.ITEM("u64", BigInt(profile.fsBpm)),
|
||||
event: K.ITEM("u64", BigInt(profile.fsEvent)),
|
||||
level: K.ITEM("u64", BigInt(profile.fsLevel)),
|
||||
flare_rank: K.ITEM("u64", BigInt(profile.fsFlareRank)),
|
||||
clear_rank: K.ITEM("u64", BigInt(profile.fsClearRank)),
|
||||
flare_skill_target: K.ITEM("u64", BigInt(profile.fsFlareSkillTarget)),
|
||||
rival_flare_skill: K.ITEM("u64", BigInt(profile.fsRivalFlareSkill)),
|
||||
rival_score_rank: K.ITEM("u64", BigInt(profile.fsRivalScoreRank)),
|
||||
sort_type: K.ITEM("u64", BigInt(profile.fsSortType)),
|
||||
order_type: K.ITEM("s32", profile.fsOrderType),
|
||||
},
|
||||
checkguide: {
|
||||
tips_basic: K.ITEM("u64", BigInt(profile.cgTipsBasic)),
|
||||
tips_option: K.ITEM("u64", BigInt(profile.cgTipsOption)),
|
||||
tips_event: K.ITEM("u64", BigInt(profile.cgTipsEvent)),
|
||||
tips_gimmick: K.ITEM("u64", BigInt(profile.cgTipsGimmick)),
|
||||
tips_advance: K.ITEM("u64", BigInt(profile.cgTipsAdvance)),
|
||||
guide_scene: K.ITEM("u64", BigInt(profile.cgGuideScene)),
|
||||
},
|
||||
rival: [],
|
||||
score: scoreFin,
|
||||
event: eventFin,
|
||||
league: leagueData,
|
||||
customize: userCustomize
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const musicdataload: EPR = async (info, data, send) => {
|
||||
// I personally use the last A3 db for this, will check for missing songs
|
||||
let musicList = []
|
||||
let mdbLimName = U.GetConfig('mdb_limited')
|
||||
if(mdbLimName !== '') {
|
||||
if(IO.Exists('data/' + mdbLimName)) {
|
||||
let mdb = U.parseXML(U.DecodeString(await IO.ReadFile('data/' + mdbLimName), "shift_jis"), false)
|
||||
for(const music of mdb['mdb']['music']) {
|
||||
let difficultyArr = $(music).numbers('diffLv')
|
||||
let limited = ($(music).number('limited')) ? $(music).number('limited') : 0
|
||||
let limitedCha = ($(music).number('limited_cha')) ? $(music).number('limited_cha') : 0
|
||||
let limitedAry = ($(music).numbers('limited_ary')) ? $(music).numbers('limited_ary') : []
|
||||
|
||||
let overrideIndex = SONGS_OVERRIDE_WORLD.findIndex(s => s.mcode === $(music).number('mcode'))
|
||||
if(overrideIndex > -1) {
|
||||
limitedAry = (SONGS_OVERRIDE_WORLD[overrideIndex]['limited_ary'] !== [] ? SONGS_OVERRIDE_WORLD[overrideIndex]['limited_ary'] : limitedAry)
|
||||
difficultyArr = SONGS_OVERRIDE_WORLD[overrideIndex]['diffLv']
|
||||
}
|
||||
|
||||
for(const [index, diff] of difficultyArr.entries()) {
|
||||
limited = ((index % 5 === 4) && limitedCha) ? limitedCha : limited
|
||||
limited = (limitedAry.length > 0) ? limitedAry[index] : limited
|
||||
|
||||
if($(music).number('series') === 20 && overrideIndex === -1) {
|
||||
limited = 0
|
||||
for(const ls in LOCKED_SONGS) {
|
||||
if(index % 5 < 4) {
|
||||
if(LOCKED_SONGS[ls].ids.includes($(music).number('mcode')) && BigInt(Date.now()) < LOCKED_SONGS[ls].unlock_date) {
|
||||
limited = 1
|
||||
break
|
||||
}
|
||||
} else if(index % 5 === 4) {
|
||||
if(LOCKED_SONGS[ls].ids_cha.includes($(music).number('mcode')) && BigInt(Date.now()) < LOCKED_SONGS[ls].unlock_date) {
|
||||
limited = 1
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
musicList.push({
|
||||
music_str: K.ITEM('str', $(music).number('mcode') + ',' + ((index > 4) ? '1,' : '0,') + (index % 5) + ',' + (U.GetConfig('song_unlock') && limited != -1 ? '0' : limited) + ',' + diff)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(const music of SONGS_WORLD) {
|
||||
for(const [index, diff] of music.diffLv.entries()) {
|
||||
if(music.limited_ary[index] != -1) {
|
||||
musicList.push({
|
||||
music_str: K.ITEM('str', music.mcode + ',' + ((index > 4) ? '1,' : '0,') + (index % 5) + ',' + (U.GetConfig('song_unlock') && music.limited_ary[index] != -1 ? '0' : music.limited_ary[index]) + ',' + diff)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
// test
|
||||
if(IO.Exists('data/test.json')) {
|
||||
let bufTest = await IO.ReadFile('data/test.json')
|
||||
let eventTest = JSON.parse(bufTest.toString())
|
||||
for(const ex in eventTest['songstest']) {
|
||||
for(const [index, diff] of eventTest['songstest'][ex].diffLv.entries()) {
|
||||
if(eventTest['songstest'][ex].limited_ary[index] != -1) {
|
||||
musicList.push({
|
||||
music_str: K.ITEM('str', eventTest['songstest'][ex].mcode + ',' + ((index > 4) ? '1,' : '0,') + (index % 5) + ',' + eventTest['songstest'][ex].limited_ary[index] + ',' + diff)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
servertime: K.ITEM("u64", BigInt(getDate())),
|
||||
music: musicList
|
||||
});
|
||||
};
|
||||
|
||||
export const rivaldataload: EPR = async (info, data, send) => {
|
||||
const ddrCode = $(data).number("data.ddrcode");
|
||||
const loadKind = $(data).number("data.loadkind");
|
||||
const country = $(data).str("data.country");
|
||||
const region = $(data).str("data.region");
|
||||
const customerCode = $(data).str("data.customercode");
|
||||
const companyCode = $(data).str("data.companycode");
|
||||
const locationId = $(data).str("data.locationid");
|
||||
const pcbid = $(data).str("data.pcbid");
|
||||
|
||||
// song id, style, difficulty, idk, dancername, idk, idk, scoredisp, score, ghost
|
||||
let record = []
|
||||
let hiscore: any
|
||||
if(ddrCode === 0) {
|
||||
if(loadKind === 1) {
|
||||
hiscore = await DB.Find<HiScoreWorld>(null, {collection: 'hiscore3', slot: loadKind})
|
||||
} else if(loadKind === 2) {
|
||||
hiscore = await DB.Find<HiScoreWorld>(null, {collection: 'hiscore3', slot: loadKind, locationId: locationId})
|
||||
} else if(loadKind === 3) {
|
||||
hiscore = await DB.Find<HiScoreWorld>(null, {collection: 'hiscore3', slot: loadKind, locationId: locationId, pcbid: pcbid})
|
||||
}
|
||||
for(const hsi in hiscore) {
|
||||
record.push({
|
||||
record_str: K.ITEM('str', hiscore[hsi].songId + ',' + hiscore[hsi].style + ',' + hiscore[hsi].difficulty + ',0,' + hiscore[hsi].dancerName + ',0,0,1,' + hiscore[hsi].score + ',' + hiscore[hsi].ghostId)
|
||||
})
|
||||
}
|
||||
}
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
record: record
|
||||
})
|
||||
};
|
||||
|
||||
export const ghostdataload: EPR = async (info, data, send) => {
|
||||
const refid = $(data).str("data.refid");
|
||||
const ghostId = $(data).number("data.ghostid");
|
||||
let ghostData = await DB.FindOne<GhostWorld>(null, {collection: 'ghost3', ghostId: ghostId})
|
||||
if(ghostData) {
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
ghostsize: K.ITEM("s32", ghostData.ghostSize),
|
||||
ghost: K.ITEM("str", ghostData.ghost)
|
||||
});
|
||||
}
|
||||
return send.object({ result: K.ITEM("s32", 0) });
|
||||
};
|
||||
|
||||
export const taboowordcheck: EPR = async (info, data, send) => {
|
||||
// Automatically accept word
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
is_taboo: K.ITEM("bool", false)
|
||||
});
|
||||
};
|
||||
|
||||
export const minidump: EPR = async (info, data, send) => {
|
||||
return send.object({ result: K.ITEM('s32', 0) })
|
||||
};
|
||||
|
||||
function getDate(): number {
|
||||
let time = new Date();
|
||||
let tempDate = time.getDate();
|
||||
const currentTime = parseInt((time.getTime()/100000) as unknown as string)*100;
|
||||
return currentTime
|
||||
}
|
||||
@@ -0,0 +1,275 @@
|
||||
import { CommonOffset, LastOffset, OptionOffset, Profile } from "../models/profile";
|
||||
import { formatCode } from "../utils";
|
||||
import { Score } from "../models/score";
|
||||
import { Ghost } from "../models/ghost";
|
||||
|
||||
enum GameStyle {
|
||||
SINGLE,
|
||||
DOUBLE,
|
||||
VERSUS
|
||||
}
|
||||
|
||||
export const usergamedata: EPR = async (info, data, send) => {
|
||||
const mode = $(data).str("data.mode");
|
||||
const refId = $(data).str("data.refid");
|
||||
|
||||
switch (mode) {
|
||||
case "userload":
|
||||
return send.object(await userload(refId));
|
||||
case "usernew":
|
||||
return send.object(await usernew(refId, data));
|
||||
case "usersave":
|
||||
return send.object(await usersave(refId, data));
|
||||
case "rivalload":
|
||||
return send.object(await rivalload(refId, data));
|
||||
case "ghostload":
|
||||
return send.object(await ghostload(refId, data));
|
||||
case "inheritance":
|
||||
return send.object(inheritance(refId));
|
||||
default:
|
||||
return send.deny();
|
||||
}
|
||||
};
|
||||
|
||||
const userload = async (refId: string) => {
|
||||
let resObj = {
|
||||
result: K.ITEM("s32", 0),
|
||||
is_new: K.ITEM("bool", false),
|
||||
music: [],
|
||||
eventdata: []
|
||||
};
|
||||
|
||||
if (!refId.startsWith("X000")) {
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
if (!profile) resObj.is_new = K.ITEM("bool", true);
|
||||
|
||||
const scores = await DB.Find<Score>(refId, { collection: "score" });
|
||||
|
||||
for (const score of scores) {
|
||||
const note = [];
|
||||
|
||||
for (let i = 0; i < 9; i++) {
|
||||
if (score.difficulty !== i) {
|
||||
note.push({
|
||||
count: K.ITEM("u16", 0),
|
||||
rank: K.ITEM("u8", 0),
|
||||
clearkind: K.ITEM("u8", 0),
|
||||
score: K.ITEM("s32", 0),
|
||||
ghostid: K.ITEM("s32", 0)
|
||||
});
|
||||
} else {
|
||||
note.push({
|
||||
count: K.ITEM("u16", 1),
|
||||
rank: K.ITEM("u8", score.rank),
|
||||
clearkind: K.ITEM("u8", score.clearKind),
|
||||
score: K.ITEM("s32", score.score),
|
||||
ghostid: K.ITEM("s32", score.songId)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
resObj.music.push({
|
||||
mcode: K.ITEM("u32", score.songId),
|
||||
note
|
||||
});
|
||||
}
|
||||
|
||||
resObj["grade"] = {
|
||||
single_grade: K.ITEM("u32", profile.singleGrade || 0),
|
||||
dougle_grade: K.ITEM("u32", profile.doubleGrade || 0)
|
||||
};
|
||||
}
|
||||
|
||||
return resObj;
|
||||
};
|
||||
|
||||
const usernew = async (refId: string, data: any) => {
|
||||
const shopArea = $(data).str("data.shoparea", "");
|
||||
|
||||
let profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
if (!profile) {
|
||||
profile = (await DB.Upsert<Profile>(refId, { collection: "profile" }, {
|
||||
collection: "profile",
|
||||
ddrCode: _.random(1, 99999999),
|
||||
shopArea
|
||||
})).docs[0];
|
||||
}
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
seq: K.ITEM("str", formatCode(profile.ddrCode)),
|
||||
code: K.ITEM("s32", profile.ddrCode),
|
||||
shoparea: K.ITEM("str", profile.shopArea),
|
||||
};
|
||||
};
|
||||
|
||||
const usersave = async (refId: string, serverData: any) => {
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
if (profile) {
|
||||
const data = $(serverData).element("data");
|
||||
const notes = data.elements("note");
|
||||
const events = data.elements("event");
|
||||
|
||||
const common = profile.usergamedata.COMMON.strdata.split(",");
|
||||
const option = profile.usergamedata.OPTION.strdata.split(",");
|
||||
const last = profile.usergamedata.LAST.strdata.split(",");
|
||||
|
||||
if (data.bool("isgameover")) {
|
||||
const style = data.number("playstyle");
|
||||
|
||||
if (style === GameStyle.DOUBLE) {
|
||||
common[CommonOffset.DOUBLE_PLAYS] = (parseInt(common[CommonOffset.DOUBLE_PLAYS]) + 1) + "";
|
||||
} else {
|
||||
common[CommonOffset.SINGLE_PLAYS] = (parseInt(common[CommonOffset.SINGLE_PLAYS]) + 1) + "";
|
||||
}
|
||||
|
||||
common[CommonOffset.TOTAL_PLAYS] = (+common[CommonOffset.DOUBLE_PLAYS]) + (+common[CommonOffset.SINGLE_PLAYS]) + "";
|
||||
|
||||
const workoutEnabled = !!+common[CommonOffset.WEIGHT_DISPLAY];
|
||||
const workoutWeight = +common[CommonOffset.WEIGHT];
|
||||
|
||||
if (workoutEnabled && workoutWeight > 0) {
|
||||
let total = 0;
|
||||
|
||||
for (const note of notes) {
|
||||
total = total + note.number("calorie", 0);
|
||||
}
|
||||
|
||||
last[LastOffset.CALORIES] = total + "";
|
||||
}
|
||||
|
||||
for (const event of events) {
|
||||
const eventId = event.number("eventid", 0);
|
||||
const eventType = event.number("eventtype", 0);
|
||||
if (eventId === 0 || eventType === 0) continue;
|
||||
|
||||
const eventCompleted = event.number("comptime") !== 0;
|
||||
const eventProgress = event.number("savedata");
|
||||
|
||||
if (!profile.events) profile.events = {};
|
||||
profile.events[eventId] = {
|
||||
completed: eventCompleted,
|
||||
progress: eventProgress
|
||||
};
|
||||
}
|
||||
|
||||
const gradeNode = data.element("grade");
|
||||
|
||||
if (gradeNode) {
|
||||
const single = gradeNode.number("single_grade", 0);
|
||||
const double = gradeNode.number("double_grade", 0);
|
||||
|
||||
profile.singleGrade = single;
|
||||
profile.doubleGrade = double;
|
||||
}
|
||||
}
|
||||
|
||||
let scoreData: KDataReader | null;
|
||||
let stageNum = 0;
|
||||
|
||||
for (const note of notes) {
|
||||
if (note.number("stagenum") > stageNum) {
|
||||
scoreData = note;
|
||||
stageNum = note.number("stagenum");
|
||||
}
|
||||
}
|
||||
|
||||
if (scoreData) {
|
||||
const songId = scoreData.number("mcode");
|
||||
const difficulty = scoreData.number("notetype");
|
||||
const rank = scoreData.number("rank");
|
||||
const clearKind = scoreData.number("clearkind");
|
||||
const score = scoreData.number("score");
|
||||
const maxCombo = scoreData.number("maxcombo");
|
||||
const ghostSize = scoreData.number("ghostsize");
|
||||
const ghost = scoreData.str("ghost");
|
||||
|
||||
option[OptionOffset.SPEED] = scoreData.number("opt_speed").toString(16);
|
||||
option[OptionOffset.BOOST] = scoreData.number("opt_boost").toString(16);
|
||||
option[OptionOffset.APPEARANCE] = scoreData.number("opt_appearance").toString(16);
|
||||
option[OptionOffset.TURN] = scoreData.number("opt_turn").toString(16);
|
||||
option[OptionOffset.STEP_ZONE] = scoreData.number("opt_dark").toString(16);
|
||||
option[OptionOffset.SCROLL] = scoreData.number("opt_scroll").toString(16);
|
||||
option[OptionOffset.ARROW_COLOR] = scoreData.number("opt_arrowcolor").toString(16);
|
||||
option[OptionOffset.CUT] = scoreData.number("opt_cut").toString(16);
|
||||
option[OptionOffset.FREEZE] = scoreData.number("opt_freeze").toString(16);
|
||||
option[OptionOffset.JUMP] = scoreData.number("opt_jump").toString(16);
|
||||
option[OptionOffset.ARROW_SKIN] = scoreData.number("opt_arrowshape").toString(16);
|
||||
option[OptionOffset.FILTER] = scoreData.number("opt_filter").toString(16);
|
||||
option[OptionOffset.GUIDELINE] = scoreData.number("opt_guideline").toString(16);
|
||||
option[OptionOffset.GAUGE] = scoreData.number("opt_gauge").toString(16);
|
||||
option[OptionOffset.COMBO_POSITION] = scoreData.number("opt_judgepriority").toString(16);
|
||||
option[OptionOffset.FAST_SLOW] = scoreData.number("opt_timing").toString(16);
|
||||
|
||||
await DB.Upsert<Score>(refId, {
|
||||
collection: "score",
|
||||
songId,
|
||||
difficulty
|
||||
}, {
|
||||
$set: {
|
||||
rank,
|
||||
clearKind,
|
||||
score,
|
||||
maxCombo
|
||||
}
|
||||
});
|
||||
|
||||
await DB.Upsert<Ghost>(refId, {
|
||||
collection: "ghost",
|
||||
songId,
|
||||
difficulty
|
||||
}, {
|
||||
$set: {
|
||||
ghostSize,
|
||||
ghost
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
await DB.Update<Profile>(refId, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": common.join(","),
|
||||
"usergamedata.OPTION.strdata": option.join(","),
|
||||
"usergamedata.LAST.strdata": last.join(","),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0)
|
||||
};
|
||||
};
|
||||
|
||||
const rivalload = (refId: string, data: any) => {
|
||||
const loadFlag = $(data).number("data.loadflag");
|
||||
|
||||
const record = [];
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
|
||||
data: {
|
||||
recordtype: K.ITEM("s32", loadFlag),
|
||||
record
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
const ghostload = (refId: string, data: any) => {
|
||||
const ghostdata = {};
|
||||
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
ghostdata
|
||||
};
|
||||
};
|
||||
|
||||
const inheritance = (refId: string) => {
|
||||
return {
|
||||
result: K.ITEM("s32", 0),
|
||||
InheritanceStatus: K.ITEM("s32", 1)
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Profile } from "../models/profile";
|
||||
|
||||
export const usergamedata_recv: EPR = async (info, data, send) => {
|
||||
const refId = $(data).str("data.refid");
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
|
||||
let recordNum = 0;
|
||||
const record = [];
|
||||
|
||||
const d = [];
|
||||
const types = $(data).str("data.recv_csv").split(",").filter((_, i) => (i % 2 === 0));
|
||||
|
||||
for (const type of types) {
|
||||
let strdata = "<NODATA>";
|
||||
let bindata = "<NODATA>";
|
||||
|
||||
if (profile) {
|
||||
strdata = profile.usergamedata[type]["strdata"];
|
||||
bindata = profile.usergamedata[type]["bindata"];
|
||||
|
||||
if (type === "OPTION") {
|
||||
const split = strdata.split(",");
|
||||
|
||||
split[0] = U.GetConfig("save_option") ? "1" : "0";
|
||||
|
||||
strdata = split.join(",");
|
||||
}
|
||||
}
|
||||
|
||||
d.push({
|
||||
...K.ITEM("str", !profile ? strdata : Buffer.from(strdata).toString("base64")),
|
||||
...profile && { bin1: K.ITEM("str", Buffer.from(bindata).toString("base64")) }
|
||||
});
|
||||
recordNum++;
|
||||
}
|
||||
record.push({ d });
|
||||
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
player: {
|
||||
record,
|
||||
record_num: K.ITEM("u32", recordNum)
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
import { Profile } from "../models/profile";
|
||||
|
||||
export const usergamedata_send: EPR = async (info, data, send) => {
|
||||
const refId = $(data).str("data.refid");
|
||||
|
||||
const profile = await DB.FindOne<Profile>(refId, { collection: "profile" });
|
||||
if (!profile) return send.deny();
|
||||
|
||||
for (const record of $(data).elements("data.record.d")) {
|
||||
const decodeStr = Buffer.from(record.str("", ""), "base64").toString("ascii");
|
||||
const decodeBin = Buffer.from(record.str("bin1", ""), "base64").toString("ascii");
|
||||
|
||||
const strdata = decodeStr.split(",");
|
||||
const type = Buffer.from(strdata[1]).toString("utf-8");
|
||||
|
||||
if (!profile.usergamedata) profile.usergamedata = {};
|
||||
if (!profile.usergamedata[type]) profile.usergamedata[type] = {};
|
||||
profile.usergamedata[type] = {
|
||||
strdata: strdata.slice(2, -1).join(","),
|
||||
bindata: decodeBin
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
await DB.Update<Profile>(refId, { collection: "profile" }, profile);
|
||||
|
||||
return send.object({ result: K.ITEM("s32", 0) });
|
||||
} catch {
|
||||
return send.deny();
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,263 @@
|
||||
import { convcardnumber, eventLog } from "./handlers/common";
|
||||
import { usergamedata } from "./handlers/usergamedata";
|
||||
import { usergamedata_recv } from "./handlers/usergamedata_recv";
|
||||
import { usergamedata_send } from "./handlers/usergamedata_send";
|
||||
import { musicdataload, playerdatanew, playerdatasave, playerdataload, rivaldataload, ghostdataload, taboowordcheck, minidump } from "./handlers/ddrworld";
|
||||
import { CommonOffset, OptionOffset, Profile } from "./models/profile";
|
||||
import { ProfileWorld, CustomizeWorld } from "./models/ddrworld";
|
||||
import { SONGS_WORLD, SONGS_OVERRIDE_WORLD, LEAGUE_WORLD } from "./data/world"
|
||||
|
||||
export function register() {
|
||||
R.GameCode("MDX");
|
||||
|
||||
R.Unhandled(undefined);
|
||||
|
||||
R.Config("save_option", {
|
||||
name: "Save option",
|
||||
desc: "Gets the previously set options as they are.",
|
||||
default: true,
|
||||
type: "boolean"
|
||||
});
|
||||
R.Config("song_unlock", {
|
||||
name: "Unlock all songs",
|
||||
desc: "Still requires musicdb.xml to get the song ids.",
|
||||
default: true,
|
||||
type: "boolean"
|
||||
});
|
||||
R.Config("mdb_limited", {
|
||||
name: "musicdb.xml for musicdata_load",
|
||||
desc: "musicdb.xml file to use for importing limited and diffLv info. Put this xml file in the 'data' directory of the plugin.",
|
||||
type: "string",
|
||||
default: ""
|
||||
});
|
||||
R.Config("mdb_title", {
|
||||
name: "musicdb.xml for WebUI",
|
||||
desc: "musicdb.xml file to retrieve song titles from, for use in WebUI. Put this xml file in the 'data' directory of the plugin, or keep this blank if you want to use the same file as above.",
|
||||
type: "string",
|
||||
default: ""
|
||||
});
|
||||
|
||||
const RoutePlayerData = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`playerdata.${method}`, handler);
|
||||
};
|
||||
|
||||
const RoutePlayData = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`playdata_3.${method}`, handler);
|
||||
|
||||
};
|
||||
|
||||
const WordCheck = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`wordcheck_3.${method}`, handler);
|
||||
}
|
||||
|
||||
const RouteSystem = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`system.${method}`, handler);
|
||||
R.Route(`system_3.${method}`, handler);
|
||||
};
|
||||
|
||||
const RouteEventLog = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`eventlog.${method}`, handler);
|
||||
R.Route(`eventlog_3.${method}`, handler);
|
||||
};
|
||||
|
||||
RoutePlayerData('usergamedata_advanced', usergamedata);
|
||||
RoutePlayerData('usergamedata_recv', usergamedata_recv);
|
||||
RoutePlayerData('usergamedata_send', usergamedata_send);
|
||||
RoutePlayData('musicdata_load', musicdataload);
|
||||
RoutePlayData('playerdata_new', playerdatanew);
|
||||
RoutePlayData('playerdata_load', playerdataload);
|
||||
RoutePlayData('playerdata_save', playerdatasave);
|
||||
RoutePlayData('rivaldata_load', rivaldataload);
|
||||
RoutePlayData('ghostdata_load', ghostdataload);
|
||||
RouteSystem("convcardnumber", convcardnumber);
|
||||
RouteSystem("minidump", minidump);
|
||||
RouteEventLog("write", eventLog);
|
||||
WordCheck('tabooword_check', taboowordcheck)
|
||||
|
||||
R.WebUIEvent("updateName", async ({ refid, name }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.COMMON.strdata.split(",");
|
||||
strdata[CommonOffset.NAME] = name;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateWeight", async ({ refid, weight }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.COMMON.strdata.split(",");
|
||||
strdata[CommonOffset.WEIGHT] = weight;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateDisplayCalories", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.COMMON.strdata.split(",");
|
||||
strdata[CommonOffset.WEIGHT_DISPLAY] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.COMMON.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateArrowSkin", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.ARROW_SKIN] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateGuideline", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.GUIDELINE] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateFilter", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.FILTER] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateJudgmentPriority", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.COMBO_POSITION] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateDisplayTiming", async ({ refid, selected }) => {
|
||||
let strdata: Profile | string[] = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
|
||||
if (strdata) {
|
||||
strdata = strdata.usergamedata.OPTION.strdata.split(",");
|
||||
strdata[OptionOffset.FAST_SLOW] = selected;
|
||||
await DB.Update<Profile>(refid, { collection: "profile" }, {
|
||||
$set: {
|
||||
"usergamedata.OPTION.strdata": strdata.join(",")
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateName3", async ({ refid, name }) => {
|
||||
await DB.Update<ProfileWorld>(refid, { collection: "profile3" }, {
|
||||
$set: {
|
||||
dancerName: name
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateWeight3", async ({ refid, weight }) => {
|
||||
await DB.Update<ProfileWorld>(refid, { collection: "profile3" }, {
|
||||
$set: {
|
||||
weight: weight
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateDisplayCalories3", async ({ refid, selected }) => {
|
||||
await DB.Update<ProfileWorld>(refid, { collection: "profile3" }, {
|
||||
$set: {
|
||||
isDispWeight: selected
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
R.WebUIEvent("playerCustomize", async ({ customize, refid, selected }) => {
|
||||
const catPat = {'appeal': [1, 1]}
|
||||
if(selected === 0) await DB.Remove<CustomizeWorld>(refid, { collection: "customize3", category: catPat[customize][0], pattern: catPat[customize][1] })
|
||||
else await DB.Upsert<CustomizeWorld>(refid, { collection: "customize3", category: catPat[customize][0] }, {
|
||||
$set: {
|
||||
key: selected,
|
||||
pattern: catPat[customize][1]
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
R.WebUIEvent("getMDB", async (data: {}, send: WebUISend) => {
|
||||
let mdbData = []
|
||||
let mdbLimName = U.GetConfig('mdb_limited')
|
||||
let mdbTitleName = U.GetConfig('mdb_title')
|
||||
|
||||
if(mdbLimName !== '') {
|
||||
if(IO.Exists('data/' + mdbLimName)) {
|
||||
let mdbLim = U.parseXML(U.DecodeString(await IO.ReadFile('data/' + mdbLimName), "utf8"), false)
|
||||
|
||||
mdbLim['mdb']['music'].forEach(music => {
|
||||
if(SONGS_WORLD.concat(SONGS_OVERRIDE_WORLD).findIndex(so => so.mcode === $(music).number('mcode')) < 0) {
|
||||
mdbData.push({
|
||||
mcode: $(music).number('mcode'),
|
||||
title: $(music).str('title'),
|
||||
diffLv: $(music).numbers('diffLv'),
|
||||
series: $(music).number('series')
|
||||
})
|
||||
}
|
||||
})
|
||||
let mdbTitle = (mdbTitleName === mdbLimName || mdbTitleName === '') ? mdbLim : U.parseXML(U.DecodeString(await IO.ReadFile('data/' + mdbTitleName), "utf8"), false)
|
||||
SONGS_WORLD.concat(SONGS_OVERRIDE_WORLD).forEach(sw => {
|
||||
let musicInfo = mdbTitle['mdb']['music'].find(m => $(m).number('mcode') === sw.mcode)
|
||||
let songTitle = 'ID ' + sw.mcode
|
||||
let series = 0
|
||||
if(musicInfo) {
|
||||
songTitle = $(musicInfo).str('title')
|
||||
series = $(musicInfo).number('series')
|
||||
}
|
||||
mdbData.push({
|
||||
mcode: sw.mcode,
|
||||
title: songTitle,
|
||||
diffLv: sw.diffLv,
|
||||
series: series
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
send.json({mdb: mdbData})
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
import { Difficulty, Rank, ClearKind } from '../models/score'
|
||||
|
||||
export interface RivalWorld {
|
||||
collection: "rival3";
|
||||
|
||||
slot: number;
|
||||
rivalCode: number;
|
||||
}
|
||||
|
||||
export interface ScoreWorld {
|
||||
collection: "score3";
|
||||
|
||||
scoreId: number;
|
||||
songId: number;
|
||||
style: number;
|
||||
difficulty: Difficulty;
|
||||
ghostId: number;
|
||||
rank: Rank;
|
||||
clearKind: ClearKind;
|
||||
score: number;
|
||||
exScore: number;
|
||||
maxCombo: number;
|
||||
flareForce: number;
|
||||
}
|
||||
|
||||
export interface HiScoreWorld {
|
||||
collection: "hiscore3";
|
||||
|
||||
slot: number;
|
||||
country: string;
|
||||
region: string;
|
||||
customerCode: string;
|
||||
companyCode: string;
|
||||
locationId: string;
|
||||
pcbid: string;
|
||||
songId: number;
|
||||
style: number;
|
||||
difficulty: number;
|
||||
dancerName: string;
|
||||
score: number;
|
||||
ghostId: number;
|
||||
}
|
||||
|
||||
export interface GhostWorld {
|
||||
collection: "ghost3"
|
||||
|
||||
ghostId: number;
|
||||
ghostSize: number;
|
||||
ghost: string;
|
||||
}
|
||||
|
||||
export interface EventWorld {
|
||||
collection: "event3";
|
||||
|
||||
eventId: number;
|
||||
eventNo: number;
|
||||
eventType: number;
|
||||
compTime: number;
|
||||
saveData: number;
|
||||
}
|
||||
|
||||
export interface LeagueWorld {
|
||||
collection: "league3";
|
||||
|
||||
id: number,
|
||||
class: number,
|
||||
score: number,
|
||||
playCount: number,
|
||||
ended: boolean
|
||||
}
|
||||
|
||||
export interface CustomizeWorld {
|
||||
collection: "customize3";
|
||||
|
||||
category: number;
|
||||
key: number;
|
||||
pattern: number;
|
||||
}
|
||||
|
||||
export interface ProfileWorld {
|
||||
collection: "profile3";
|
||||
|
||||
ddrCode: number;
|
||||
dancerName: string;
|
||||
area: number;
|
||||
extraStar: number;
|
||||
playCount: number;
|
||||
weight: number;
|
||||
todayCal: number;
|
||||
isDispWeight: boolean;
|
||||
prePlayableNum: number;
|
||||
|
||||
opHispeed: number;
|
||||
opGauge: number;
|
||||
opFastSlow: number;
|
||||
opGuideline: number;
|
||||
opStepZone: number;
|
||||
opTimingDisp: number;
|
||||
opVisibility: number;
|
||||
opVisibleTime: number;
|
||||
opLane: number;
|
||||
opLaneHiddenPos: number;
|
||||
opLaneSuddenPos: number;
|
||||
opLaneHidSudPos: number;
|
||||
opLaneFilter: number;
|
||||
opScrollDirection: number;
|
||||
opScrollMoving: number;
|
||||
opArrowPriority: number;
|
||||
opArrowPlacement: number;
|
||||
opArrowColor: number;
|
||||
opArrowDesign: number;
|
||||
opCutTiming: number;
|
||||
opCutFreeze: number;
|
||||
opCutJump: number;
|
||||
|
||||
lpMode: number;
|
||||
lpFolder: number;
|
||||
lpMcode: number;
|
||||
lpStyle: number;
|
||||
lpDifficulty: number;
|
||||
lpWindowMain: number;
|
||||
lpWindowSub: number;
|
||||
lpTarget: number;
|
||||
lpTabMain: number;
|
||||
lpTabSub: number;
|
||||
|
||||
fsTitle: number;
|
||||
fsVersion: number;
|
||||
fsGenre: number;
|
||||
fsBpm: number;
|
||||
fsEvent: number;
|
||||
fsLevel: number;
|
||||
fsFlareRank: number;
|
||||
fsClearRank: number;
|
||||
fsFlareSkillTarget: number;
|
||||
fsRivalFlareSkill: number;
|
||||
fsRivalScoreRank: number;
|
||||
fsSortType: number;
|
||||
fsOrderType: number;
|
||||
|
||||
cgTipsBasic: number;
|
||||
cgTipsOption: number;
|
||||
cgTipsEvent: number;
|
||||
cgTipsGimmick: number;
|
||||
cgTipsAdvance: number;
|
||||
cgGuideScene: number;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export interface Ghost {
|
||||
collection: "ghost";
|
||||
|
||||
songId: number;
|
||||
difficulty: number;
|
||||
ghostSize: number;
|
||||
ghost: string;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
export enum CommonOffset {
|
||||
AREA = 1,
|
||||
SEQ_HEX = 1,
|
||||
WEIGHT_DISPLAY = 3,
|
||||
CHARACTER,
|
||||
EXTRA_CHARGE,
|
||||
TOTAL_PLAYS = 9,
|
||||
SINGLE_PLAYS = 11,
|
||||
DOUBLE_PLAYS,
|
||||
WEIGHT = 17,
|
||||
NAME = 25,
|
||||
SEQ
|
||||
}
|
||||
|
||||
export enum OptionOffset {
|
||||
SPEED = 1,
|
||||
BOOST,
|
||||
APPEARANCE,
|
||||
TURN,
|
||||
STEP_ZONE,
|
||||
SCROLL,
|
||||
ARROW_COLOR,
|
||||
CUT,
|
||||
FREEZE,
|
||||
JUMP,
|
||||
ARROW_SKIN,
|
||||
FILTER,
|
||||
GUIDELINE,
|
||||
GAUGE,
|
||||
COMBO_POSITION,
|
||||
FAST_SLOW
|
||||
}
|
||||
|
||||
export enum LastOffset {
|
||||
SONG = 3,
|
||||
CALORIES = 10
|
||||
}
|
||||
|
||||
export enum RivalOffset {
|
||||
RIVAL_1_ACTIVE = 1,
|
||||
RIVAL_2_ACTIVE,
|
||||
RIVAL_3_ACTIVE,
|
||||
RIVAL_1_DDRCODE = 9,
|
||||
RIVAL_2_DDRCODE,
|
||||
RIVAL_3_DDRCODE,
|
||||
}
|
||||
|
||||
export interface Profile {
|
||||
collection: "profile";
|
||||
|
||||
ddrCode: number;
|
||||
shopArea: string;
|
||||
|
||||
singleGrade?: number;
|
||||
doubleGrade?: number;
|
||||
|
||||
events?: {};
|
||||
|
||||
usergamedata?: {
|
||||
COMMON?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
OPTION?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
LAST?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
RIVAL?: {
|
||||
strdata?: string;
|
||||
bindata?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
export enum Difficulty {
|
||||
SINGLE_BEGINNER,
|
||||
SINGLE_BASIC,
|
||||
SINGLE_DIFFICULT,
|
||||
SINGLE_EXPERT,
|
||||
SINGLE_CHALLENGE,
|
||||
DOUBLE_BASIC,
|
||||
DOUBLE_DIFFICULT,
|
||||
DOUBLE_EXPERT,
|
||||
DOUBLE_CHALLENGE
|
||||
}
|
||||
|
||||
export enum Rank {
|
||||
AAA,
|
||||
AA_PLUS,
|
||||
AA,
|
||||
AA_MINUS,
|
||||
A_PLUS,
|
||||
A,
|
||||
A_MINUS,
|
||||
B_PLUS,
|
||||
B,
|
||||
B_MINUS,
|
||||
C_PLUS,
|
||||
C,
|
||||
C_MINUS,
|
||||
D_PLUS,
|
||||
D,
|
||||
E
|
||||
}
|
||||
|
||||
export enum ClearKind {
|
||||
NONE,
|
||||
FAILED,
|
||||
ASSIST_CLEAR,
|
||||
CLEAR,
|
||||
LIFE4_1,
|
||||
LIFE4_2,
|
||||
LIFE4,
|
||||
GOOD_COMBO,
|
||||
GREAT_COMBO,
|
||||
PERFECT_COMBO,
|
||||
MARVELOUS_COMBO
|
||||
}
|
||||
|
||||
export interface Score {
|
||||
collection: "score";
|
||||
|
||||
songId: number;
|
||||
difficulty: Difficulty;
|
||||
rank: Rank;
|
||||
clearKind: ClearKind;
|
||||
score: number;
|
||||
maxCombo: number;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export function getVersion(info: EamuseInfo) {
|
||||
const dateCode = parseInt(info.model.split(":")[4]);
|
||||
|
||||
if (dateCode >= 2019022600 && dateCode <= 2020020300) return 10;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
export function formatCode(ddrCode: number) {
|
||||
const pad = (ddrCode + "").padStart(8, "0");
|
||||
|
||||
return pad.replace(/^([0-9]{4})([0-9]{4})$/, "$1-$2");
|
||||
}
|
||||
@@ -0,0 +1,499 @@
|
||||
/*
|
||||
* This combined file was created by the DataTables downloader builder:
|
||||
* https://datatables.net/download
|
||||
*
|
||||
* To rebuild or modify this file with the latest versions of the included
|
||||
* software please visit:
|
||||
* https://datatables.net/download/#bm/dt-1.11.3/fh-3.2.0/r-2.2.9/sc-2.0.5
|
||||
*
|
||||
* Included libraries:
|
||||
* DataTables 1.11.3, FixedHeader 3.2.0, Responsive 2.2.9, Scroller 2.0.5
|
||||
*/
|
||||
|
||||
@charset "UTF-8";
|
||||
td.dt-control {
|
||||
background: url("https://www.datatables.net/examples/resources/details_open.png") no-repeat center center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
tr.dt-hasChild td.dt-control {
|
||||
background: url("https://www.datatables.net/examples/resources/details_close.png") no-repeat center center;
|
||||
}
|
||||
|
||||
table.dataTable th.dt-left,
|
||||
table.dataTable td.dt-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable th.dt-center,
|
||||
table.dataTable td.dt-center,
|
||||
table.dataTable td.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable th.dt-right,
|
||||
table.dataTable td.dt-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable th.dt-justify,
|
||||
table.dataTable td.dt-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable th.dt-nowrap,
|
||||
table.dataTable td.dt-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable thead th.dt-head-left,
|
||||
table.dataTable thead td.dt-head-left,
|
||||
table.dataTable tfoot th.dt-head-left,
|
||||
table.dataTable tfoot td.dt-head-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable thead th.dt-head-center,
|
||||
table.dataTable thead td.dt-head-center,
|
||||
table.dataTable tfoot th.dt-head-center,
|
||||
table.dataTable tfoot td.dt-head-center {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable thead th.dt-head-right,
|
||||
table.dataTable thead td.dt-head-right,
|
||||
table.dataTable tfoot th.dt-head-right,
|
||||
table.dataTable tfoot td.dt-head-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable thead th.dt-head-justify,
|
||||
table.dataTable thead td.dt-head-justify,
|
||||
table.dataTable tfoot th.dt-head-justify,
|
||||
table.dataTable tfoot td.dt-head-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable thead th.dt-head-nowrap,
|
||||
table.dataTable thead td.dt-head-nowrap,
|
||||
table.dataTable tfoot th.dt-head-nowrap,
|
||||
table.dataTable tfoot td.dt-head-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-left,
|
||||
table.dataTable tbody td.dt-body-left {
|
||||
text-align: left;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-center,
|
||||
table.dataTable tbody td.dt-body-center {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-right,
|
||||
table.dataTable tbody td.dt-body-right {
|
||||
text-align: right;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-justify,
|
||||
table.dataTable tbody td.dt-body-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
table.dataTable tbody th.dt-body-nowrap,
|
||||
table.dataTable tbody td.dt-body-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/*! DataTables Bulma integration
|
||||
* ©2020 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
table.dataTable {
|
||||
clear: both;
|
||||
margin-top: 6px !important;
|
||||
margin-bottom: 6px !important;
|
||||
max-width: none !important;
|
||||
border-collapse: separate !important;
|
||||
border-spacing: 0;
|
||||
}
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
table.dataTable td.dataTables_empty,
|
||||
table.dataTable th.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
table.dataTable.nowrap th,
|
||||
table.dataTable.nowrap td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper div.dataTables_length label {
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length div {
|
||||
vertical-align: middle;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_length select {
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter {
|
||||
text-align: right;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter label {
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_filter input {
|
||||
margin-left: 0.5em;
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_info {
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_paginate ul {
|
||||
justify-content: flex-end;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
div.dataTables_wrapper div.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
margin-top: -26px;
|
||||
text-align: center;
|
||||
padding: 1em 0;
|
||||
}
|
||||
|
||||
table.dataTable > thead > tr > th:active,
|
||||
table.dataTable > thead > tr > td:active {
|
||||
outline: none;
|
||||
}
|
||||
table.dataTable > thead > tr > th:not(.sorting_disabled),
|
||||
table.dataTable > thead > tr > td:not(.sorting_disabled) {
|
||||
padding-right: 30px;
|
||||
}
|
||||
table.dataTable > thead .sorting,
|
||||
table.dataTable > thead .sorting_asc,
|
||||
table.dataTable > thead .sorting_desc,
|
||||
table.dataTable > thead .sorting_asc_disabled,
|
||||
table.dataTable > thead .sorting_desc_disabled {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
table.dataTable > thead .sorting:before, table.dataTable > thead .sorting:after,
|
||||
table.dataTable > thead .sorting_asc:before,
|
||||
table.dataTable > thead .sorting_asc:after,
|
||||
table.dataTable > thead .sorting_desc:before,
|
||||
table.dataTable > thead .sorting_desc:after,
|
||||
table.dataTable > thead .sorting_asc_disabled:before,
|
||||
table.dataTable > thead .sorting_asc_disabled:after,
|
||||
table.dataTable > thead .sorting_desc_disabled:before,
|
||||
table.dataTable > thead .sorting_desc_disabled:after {
|
||||
position: absolute;
|
||||
bottom: 0.7em;
|
||||
display: block;
|
||||
opacity: 0.3;
|
||||
}
|
||||
table.dataTable > thead .sorting:before,
|
||||
table.dataTable > thead .sorting_asc:before,
|
||||
table.dataTable > thead .sorting_desc:before,
|
||||
table.dataTable > thead .sorting_asc_disabled:before,
|
||||
table.dataTable > thead .sorting_desc_disabled:before {
|
||||
right: 1em;
|
||||
content: "↑";
|
||||
}
|
||||
table.dataTable > thead .sorting:after,
|
||||
table.dataTable > thead .sorting_asc:after,
|
||||
table.dataTable > thead .sorting_desc:after,
|
||||
table.dataTable > thead .sorting_asc_disabled:after,
|
||||
table.dataTable > thead .sorting_desc_disabled:after {
|
||||
right: 0.5em;
|
||||
content: "↓";
|
||||
}
|
||||
table.dataTable > thead .sorting_asc:before,
|
||||
table.dataTable > thead .sorting_desc:after {
|
||||
opacity: 1;
|
||||
}
|
||||
table.dataTable > thead .sorting_asc_disabled:before,
|
||||
table.dataTable > thead .sorting_desc_disabled:after {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
div.dataTables_scrollHead table.dataTable {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
div.dataTables_scrollBody table {
|
||||
border-top: none;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
div.dataTables_scrollBody table thead .sorting:before,
|
||||
div.dataTables_scrollBody table thead .sorting_asc:before,
|
||||
div.dataTables_scrollBody table thead .sorting_desc:before,
|
||||
div.dataTables_scrollBody table thead .sorting:after,
|
||||
div.dataTables_scrollBody table thead .sorting_asc:after,
|
||||
div.dataTables_scrollBody table thead .sorting_desc:after {
|
||||
display: none;
|
||||
}
|
||||
div.dataTables_scrollBody table tbody tr:first-child th,
|
||||
div.dataTables_scrollBody table tbody tr:first-child td {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
|
||||
margin-top: 0 !important;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
|
||||
table.dataTable.fixedHeader-floating,
|
||||
table.dataTable.fixedHeader-locked {
|
||||
background-color: white;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
table.dataTable.fixedHeader-locked {
|
||||
position: absolute !important;
|
||||
}
|
||||
|
||||
@media print {
|
||||
table.fixedHeader-floating {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.table td,
|
||||
.table th {
|
||||
padding: 7px 11px !important;
|
||||
}
|
||||
|
||||
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
|
||||
cursor: default !important;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
|
||||
display: none !important;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
|
||||
position: relative;
|
||||
padding-left: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
|
||||
top: 50%;
|
||||
left: 5px;
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
margin-top: -9px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
color: white;
|
||||
border: 0.15em solid white;
|
||||
border-radius: 1em;
|
||||
box-shadow: 0 0 0.2em #444;
|
||||
box-sizing: content-box;
|
||||
text-align: center;
|
||||
text-indent: 0 !important;
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
line-height: 1em;
|
||||
content: "+";
|
||||
background-color: #00D1B2;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
|
||||
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
|
||||
content: "-";
|
||||
background-color: #d33333;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control,
|
||||
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control {
|
||||
padding-left: 27px;
|
||||
}
|
||||
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control:before,
|
||||
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control:before {
|
||||
left: 4px;
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
border-radius: 14px;
|
||||
line-height: 14px;
|
||||
text-indent: 3px;
|
||||
}
|
||||
table.dataTable.dtr-column > tbody > tr > td.dtr-control,
|
||||
table.dataTable.dtr-column > tbody > tr > th.dtr-control,
|
||||
table.dataTable.dtr-column > tbody > tr > td.control,
|
||||
table.dataTable.dtr-column > tbody > tr > th.control {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
|
||||
table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,
|
||||
table.dataTable.dtr-column > tbody > tr > td.control:before,
|
||||
table.dataTable.dtr-column > tbody > tr > th.control:before {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
height: 0.8em;
|
||||
width: 0.8em;
|
||||
margin-top: -0.5em;
|
||||
margin-left: -0.5em;
|
||||
display: block;
|
||||
position: absolute;
|
||||
color: white;
|
||||
border: 0.15em solid white;
|
||||
border-radius: 1em;
|
||||
box-shadow: 0 0 0.2em #444;
|
||||
box-sizing: content-box;
|
||||
text-align: center;
|
||||
text-indent: 0 !important;
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
line-height: 1em;
|
||||
content: "+";
|
||||
background-color: #00D1B2;
|
||||
}
|
||||
table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before,
|
||||
table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before,
|
||||
table.dataTable.dtr-column > tbody > tr.parent td.control:before,
|
||||
table.dataTable.dtr-column > tbody > tr.parent th.control:before {
|
||||
content: "-";
|
||||
background-color: #d33333;
|
||||
}
|
||||
table.dataTable > tbody > tr.child {
|
||||
padding: 0.5em 1em;
|
||||
}
|
||||
table.dataTable > tbody > tr.child:hover {
|
||||
background: transparent !important;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul.dtr-details {
|
||||
display: inline-block;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul.dtr-details > li {
|
||||
border-bottom: 1px solid #efefef;
|
||||
padding: 0.5em 0;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul.dtr-details > li:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
table.dataTable > tbody > tr.child span.dtr-title {
|
||||
display: inline-block;
|
||||
min-width: 75px;
|
||||
font-weight: bold;
|
||||
}
|
||||
div.dtr-modal {
|
||||
position: fixed;
|
||||
box-sizing: border-box;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
padding: 10em 1em;
|
||||
}
|
||||
div.dtr-modal div.dtr-modal-display {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 50%;
|
||||
height: 50%;
|
||||
overflow: auto;
|
||||
margin: auto;
|
||||
z-index: 102;
|
||||
overflow: auto;
|
||||
background-color: #f5f5f7;
|
||||
border: 1px solid black;
|
||||
border-radius: 0.5em;
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
div.dtr-modal div.dtr-modal-content {
|
||||
position: relative;
|
||||
padding: 1em;
|
||||
}
|
||||
div.dtr-modal div.dtr-modal-close {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 6px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border: 1px solid #eaeaea;
|
||||
background-color: #f9f9f9;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
z-index: 12;
|
||||
}
|
||||
div.dtr-modal div.dtr-modal-close:hover {
|
||||
background-color: #eaeaea;
|
||||
}
|
||||
div.dtr-modal div.dtr-modal-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 101;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
div.dtr-modal div.dtr-modal-display {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
table.dataTable > tbody > tr.child ul {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
div.modal-content {
|
||||
padding: 20px;
|
||||
background: white;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
div.dts {
|
||||
display: block !important;
|
||||
}
|
||||
div.dts tbody th,
|
||||
div.dts tbody td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
div.dts div.dts_loading {
|
||||
z-index: 1;
|
||||
}
|
||||
div.dts div.dts_label {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
|
||||
text-align: right;
|
||||
border-radius: 3px;
|
||||
padding: 0.4em;
|
||||
z-index: 2;
|
||||
display: none;
|
||||
}
|
||||
div.dts div.dataTables_scrollBody {
|
||||
background: repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, white 10px, white 20px);
|
||||
}
|
||||
div.dts div.dataTables_scrollBody table {
|
||||
z-index: 2;
|
||||
}
|
||||
div.dts div.dataTables_paginate,
|
||||
div.dts div.dataTables_length {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
let flareMatrix = {
|
||||
"1": [145, 153, 162, 171, 179, 188, 197, 205, 214, 223, 232],
|
||||
"2": [155, 164, 182, 192, 201, 210, 220, 220, 229, 238, 248],
|
||||
"3": [170, 180, 190, 200, 210, 221, 231, 241, 251, 261, 272],
|
||||
"4": [185, 196, 207, 218, 229, 240, 251, 262, 273, 284, 296],
|
||||
"5": [205, 217, 229, 241, 254, 266, 278, 291, 303, 315, 328],
|
||||
"6": [230, 243, 257, 271, 285, 299, 312, 326, 340, 354, 368],
|
||||
"7": [255, 270, 285, 300, 316, 331, 346, 362, 377, 392, 408],
|
||||
"8": [290, 307, 324, 342, 359, 377, 394, 411, 429, 446, 464],
|
||||
"9": [335, 355, 375, 395, 415, 435, 455, 475, 495, 515, 536],
|
||||
"10": [400, 424, 448, 472, 496, 520, 544, 568, 592, 616, 640],
|
||||
"11": [465, 492, 520, 548, 576, 604, 632, 660, 688, 716, 744],
|
||||
"12": [510, 540, 571, 601, 632, 663, 693, 724, 754, 785, 816],
|
||||
"13": [545, 577, 610, 643, 675, 708, 741, 773, 806, 839, 872],
|
||||
"14": [575, 609, 644, 678, 713, 747, 782, 816, 851, 885, 920],
|
||||
"15": [600, 636, 672, 708, 744, 780, 816, 852, 888, 924, 960],
|
||||
"16": [620, 657, 694, 731, 768, 806, 843, 880, 917, 954, 992],
|
||||
"17": [635, 673, 711, 749, 787, 825, 863, 901, 939, 977, 1016],
|
||||
"18": [650, 689, 728, 767, 806, 845, 884, 923, 962, 1001, 1040],
|
||||
"19": [665, 704, 744, 784, 824, 864, 904, 944, 984, 1024, 1064]
|
||||
}
|
||||
let flareSkill = [
|
||||
["NONE", 0, 500, 1000, 1500],
|
||||
["MERCURY", 2000, 3000, 4000, 5000],
|
||||
["VENUS", 6000, 7000, 8000, 9000],
|
||||
["EARTH", 10000, 11500, 13000, 14500],
|
||||
["MARS", 16000, 18000, 20000, 22000],
|
||||
["JUPITER", 24000, 26500, 29000, 31500],
|
||||
["SATURN", 34000, 36750, 39500, 42250],
|
||||
["URANUS", 45000, 48750, 52500, 56250],
|
||||
["NEPTUNE", 60000, 63750, 67500, 71250],
|
||||
["SUN", 75000, 78750, 82500, 86250],
|
||||
["WORLD", 90000]
|
||||
]
|
||||
let area = ["Unknown", "Hokkaido", "Aomori", "Iwate", "Miyagi", "Akita", "Yamagata", "Fukushima", "Ibaraki", "Tochigi", "Gunma", "Saitama", "Chiba", "Tokyo", "Kanagawa", "Niigata", "Toyama", "Ishikawa", "Fukui", "Yamanashi",
|
||||
"Nagano", "Gifu", "Shizuoka", "Aichi", "Mie", "Shiga", "Kyoto", "Osaka", "Hyogo", "Nara", "Wakayama", "Tottori", "Shimane", "Okayama", "Hiroshima", "Yamaguchi", "Tokushima", "Kagawa", "Ehime", "Kochi", "Fukuoka", "Saga",
|
||||
"Nagasaki", "Kumamoto", "Oita", "Miyazaki", "Kagoshima", "Okinawa", "Hong Kong", "Korea", "Taiwan", "USA", "Europe", "Overseas", "Alaska", "Alabama", "Arkansas", "Arizona", "California", "Colorado", "Connecticut", "Delaware",
|
||||
"Florida", "Georgia", "Hawaii", "Iowa", "Idaho", "Illinois", "Indiana", "Kansas", "Kentucky", "Louisiana", "Massachusetts", "Maryland", "Maine", "Michigan", "Minnesota", "Missouri", "Mississippi", "Montana", "Nebraska",
|
||||
"North Carolina", "North Dakota", "New Hampshire", "New Jersey", "New Mexico", "Nevada", "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah",
|
||||
"Virginia", "Vermont", "Washington", "Wisconsin", "West Virginia", "Wyoming", "Washington D.C.", "Japan", "Canada", "Singapore", "Thailand", "Australia", "New Zealand", "UK", "Italy", "Spain", "Germany", "France", "Portugal", "Indonesia",
|
||||
"Philippines"
|
||||
]
|
||||
|
||||
async function getFlareInfo(scores) {
|
||||
let flareData = {}
|
||||
let mdbData = []
|
||||
|
||||
let flareTopScores = {'sg': [], 'db': []}
|
||||
let totalSgFlare = 0
|
||||
let totalDbFlare = 0
|
||||
|
||||
let classicSgTop30 = []
|
||||
let classicSgFlare = 0
|
||||
let classicDbTop30 = []
|
||||
let classicDbFlare = 0
|
||||
|
||||
let whiteSgTop30 = []
|
||||
let whiteSgFlare = 0
|
||||
let whiteDbTop30 = []
|
||||
let whiteDbFlare = 0
|
||||
|
||||
let goldSgTop30 = []
|
||||
let goldSgFlare = 0
|
||||
let goldDbTop30 = []
|
||||
let goldDbFlare = 0
|
||||
|
||||
await emit('getMDB', {}).then(
|
||||
function(response) {
|
||||
mdbData = response.data.mdb
|
||||
}
|
||||
)
|
||||
if(mdbData !== undefined) {
|
||||
scores.forEach(score => {
|
||||
let songIndex = mdbData.findIndex(m => m.mcode === score.songId)
|
||||
if(songIndex > -1 && score.songId != 38707 && score.flareForce >= 0) {
|
||||
if(score.style === 0) {
|
||||
flareTopScores.sg.push({
|
||||
flare: flareMatrix[mdbData[songIndex]['diffLv'][score.difficulty]][score.flareForce],
|
||||
title: mdbData[songIndex]['title'],
|
||||
difficulty: mdbData[songIndex]['diffLv'][score.difficulty],
|
||||
series: mdbData[songIndex]['series']
|
||||
})
|
||||
} else {
|
||||
flareTopScores.db.push({
|
||||
flare: flareMatrix[mdbData[songIndex]['diffLv'][score.difficulty]][score.flareForce],
|
||||
title: mdbData[songIndex]['title'],
|
||||
difficulty: mdbData[songIndex]['diffLv'][score.difficulty + 5],
|
||||
series: mdbData[songIndex]['series']
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
flareData.classicSgTop30 = flareTopScores.sg.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
|
||||
if(flareData.classicSgTop30.length > 30) flareData.classicSgTop30 = flareData.classicSgTop30.slice(0, 30)
|
||||
flareData.classicSgFlare = flareData.classicSgTop30.reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
flareData.whiteSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
|
||||
if(flareData.whiteSgTop30.length > 30) flareData.whiteSgTop30 = flareData.whiteSgTop30.slice(0, 30)
|
||||
flareData.whiteSgFlare = flareData.whiteSgTop30.reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
flareData.goldSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
|
||||
if(flareData.goldSgTop30.length > 30) flareData.goldSgTop30 = flareData.goldSgTop30.slice(0, 30)
|
||||
flareData.goldSgFlare = flareData.goldSgTop30.reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
flareData.totalSgFlare = flareData.classicSgTop30.concat(flareData.whiteSgTop30, flareData.goldSgTop30).reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
|
||||
flareData.classicDbTop30 = flareTopScores.db.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
|
||||
if(flareData.classicDbTop30.length > 30) flareData.classicDbTop30 = flareData.classicDbTop30.slice(0, 30)
|
||||
flareData.classicDbFlare = flareData.classicDbTop30.reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
flareData.whiteDbTop30 = flareTopScores.db.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
|
||||
if(flareData.whiteDbTop30.length > 30) flareData.whiteDbTop30 = flareData.whiteDbTop30.slice(0, 30)
|
||||
flareData.whiteDbFlare = flareData.whiteDbTop30.reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
flareData.goldDbTop30 = flareTopScores.db.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
|
||||
if(flareData.goldDbTop30.length > 30) flareData.goldDbTop30 = flareData.goldDbTop30.slice(0, 30)
|
||||
flareData.goldDbFlare = flareData.goldDbTop30.reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
flareData.totalDbFlare = flareData.classicDbTop30.concat(flareData.whiteDbTop30, flareData.goldDbTop30).reduce((n, {flare}) => n + flare, 0)
|
||||
|
||||
return flareData
|
||||
}
|
||||
}
|
||||
+19467
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,86 @@
|
||||
let flareData = {}
|
||||
let totalFlare = 0
|
||||
let classicTop30 = []
|
||||
let classicFlare = []
|
||||
let whiteTop30 = []
|
||||
let whiteFlare = []
|
||||
let goldTop30 = []
|
||||
let goldFlare = []
|
||||
|
||||
async function populateTables() {
|
||||
if(parseInt($('#style_select').val()) === 0) {
|
||||
totalFlare = flareData.totalSgFlare
|
||||
classicTop30 = flareData.classicSgTop30
|
||||
classicFlare = flareData.classicSgFlare
|
||||
whiteTop30 = flareData.whiteSgTop30
|
||||
whiteFlare = flareData.whiteSgFlare
|
||||
goldTop30 = flareData.goldSgTop30
|
||||
goldFlare = flareData.goldSgFlare
|
||||
} else {
|
||||
totalFlare = flareData.totalDbFlare
|
||||
classicTop30 = flareData.classicDbTop30
|
||||
classicFlare = flareData.classicDbFlare
|
||||
whiteTop30 = flareData.whiteDbTop30
|
||||
whiteFlare = flareData.whiteDbFlare
|
||||
goldTop30 = flareData.goldDbTop30
|
||||
goldFlare = flareData.goldDbFlare
|
||||
}
|
||||
|
||||
if(classicTop30.length === 0) $("tbody#classic_flare").append($("<tr>").append($("<td colspan='4' style='text-align: center'>").append('No qualified scores.')))
|
||||
if(whiteTop30.length === 0) $("tbody#white_flare").append($("<tr>").append($("<td colspan='4' style='text-align: center'>").append('No qualified scores.')))
|
||||
if(goldTop30.length === 0) $("tbody#gold_flare").append($("<tr>").append($("<td colspan='4' style='text-align: center'>").append('No qualified scores.')))
|
||||
|
||||
for(const index in classicTop30) {
|
||||
$("tbody#classic_flare").append(
|
||||
$("<tr>").append(
|
||||
$("<td>").append(parseInt(index) + 1)
|
||||
).append(
|
||||
$("<td>").append(classicTop30[index].title)
|
||||
).append(
|
||||
$("<td>").append(classicTop30[index].difficulty)
|
||||
).append(
|
||||
$("<td>").append(classicTop30[index].flare)
|
||||
)
|
||||
)
|
||||
}
|
||||
for(const index in whiteTop30) {
|
||||
$("tbody#white_flare").append(
|
||||
$("<tr>").append(
|
||||
$("<td>").append(parseInt(index) + 1)
|
||||
).append(
|
||||
$("<td>").append(whiteTop30[index].title)
|
||||
).append(
|
||||
$("<td>").append(whiteTop30[index].difficulty)
|
||||
).append(
|
||||
$("<td>").append(whiteTop30[index].flare)
|
||||
)
|
||||
)
|
||||
}
|
||||
for(const index in goldTop30) {
|
||||
$("tbody#gold_flare").append(
|
||||
$("<tr>").append(
|
||||
$("<td>").append(parseInt(index) + 1)
|
||||
).append(
|
||||
$("<td>").append(goldTop30[index].title)
|
||||
).append(
|
||||
$("<td>").append(goldTop30[index].difficulty)
|
||||
).append(
|
||||
$("<td>").append(goldTop30[index].flare)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(async function() {
|
||||
let scores = JSON.parse(document.getElementById("score-pass").innerText)
|
||||
flareData = await getFlareInfo(scores);
|
||||
await populateTables()
|
||||
|
||||
$('#style_select').change(async function() {
|
||||
$("#classic_flare tr").remove()
|
||||
$("#white_flare tr").remove()
|
||||
$("#gold_flare tr").remove()
|
||||
console.log("Removed")
|
||||
await populateTables()
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,75 @@
|
||||
let clearRank = ['AAA', 'AA+', 'AA', 'AA-', 'A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'C-', 'D+', 'D', 'E']
|
||||
let clearKind = ['-', 'Fail', 'Assisted Clear', 'Clear', 'Life4 Clear (1)', 'Life4 Clear (2)', 'Life4 Clear', 'FC', 'GFC', 'PFC', 'MFC']
|
||||
let flareRank = ['None', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'EX']
|
||||
|
||||
async function populateScoreTable(scores, style, info) {
|
||||
|
||||
let scoreTableData = []
|
||||
let scoreIndex = 0
|
||||
let mdbData = []
|
||||
await emit('getMDB', {}).then(
|
||||
function(response) {
|
||||
mdbData = response.data.mdb
|
||||
}
|
||||
)
|
||||
scores.forEach(score => {
|
||||
let scoreIndex = scoreTableData.findIndex(scoreData => scoreData.songId === score.songId)
|
||||
if(scoreIndex < 0 && style === score.style && score.songId !== 38707) {
|
||||
let m = mdbData.find(m => m.mcode === score.songId)
|
||||
scoreTableData.push({
|
||||
'songId': score.songId,
|
||||
'songTitle': m.title,
|
||||
'0': '-',
|
||||
'1': '-',
|
||||
'2': '-',
|
||||
'3': '-',
|
||||
'4': '-'
|
||||
})
|
||||
}
|
||||
scoreIndex = scoreTableData.findIndex(scoreData => scoreData.songId === score.songId && style === score.style)
|
||||
if(scoreIndex > -1) {
|
||||
if(info === 0) scoreTableData[scoreIndex][score.difficulty] = score.score
|
||||
if(info === 1) scoreTableData[scoreIndex][score.difficulty] = clearRank[score.rank]
|
||||
if(info === 2) scoreTableData[scoreIndex][score.difficulty] = clearKind[score.clearKind]
|
||||
if(info === 3) scoreTableData[scoreIndex][score.difficulty] = (score.flareForce > -1) ? flareRank[score.flareForce] : '-'
|
||||
}
|
||||
})
|
||||
|
||||
$('#musicdata').DataTable().clear().destroy()
|
||||
$('#musicdata').DataTable({
|
||||
data: scoreTableData,
|
||||
columns: [
|
||||
{ data: 'songTitle' },
|
||||
{ data: '0' },
|
||||
{ data: '1' },
|
||||
{ data: '2' },
|
||||
{ data: '3' },
|
||||
{ data: '4' }
|
||||
],
|
||||
pageLength: 100,
|
||||
columnDefs: [
|
||||
{
|
||||
targets: 0,
|
||||
width: "1px"
|
||||
}
|
||||
],
|
||||
responsive: {
|
||||
details: {
|
||||
display: $.fn.dataTable.Responsive.display.modal({
|
||||
header: function(row) {
|
||||
var data = row.data();
|
||||
return 'Scores for song: ' + data.songId;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$(document).ready(async function() {
|
||||
let scores = JSON.parse(document.getElementById("score-pass").innerText)
|
||||
populateScoreTable(scores, parseInt($('#style_select').val()), parseInt($('#info_select').val()))
|
||||
|
||||
$('#style_select,#info_select').change(async function() {
|
||||
await populateScoreTable(scores, parseInt($('#style_select').val()), parseInt($('#info_select').val()));
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,88 @@
|
||||
$(document).ready(async function() {
|
||||
// classic 1-13 white 14-17 gold 18-21
|
||||
let profile = JSON.parse(document.getElementById("profile3-pass").innerText)
|
||||
let scores = JSON.parse(document.getElementById("score-pass").innerText)
|
||||
|
||||
$("#area").append(
|
||||
$("<td>").append(area[profile.area])
|
||||
)
|
||||
|
||||
let flareData = await getFlareInfo(scores)
|
||||
|
||||
let totalSgFlare = flareData.totalSgFlare
|
||||
let totalDbFlare = flareData.totalDbFlare
|
||||
|
||||
let classicSgTop30 = flareData.classicSgTop30
|
||||
let classicSgFlare = flareData.classicSgFlare
|
||||
let classicDbTop30 = flareData.classicDbTop30
|
||||
let classicDbFlare = flareData.classicDbFlare
|
||||
|
||||
let whiteSgTop30 = flareData.whiteSgTop30
|
||||
let whiteSgFlare = flareData.whiteSgFlare
|
||||
let whiteDbTop30 = flareData.whiteDbTop30
|
||||
let whiteDbFlare = flareData.whiteDbFlare
|
||||
|
||||
let goldSgTop30 = flareData.goldSgTop30
|
||||
let goldSgFlare = flareData.goldSgFlare
|
||||
let goldDbTop30 = flareData.goldDbTop30
|
||||
let goldDbFlare = flareData.goldDbFlare
|
||||
|
||||
let skillGet = false
|
||||
let sgSkill = ''
|
||||
let dbSkill = ''
|
||||
let skillPlus = '+++'
|
||||
flareSkill.forEach(fs => {
|
||||
if(!skillGet) {
|
||||
for(let sctr = 1; sctr < fs.length; sctr++) {
|
||||
if(totalSgFlare >= fs[sctr]) {
|
||||
sgSkill = fs[0]
|
||||
if(sctr > 1) sgSkill = sgSkill + skillPlus.substring(0, sctr - 1)
|
||||
}
|
||||
else skillGet = true
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(sgSkill + " (" + totalSgFlare + ")")
|
||||
|
||||
skillGet = false
|
||||
flareSkill.forEach(fs => {
|
||||
if(!skillGet) {
|
||||
for(let sctr = 1; sctr < fs.length; sctr++) {
|
||||
if(totalDbFlare >= fs[sctr]) {
|
||||
dbSkill = fs[0]
|
||||
if(sctr > 1) dbSkill = dbSkill + skillPlus.substring(0, sctr - 1)
|
||||
}
|
||||
else skillGet = true
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(dbSkill + " (" + totalDbFlare + ")")
|
||||
|
||||
$("#skillrank").append(
|
||||
$("<td>").append(sgSkill)
|
||||
).append(
|
||||
$("<td>").append(dbSkill)
|
||||
)
|
||||
|
||||
$("#skilltotal").append(
|
||||
$("<td>").append(totalSgFlare)
|
||||
).append(
|
||||
$("<td>").append(totalDbFlare)
|
||||
)
|
||||
|
||||
$("#skillclassic").append(
|
||||
$("<td>").append(classicSgFlare + ' (' + classicSgTop30.length + ' / 30)')
|
||||
).append(
|
||||
$("<td>").append(classicDbFlare + ' (' + classicDbTop30.length + ' / 30)')
|
||||
)
|
||||
$("#skillwhite").append(
|
||||
$("<td>").append(whiteSgFlare + ' (' + whiteSgTop30.length + ' / 30)')
|
||||
).append(
|
||||
$("<td>").append(whiteDbFlare + ' (' + whiteDbTop30.length + ' / 30)')
|
||||
)
|
||||
$("#skillgold").append(
|
||||
$("<td>").append(goldSgFlare + ' (' + goldSgTop30.length + ' / 30)')
|
||||
).append(
|
||||
$("<td>").append(goldDbFlare + ' (' + goldDbTop30.length + ' / 30)')
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,77 @@
|
||||
$('#change-name').on('click', () => {
|
||||
const name = $('#dancer_name').val().toUpperCase();
|
||||
|
||||
emit('updateName', { refid, name }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-weight').on('click', () => {
|
||||
const weight1 = $('#weight_1').val();
|
||||
const weight2 = $('#weight_2').val();
|
||||
const weight = weight1 + '.' + weight2;
|
||||
|
||||
emit('updateWeight', { refid, weight }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-display-calories').on('click', () => {
|
||||
const selected = $('#display_calories option:selected').val();
|
||||
|
||||
emit('updateDisplayCalories', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-arrow-skin').on('click', () => {
|
||||
const selected = $('#arrow_skin option:selected').val();
|
||||
|
||||
emit('updateArrowSkin', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-guideline').on('click', () => {
|
||||
const selected = $('#guideline option:selected').val();
|
||||
|
||||
emit('updateGuideline', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-filter').on('click', () => {
|
||||
const selected = $('#filter option:selected').val();
|
||||
|
||||
emit('updateFilter', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-judgment-priority').on('click', () => {
|
||||
const selected = $('#judgment_priority option:selected').val();
|
||||
|
||||
emit('updateJudgmentPriority', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-display-timing').on('click', () => {
|
||||
const selected = $('#display_timing option:selected').val();
|
||||
|
||||
emit('updateDisplayTiming', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
|
||||
$('#change-name3').on('click', () => {
|
||||
const name = $('#name3').val().toUpperCase();
|
||||
|
||||
emit('updateName3', { refid, name }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-weight3').on('click', () => {
|
||||
const weight1 = $('#weight31').val();
|
||||
const weight2 = $('#weight32').val();
|
||||
const weight = parseInt(weight1 + '.' + weight2);
|
||||
|
||||
emit('updateWeight3', { refid, weight }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-display-calories3').on('click', () => {
|
||||
const selected = parseInt($('#display_calories3 option:selected').val()) !== 0
|
||||
|
||||
emit('updateDisplayCalories3', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-bpl-appeal').on('click', () => {
|
||||
const customize = "appeal"
|
||||
const selected = parseInt($('#bpl-appeal option:selected').val())
|
||||
|
||||
emit('playerCustomize', { customize, refid, selected }).then(() => location.reload());
|
||||
});
|
||||
@@ -0,0 +1,57 @@
|
||||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
profile3: DB.FindOne(refid, { collection: "profile3" })
|
||||
score3: DB.Find(refid, { collection: "score3" })
|
||||
|
||||
-
|
||||
|
||||
if profile3
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account
|
||||
| Basic Info
|
||||
|
||||
.card-content
|
||||
table.basic_data
|
||||
tr
|
||||
td Dancer Name
|
||||
td #{profile3.dancerName}
|
||||
tr
|
||||
td DDR Code
|
||||
td #{profile3.ddrCode}
|
||||
tr(id="area")
|
||||
td Area
|
||||
tr
|
||||
td Total Plays
|
||||
td #{profile3.playCount}
|
||||
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-fire
|
||||
| Flare Skill
|
||||
|
||||
.card-content
|
||||
table.flare_skill
|
||||
th
|
||||
th SINGLE
|
||||
th DOUBLE
|
||||
tr(id="skillrank")
|
||||
td Rank
|
||||
tr(id="skilltotal")
|
||||
td Total
|
||||
tr(id="skillclassic")
|
||||
td CLASSIC
|
||||
tr(id="skillwhite")
|
||||
td WHITE
|
||||
tr(id="skillgold")
|
||||
td GOLD
|
||||
|
||||
div(hidden id='profile3-pass') !{JSON.stringify(profile3)}
|
||||
div(hidden id='score-pass') !{JSON.stringify(score3)}
|
||||
script(src="static/js/profile_details.js")
|
||||
script(src="static/js/common.js")
|
||||
@@ -0,0 +1,84 @@
|
||||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
profile3: DB.FindOne(refid, { collection: "profile3" })
|
||||
score3: DB.Find(refid, { collection: "score3" })
|
||||
|
||||
-
|
||||
|
||||
if profile3
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-filter
|
||||
| Filter Results
|
||||
.card-content
|
||||
.score-filter
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Chart Style
|
||||
.field-body
|
||||
.control
|
||||
.select
|
||||
select(id="style_select" value=0)
|
||||
option(value=0) SINGLE
|
||||
option(value=1) DOUBLE
|
||||
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-fire
|
||||
| Classic
|
||||
|
||||
.card-content
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th(style="width:10%") #
|
||||
th(style="width:60%") Title
|
||||
th(style="width:15%") Difficulty
|
||||
th(style="width:15%") Flare Skill
|
||||
tbody#classic_flare
|
||||
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-fire
|
||||
| White
|
||||
|
||||
.card-content
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th(style="width:10%") #
|
||||
th(style="width:60%") Title
|
||||
th(style="width:15%") Difficulty
|
||||
th(style="width:15%") Flare Skill
|
||||
tbody#white_flare
|
||||
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-fire
|
||||
| Gold
|
||||
|
||||
.card-content
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th(style="width:10%") #
|
||||
th(style="width:60%") Title
|
||||
th(style="width:15%") Difficulty
|
||||
th(style="width:15%") Flare Skill
|
||||
tbody#gold_flare
|
||||
|
||||
|
||||
|
||||
div(hidden id='profile3-pass') !{JSON.stringify(profile3)}
|
||||
div(hidden id='score-pass') !{JSON.stringify(score3)}
|
||||
script(src="static/js/flaredata.js")
|
||||
script(src="static/js/common.js")
|
||||
@@ -0,0 +1,61 @@
|
||||
//DATA//
|
||||
profile3: DB.FindOne(refid, { collection: "profile3" })
|
||||
score3: DB.Find(refid, { collection: "score3" })
|
||||
|
||||
-
|
||||
link(rel="stylesheet" href="static/css/datatables.css")
|
||||
|
||||
if profile3
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-filter
|
||||
| Filter Results
|
||||
.card-content
|
||||
.score-filter
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Chart Style
|
||||
.field-body
|
||||
.control
|
||||
.select
|
||||
select(id="style_select" value=0)
|
||||
option(value=0) SINGLE
|
||||
option(value=1) DOUBLE
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Displayed Info
|
||||
.field-body
|
||||
.control
|
||||
.select
|
||||
select(id="info_select" value=0)
|
||||
option(value=0) Score
|
||||
option(value=1) Clear Rank
|
||||
option(value=2) Clear Type
|
||||
option(value=3) Flare Rank
|
||||
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-music
|
||||
| Music Data
|
||||
|
||||
.card-content
|
||||
.score-table
|
||||
table.table(id="musicdata" style="width:100%")
|
||||
thead
|
||||
tr
|
||||
th Song
|
||||
th BEGINNER
|
||||
th BASIC
|
||||
th DIFFICULT
|
||||
th EXPERT
|
||||
th CHALLENGE
|
||||
tbody
|
||||
|
||||
div(hidden id='score-pass') !{JSON.stringify(score3)}
|
||||
script(src="static/js/musicdata.js")
|
||||
script(src="static/js/datatables.js")
|
||||
@@ -0,0 +1,219 @@
|
||||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
profile3: DB.FindOne(refid, { collection: "profile3" })
|
||||
customizebpl: DB.FindOne(refid, { collection: "customize3", category: 1})
|
||||
|
||||
-
|
||||
const onOff = [ "Off", "On" ];
|
||||
const characters = [ "All Character Random", "Man Random", "Female Random", "Yuni", "Rage", "Afro", "Jenny", "Emi", "Baby-Lon", "Gus", "Ruby", "Alice", "Julio", "Bonnie", "Zero", "Rinon" ];
|
||||
const arrowSkins = [ "Normal", "X", "Classic", "Cyber", "Medium", "Small", "Dot" ];
|
||||
const guidelines = [ "Off", "Border", "Center" ];
|
||||
const filters = [ "Off", "Dark", "Darker", "Darkest" ];
|
||||
const judgmentPrioritys = [ "Judgment priority", "Arrow priority" ];
|
||||
|
||||
if profile
|
||||
-
|
||||
const common = profile.usergamedata.COMMON.strdata.split(",");
|
||||
const option = profile.usergamedata.OPTION.strdata.split(",");
|
||||
|
||||
const name = common[25];
|
||||
const weight = common[17];
|
||||
const displayCalories = parseInt(common[3]);
|
||||
const character = parseInt(common[4]);
|
||||
const arrowSkin = parseInt(option[11]);
|
||||
const guideline = parseInt(option[13]);
|
||||
const filter = parseInt(option[12]);
|
||||
const judgmentPriority = parseInt(option[15]);
|
||||
const displayTiming = parseInt(option[16]);
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-cog
|
||||
| Profile Settings
|
||||
|
||||
.card-content
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Dancer Name
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="text", id="dancer_name", pattern="[A-Z]{8}", maxlength=8, value=name)
|
||||
p.control
|
||||
a.button.is-primary#change-name Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Workout Weight
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="number", id="weight_1", value=weight.split(".")[0])
|
||||
p.control
|
||||
input.input(type="number", id="weight_2", value=weight.split(".")[1])
|
||||
p.control
|
||||
a.button.is-primary#change-weight Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Workout Display Calories
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#display_calories
|
||||
if (displayCalories === 1)
|
||||
option(value=0) Off
|
||||
option(value=1, selected) On
|
||||
else
|
||||
option(value=0, selected) Off
|
||||
option(value=1) On
|
||||
p.control
|
||||
a.button.is-primary#change-display-calories Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Arrow Skin
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#arrow_skin
|
||||
each v, i in arrowSkins
|
||||
if (arrowSkin === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-arrow-skin Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Guideline
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#guideline
|
||||
each v, i in guidelines
|
||||
if (guideline === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-guideline Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Filter concentration
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#filter
|
||||
each v, i in filters
|
||||
if (filter === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-filter Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Judgment display priority
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#judgment_priority
|
||||
each v, i in judgmentPrioritys
|
||||
if (judgmentPriority === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-judgment-priority Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Display Timing judgment
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#display_timing
|
||||
each v, i in ["Off", "On"]
|
||||
if (displayTiming === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-display-timing Submit
|
||||
|
||||
else if profile3
|
||||
-
|
||||
const name3 = profile3.dancerName;
|
||||
const weight3 = profile3.weight.toString().split('.');
|
||||
if(weight3.length < 2) weight3.push("0");
|
||||
const bplAppeal = customizebpl ? customizebpl.key : 0
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-cog
|
||||
| Profile (WIP)
|
||||
|
||||
.card-content
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Dancer Name
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="text", id="name3", pattern="[A-Z]{8}", maxlength=8, value=name3)
|
||||
p.control
|
||||
a.button.is-primary#change-name3 Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Weight
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="text", id="weight31", pattern="[0-9]*", value=weight3[0])
|
||||
input.input(type="text", id="weight32", pattern="[0-9]", value=weight3[1])
|
||||
p.control
|
||||
a.button.is-primary#change-weight3 Set
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Calorie display in-game
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#display_calories3
|
||||
if (profile3.isDispWeight)
|
||||
option(value=0) Off
|
||||
option(value=1, selected) On
|
||||
else
|
||||
option(value=0, selected) Off
|
||||
option(value=1) On
|
||||
p.control
|
||||
a.button.is-primary#change-display-calories3 Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label BPL Appeal Board
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#bpl-appeal
|
||||
option(value=0, selected=bplAppeal===0) None
|
||||
option(value=100001, selected=bplAppeal===100001) APINA VRAMeS
|
||||
option(value=100002, selected=bplAppeal===100002) GiGO
|
||||
option(value=100003, selected=bplAppeal===100003) GamePanic
|
||||
option(value=100004, selected=bplAppeal===100004) Silk Hat
|
||||
option(value=100005, selected=bplAppeal===100005) TAITO STATION Tradz
|
||||
option(value=100006, selected=bplAppeal===100006) ROUND1
|
||||
option(value=100007, selected=bplAppeal===100007) Leisureland
|
||||
p.control
|
||||
a.button.is-primary#change-bpl-appeal Change
|
||||
|
||||
|
||||
script(src="static/js/profile_settings.js")
|
||||
Reference in New Issue
Block a user