Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b017de2fd4 |
+13
@@ -0,0 +1,13 @@
|
|||||||
|
# Editor configs
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# External modules
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Project files
|
||||||
|
asphyxia-core.d.ts
|
||||||
|
package.json
|
||||||
|
package-lock.json
|
||||||
|
typedoc.json
|
||||||
|
tsconfig.json
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false,
|
||||||
|
"endOfLine": "lf",
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"quoteProps": "consistent"
|
||||||
|
}
|
||||||
@@ -1,81 +1,25 @@
|
|||||||
# DanceDanceRevolution
|
## Asphyxia Plugins
|
||||||
|
|
||||||
**Plugin Version:** fork-mdx-3.0.1
|
### Plugins included
|
||||||
|
|
||||||
**Supported game versions:** WORLD (2024091000)
|
1. [SOUND VOLTEX (KFC)](https://github.com/22vv0/asphyxia_plugins/tree/kfc)
|
||||||
|
2. [DanceDanceRevolution (MDX)](https://github.com/22vv0/asphyxia_plugins/tree/mdx)
|
||||||
|
|
||||||
**Unsupported game versions:** Everything below A20 is unsupported. A20 untested. A3 unsupported.
|
### Usage
|
||||||
|
|
||||||
**Required Asphyxia Core version** [1.50c](https://github.com/asphyxia-core/asphyxia-core.github.io/releases/tag/v1.50)
|
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.
|
||||||
|
|
||||||
**Notes:**
|
### Special thanks
|
||||||
- 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. Team Asphyxia for providing the plugins repo that I used as a starting point for this 'project' I started for fun.
|
||||||
===========
|
|
||||||
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.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
|
|
||||||
|
|
||||||
|
|
||||||
### fork-mdx-3.0.0b
|
|
||||||
|
|
||||||
- Flare skill song unlock event.... on Doubles.
|
|
||||||
- Fixes crashes on Flare Skill rank up.... on Doubles (again, just tested until Mercury.)
|
|
||||||
- Event list updated
|
|
||||||
- ghostdata saving and loading (WIP, idk what ghost is)
|
|
||||||
|
|
||||||
|
|
||||||
### fork-mdx-3.0.0a
|
|
||||||
|
|
||||||
- Flare skill song unlock event
|
|
||||||
- Added event data (ddr@asphyxia/data/world.ts:EVENTS_WORLD)
|
|
||||||
- Fixes crashes on Flare Skill rank up (at least until Mercury, haven't tested higher than that yet.)
|
|
||||||
- musicdata_load
|
|
||||||
- Put your musicdb.xml on 'ddr@asphyxia/data' folder. Tested with A3 musicdb.xml
|
|
||||||
- Added musicdata for new WORLD songs (ddr@asphyxia/data/world.ts:SONGS_WORLD)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
To do:
|
|
||||||
===========
|
|
||||||
|
|
||||||
1. Look for more missing features
|
|
||||||
2. Refactor getLastGhostId
|
|
||||||
3. Refactor hiscore code
|
|
||||||
4. More WebUI stuff
|
|
||||||
5. Figure out unknown values in score_str
|
|
||||||
6. Rival loading and figure out unknown values in rival record_str
|
|
||||||
7. Proper loading of Flare skill in-game (make sure to include only top 30 scores from classic, white and gold)
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
*.xml
|
|
||||||
-252
@@ -1,252 +0,0 @@
|
|||||||
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, 0, -1, 0, 0, 0, 0], 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: 38734, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [2, 2, 7, 11, 13, 0, 2, 7, 11, 14] },
|
|
||||||
{ mcode: 38749, 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: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 6, 11, 13, 16, 0, 6, 11, 13, 16] },
|
|
||||||
{ mcode: 38738, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [2, 5, 8, 12, 17, 5, 8, 12, 17] },
|
|
||||||
|
|
||||||
{ mcode: 37222, limited_ary: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 4, 10, 13, 0, 0, 4, 9, 13, 0] },
|
|
||||||
{ mcode: 37604, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], 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: [0, 0, 0, 0, -1, -1, 0, 0, 0, -1], diffLv: [2, 5, 9, 13, 0, 0, 5, 9, 13, 0] }
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
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, 0, -1, 0, 0, 0, 0], diffLv: [3, 7, 10, 15, 16, 0, 8, 11, 15, 16] },
|
|
||||||
{ mcode: 38295, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 7, 11, 14, 17, 0, 7, 11, 14, 17] },
|
|
||||||
{ mcode: 38258, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [2, 6, 10, 14, 16, 0, 6, 11, 14, 16] },
|
|
||||||
{ mcode: 38263, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 7, 11, 14, 16, 0, 8, 12, 15, 16] },
|
|
||||||
{ mcode: 38195, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [5, 7, 10, 13, 17, 0, 7, 10, 13, 17] },
|
|
||||||
{ mcode: 38420, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 8, 12, 15, 17, 0, 8, 12, 15, 17] },
|
|
||||||
{ mcode: 38405, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 6, 9, 13, 17, 0, 5, 9, 14, 17] },
|
|
||||||
{ mcode: 38442, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [3, 8, 13, 16, 18, 0, 8, 13, 16, 18] },
|
|
||||||
{ mcode: 38436, limited_ary: [0, 0, 0, 0, 0, -1, 0, 0, 0, 0], diffLv: [4, 7, 11, 14, 17, 0, 7, 11, 14, 17] }
|
|
||||||
]
|
|
||||||
|
|
||||||
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: 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 }
|
|
||||||
]
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
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])
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,773 +0,0 @@
|
|||||||
import { Profile } from "../models/profile";
|
|
||||||
import { ProfileWorld, ScoreWorld, EventWorld, GhostWorld, RivalWorld, HiScoreWorld } from "../models/ddrworld";
|
|
||||||
import { SONGS_WORLD, SONGS_OVERRIDE_WORLD, EVENTS_WORLD } from "../data/world";
|
|
||||||
|
|
||||||
// needs to be faster
|
|
||||||
function getLastGhostId(ghost: any) {
|
|
||||||
return ghost.reduce(function(a, b) {
|
|
||||||
let aId = (a && !a.ghostId) ? 0 : a.ghostId
|
|
||||||
let bId = (!b.ghostId) ? 0 : b.ghostId
|
|
||||||
return (a && aId > bId) ? aId : bId
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
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) {
|
|
||||||
if(score >= stepScore.score) console.log("overwriting ghostdata")
|
|
||||||
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
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("saving ghostid: " + ghostId)
|
|
||||||
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})
|
|
||||||
console.log('--------------------------------------------------------------')
|
|
||||||
ghostData = await DB.Find<GhostWorld>(null, {collection: "ghost3"})
|
|
||||||
lastGhostId = getLastGhostId(ghostData)
|
|
||||||
ghostId = 0
|
|
||||||
if(lastGhostId === 0) ghostId = 1
|
|
||||||
else ghostId = lastGhostId += 1
|
|
||||||
|
|
||||||
if(hiScoreWorld1) {
|
|
||||||
console.log('[world1] ' + hiScoreCheck + ' >= ' + hiScoreWorld1.score)
|
|
||||||
if(hiScoreCheck >= hiScoreWorld1.score) {
|
|
||||||
console.log('[world1] high score beat')
|
|
||||||
worldBreak = true
|
|
||||||
ghostId = (hiScoreWorld1.ghostId) ? hiScoreWorld1.ghostId : ghostId
|
|
||||||
console.log('[world1] ghostid exists, saving to id ' + ghostId)
|
|
||||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
worldBreak = true
|
|
||||||
console.log('[world1] entry does not exist. creating')
|
|
||||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
|
||||||
}
|
|
||||||
slot = 1
|
|
||||||
if(worldBreak) {
|
|
||||||
console.log("[world1] saving hiscore - ghost id " + ghostId)
|
|
||||||
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})
|
|
||||||
console.log('--------------------------------------------------------------')
|
|
||||||
ghostData = await DB.Find<GhostWorld>(null, {collection: "ghost3"})
|
|
||||||
lastGhostId = getLastGhostId(ghostData)
|
|
||||||
ghostId = 0
|
|
||||||
if(lastGhostId === 0) ghostId = 1
|
|
||||||
else ghostId = lastGhostId += 1
|
|
||||||
|
|
||||||
if(hiScoreArea1) {
|
|
||||||
console.log('[area1] ' + hiScoreCheck + ' >= ' + hiScoreArea1.score)
|
|
||||||
if(hiScoreCheck >= hiScoreArea1.score) {
|
|
||||||
console.log('[area1] high score beat')
|
|
||||||
areaBreak = true
|
|
||||||
ghostId = (hiScoreArea1.ghostId) ? hiScoreArea1.ghostId : ghostId
|
|
||||||
console.log('[area1] ghostid exists, saving to id ' + ghostId)
|
|
||||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
areaBreak = true
|
|
||||||
console.log('[area1] entry does not exist. creating')
|
|
||||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
|
||||||
}
|
|
||||||
slot = 2
|
|
||||||
if(areaBreak) {
|
|
||||||
console.log("[area1] saving hiscore - ghost id " + ghostId)
|
|
||||||
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})
|
|
||||||
console.log('--------------------------------------------------------------')
|
|
||||||
ghostData = await DB.Find<GhostWorld>(null, {collection: "ghost3"})
|
|
||||||
lastGhostId = getLastGhostId(ghostData)
|
|
||||||
ghostId = 0
|
|
||||||
if(lastGhostId === 0) ghostId = 1
|
|
||||||
else ghostId = lastGhostId += 1
|
|
||||||
|
|
||||||
if(hiScoreMachine1) {
|
|
||||||
console.log('[machine1] ' + hiScoreCheck + ' >= ' + hiScoreMachine1.score)
|
|
||||||
if(hiScoreCheck >= hiScoreMachine1.score) {
|
|
||||||
console.log('[machine1] high score beat')
|
|
||||||
machineBreak = true
|
|
||||||
ghostId = (hiScoreMachine1.ghostId) ? hiScoreMachine1.ghostId : ghostId
|
|
||||||
console.log('[machine1] ghostid exists, saving to id ' + ghostId)
|
|
||||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
machineBreak = true
|
|
||||||
console.log('[machine1] entry does not exist. creating')
|
|
||||||
await DB.Upsert<GhostWorld>(refid, {collection: "ghost3", ghostId }, {$set: { ghostSize, ghost }});
|
|
||||||
}
|
|
||||||
slot = 3
|
|
||||||
if(machineBreak) {
|
|
||||||
console.log("[machine1] saving hiscore - ghost id " + ghostId)
|
|
||||||
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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
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(event.type === 17) {
|
|
||||||
if (eData) eData.compTime = eData.compTime ? 0 : 1
|
|
||||||
event.comp = 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) : (event.comp !== undefined ? event.comp : '0')) + ',' + ((eData) ? eData.saveData : ((event.save !== undefined) ? event.save : '0')))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
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) ? limitedAry[index] : limited
|
|
||||||
musicList.push({
|
|
||||||
music_str: K.ITEM('str', $(music).number('mcode') + ',' + ((index > 4) ? '1,' : '0,') + (index % 5) + ',' + 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) + ',' + 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 ssssss = ''
|
|
||||||
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");
|
|
||||||
console.log("loading ghostid: " + 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
|
|
||||||
}
|
|
||||||
@@ -1,275 +0,0 @@
|
|||||||
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)
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
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)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
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();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,246 +0,0 @@
|
|||||||
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 } from "./models/ddrworld";
|
|
||||||
import { SONGS_WORLD, SONGS_OVERRIDE_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("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("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})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -1,155 +0,0 @@
|
|||||||
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 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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
export interface Ghost {
|
|
||||||
collection: "ghost";
|
|
||||||
|
|
||||||
songId: number;
|
|
||||||
difficulty: number;
|
|
||||||
ghostSize: number;
|
|
||||||
ghost: string;
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
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");
|
|
||||||
}
|
|
||||||
-19467
File diff suppressed because it is too large
Load Diff
@@ -1,75 +0,0 @@
|
|||||||
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()));
|
|
||||||
})
|
|
||||||
})
|
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
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"
|
|
||||||
]
|
|
||||||
|
|
||||||
$(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)
|
|
||||||
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
|
|
||||||
}
|
|
||||||
)
|
|
||||||
$("#area").append(
|
|
||||||
$("<td>").append(area[profile.area])
|
|
||||||
)
|
|
||||||
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],
|
|
||||||
series: mdbData[songIndex]['series']
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
flareTopScores.db.push({
|
|
||||||
flare: flareMatrix[mdbData[songIndex]['diffLv'][score.difficulty]][score.flareForce],
|
|
||||||
series: mdbData[songIndex]['series']
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
classicSgTop30 = flareTopScores.sg.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
|
|
||||||
if(classicSgTop30.length > 30) classicSgTop30.slice(0, 30)
|
|
||||||
classicSgFlare = classicSgTop30.reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
whiteSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
|
|
||||||
if(whiteSgTop30.length > 30) whiteSgTop30.slice(0, 30)
|
|
||||||
whiteSgFlare = whiteSgTop30.reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
goldSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
|
|
||||||
if(goldSgTop30.length > 30) goldSgTop30.slice(0, 30)
|
|
||||||
goldSgFlare = goldSgTop30.reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
totalSgFlare = classicSgTop30.concat(whiteSgTop30, goldSgTop30).reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
|
|
||||||
classicDbTop30 = flareTopScores.db.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
|
|
||||||
if(classicDbTop30.length > 30) classicDbTop30.slice(0, 30)
|
|
||||||
classicDbFlare = classicDbTop30.reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
whiteDbTop30 = flareTopScores.db.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
|
|
||||||
if(whiteDbTop30.length > 30) whiteDbTop30.slice(0, 30)
|
|
||||||
whiteDbFlare = whiteDbTop30.reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
goldDbTop30 = flareTopScores.db.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
|
|
||||||
if(goldDbTop30.length > 30) goldDbTop30.slice(0, 30)
|
|
||||||
goldDbFlare = goldDbTop30.reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
totalDbFlare = classicDbTop30.concat(whiteDbTop30, goldDbTop30).reduce((n, {flare}) => n + flare, 0)
|
|
||||||
|
|
||||||
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)')
|
|
||||||
)
|
|
||||||
})
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
$('#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());
|
|
||||||
});
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
//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")
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
//DATA//
|
|
||||||
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
|
|
||||||
.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")
|
|
||||||
@@ -1,199 +0,0 @@
|
|||||||
//DATA//
|
|
||||||
profile: DB.FindOne(refid, { collection: "profile" })
|
|
||||||
profile3: DB.FindOne(refid, { collection: "profile3" })
|
|
||||||
|
|
||||||
-
|
|
||||||
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");
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
script(src="static/js/profile_settings.js")
|
|
||||||
Reference in New Issue
Block a user