doubles rank up fix
This commit is contained in:
+17
-2
@@ -1,6 +1,6 @@
|
||||
# DanceDanceRevolution
|
||||
|
||||
**Plugin Version:** fork-mdx-3.0.0a
|
||||
**Plugin Version:** fork-mdx-3.0.0b
|
||||
|
||||
**Supported game versions:** WORLD (2024061300)
|
||||
|
||||
@@ -17,6 +17,17 @@
|
||||
|
||||
Changelog
|
||||
===========
|
||||
## fork-mdx-3.0.0b
|
||||
|
||||
### New:
|
||||
|
||||
1. Main:
|
||||
- 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
|
||||
|
||||
### New:
|
||||
@@ -47,4 +58,8 @@ Changelog
|
||||
|
||||
1. Look for more missing features (I don't play DDR so idk what's missing lol)
|
||||
2. Check flare skill value consistency
|
||||
3. Transfer old save data to World (?)
|
||||
3. Transfer old save data from A3 to World (?)
|
||||
4. Update re-rated song difficulties
|
||||
5. WebUI Profile page
|
||||
6. More work on score_str
|
||||
7. Rival load
|
||||
|
||||
+27
-102
@@ -1,107 +1,32 @@
|
||||
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: 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: 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: 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] }
|
||||
]
|
||||
|
||||
export const EVENTS_WORLD = [
|
||||
{ id: 1, no: 1, sid: 38667, type: 70 },
|
||||
{ id: 2, no: 1, sid: 38667, type: 71 },
|
||||
{ id: 3, no: 1, sid: 38667, type: 72 },
|
||||
{ id: 4, no: 1, sid: 38667, type: 73 },
|
||||
{ id: 5, no: 1, sid: 38661, type: 70 },
|
||||
{ id: 6, no: 1, sid: 38661, type: 71 },
|
||||
{ id: 7, no: 1, sid: 38661, type: 72 },
|
||||
{ id: 8, no: 1, sid: 38661, type: 73 },
|
||||
{ id: 9, no: 1, sid: 38668, type: 70 },
|
||||
{ id: 10, no: 1, sid: 38668, type: 71 },
|
||||
{ id: 11, no: 1, sid: 38668, type: 72 },
|
||||
{ id: 12, no: 1, sid: 38668, type: 73 },
|
||||
{ id: 13, no: 1, sid: 38665, type: 70 },
|
||||
{ id: 14, no: 1, sid: 38665, type: 71 },
|
||||
{ id: 15, no: 1, sid: 38665, type: 72 },
|
||||
{ id: 16, no: 1, sid: 38665, type: 73 },
|
||||
{ id: 17, no: 1, sid: 38665, type: 74 },
|
||||
{ id: 18, no: 1, sid: 38669, type: 70 },
|
||||
{ id: 19, no: 1, sid: 38669, type: 71 },
|
||||
{ id: 20, no: 1, sid: 38669, type: 72 },
|
||||
{ id: 21, no: 1, sid: 38669, type: 73 },
|
||||
{ id: 22, no: 1, sid: 38669, type: 74 },
|
||||
{ id: 23, no: 1, sid: 38659, type: 70 },
|
||||
{ id: 24, no: 1, sid: 38659, type: 71 },
|
||||
{ id: 25, no: 1, sid: 38659, type: 72 },
|
||||
{ id: 26, no: 1, sid: 38659, type: 73 },
|
||||
{ id: 27, no: 1, sid: 38659, type: 74 }
|
||||
{ id: 1, no: 1, sid: 38667, type: 70 }, { id: 2, no: 1, sid: 38667, type: 71 }, { id: 3, no: 1, sid: 38667, type: 72 }, { id: 4, no: 1, sid: 38667, type: 73 },
|
||||
{ id: 5, no: 1, sid: 38661, type: 70 }, { id: 6, no: 1, sid: 38661, type: 71 }, { id: 7, no: 1, sid: 38661, type: 72 }, { id: 8, no: 1, sid: 38661, type: 73 },
|
||||
{ id: 9, no: 1, sid: 38668, type: 70 }, { id: 10, no: 1, sid: 38668, type: 71 }, { id: 11, no: 1, sid: 38668, type: 72 }, { id: 12, no: 1, sid: 38668, type: 73 },
|
||||
{ id: 13, no: 1, sid: 38665, type: 70 }, { id: 14, no: 1, sid: 38665, type: 71 }, { id: 15, no: 1, sid: 38665, type: 72 }, { id: 16, no: 1, sid: 38665, type: 73 },
|
||||
{ id: 17, no: 1, sid: 38665, type: 74 }, { id: 18, no: 1, sid: 38669, type: 70 }, { id: 19, no: 1, sid: 38669, type: 71 }, { id: 20, no: 1, sid: 38669, type: 72 },
|
||||
{ id: 21, no: 1, sid: 38669, type: 73 }, { id: 22, no: 1, sid: 38669, type: 74 }, { id: 23, no: 1, sid: 38659, type: 70 }, { id: 24, no: 1, sid: 38659, type: 71 },
|
||||
{ id: 25, no: 1, sid: 38659, type: 72 }, { id: 26, no: 1, sid: 38659, type: 73 }, { id: 27, no: 1, sid: 38659, type: 74 }, { id: 28, no: 1, sid: 38667, type: 81 },
|
||||
{ id: 29, no: 1, sid: 38667, type: 82 }, { id: 30, no: 1, sid: 38667, type: 83 }, { id: 31, no: 1, sid: 38661, type: 81 }, { id: 32, no: 1, sid: 38661, type: 82 },
|
||||
{ id: 33, no: 1, sid: 38661, type: 83 }, { id: 34, no: 1, sid: 38668, type: 81 }, { id: 35, no: 1, sid: 38668, type: 82 }, { id: 36, no: 1, sid: 38668, type: 83 },
|
||||
{ id: 37, no: 1, sid: 38665, type: 81 }, { id: 38, no: 1, sid: 38665, type: 82 }, { id: 39, no: 1, sid: 38665, type: 83 }, { id: 40, no: 1, sid: 38665, type: 84 },
|
||||
{ id: 41, no: 1, sid: 38669, type: 81 }, { id: 42, no: 1, sid: 38669, type: 82 }, { id: 43, no: 1, sid: 38669, type: 83 }, { id: 44, no: 1, sid: 38669, type: 84 },
|
||||
{ id: 45, no: 1, sid: 38659, type: 81 }, { id: 46, no: 1, sid: 38659, type: 82 }, { id: 47, no: 1, sid: 38659, type: 83 }, { id: 48, no: 1, sid: 38659, type: 84 }
|
||||
]
|
||||
+138
-125
@@ -1,5 +1,5 @@
|
||||
import { Profile } from "../models/profile";
|
||||
import { ProfileWorld, ScoreWorld, EventWorld } from "../models/ddrworld";
|
||||
import { ProfileWorld, ScoreWorld, EventWorld, GhostWorld } from "../models/ddrworld";
|
||||
import { SONGS_WORLD, EVENTS_WORLD } from "../data/world";
|
||||
|
||||
async function saveScores(refid: string, songId: number, style: number, difficulty: number, rank: number, clearKind: number, score: number, exScore: number, maxCombo: number, flareForce: number, ghostSize: number, ghost: string) {
|
||||
@@ -28,6 +28,17 @@ async function saveScores(refid: string, songId: number, style: number, difficul
|
||||
flareForce
|
||||
}
|
||||
});
|
||||
|
||||
await DB.Upsert<GhostWorld>(refid, {
|
||||
collection: "ghost3",
|
||||
songId,
|
||||
difficulty
|
||||
}, {
|
||||
$set: {
|
||||
ghostSize,
|
||||
ghost
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export const playerdatanew: EPR = async (info, data, send) => {
|
||||
@@ -238,11 +249,111 @@ export const playerdatasave: EPR = async (info, data, send) => {
|
||||
|
||||
export const playerdataload: EPR = async (info, data, send) => {
|
||||
const refid = $(data).str("data.refid");
|
||||
console.log('playerdataload')
|
||||
console.log("----------------------")
|
||||
if (!refid.startsWith("X000")) {
|
||||
const profile_a3 = await DB.FindOne<Profile>(refid, { collection: "profile" });
|
||||
const profile = await DB.FindOne<ProfileWorld>(refid, { collection: "profile3" });
|
||||
const profile = await DB.FindOne<ProfileWorld>(refid, { collection: "profile3" });
|
||||
|
||||
if (!profile || 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", 0),
|
||||
dancername: K.ITEM("str", ''),
|
||||
is_new: K.ITEM('bool', true),
|
||||
is_registering: 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),
|
||||
is_takeover: 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 {
|
||||
const scores = await DB.Find<ScoreWorld>(refid, { collection: "score3" });
|
||||
|
||||
let scoreFin = []
|
||||
@@ -256,6 +367,7 @@ export const playerdataload: EPR = async (info, data, send) => {
|
||||
scr['score_double'] = []
|
||||
/*
|
||||
difficulty,idk,grade,clearkind,score,idk either,flaredisp,flarepoints
|
||||
needs more work, 9 vals
|
||||
*/
|
||||
scr[(scoreData.style === 0) ? 'score_single' : 'score_double'] = [
|
||||
{
|
||||
@@ -280,121 +392,6 @@ export const playerdataload: EPR = async (info, data, send) => {
|
||||
})
|
||||
}
|
||||
|
||||
if(!profile) {
|
||||
if(profile_a3) {
|
||||
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: {
|
||||
is_takeover: K.ITEM('bool', true)
|
||||
}
|
||||
})
|
||||
}
|
||||
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", 0),
|
||||
dancername: K.ITEM("str", ''),
|
||||
is_new: K.ITEM('bool', true),
|
||||
is_registering: 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),
|
||||
is_takeover: 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", "")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
refid: K.ITEM("str", refid),
|
||||
@@ -479,10 +476,6 @@ export const playerdataload: EPR = async (info, data, send) => {
|
||||
event: eventFin
|
||||
});
|
||||
}
|
||||
return send.object({
|
||||
result: K.ITEM("s32", 0),
|
||||
is_new: K.ITEM("bool", false)
|
||||
})
|
||||
};
|
||||
|
||||
export const musicdataload: EPR = async (info, data, send) => {
|
||||
@@ -526,6 +519,21 @@ export const rivaldataload: EPR = async (info, data, send) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const ghostdataload: EPR = async (info, data, send) => {
|
||||
// i quite frankly dk what this is for lol i don't play ddr
|
||||
const refid = $(data).str("data.refid");
|
||||
const ghostId = $(data).number("data.ghostid");
|
||||
let ghostData = await DB.FindOne<GhostWorld>(refid, {collection: 'ghost3', songId: 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({
|
||||
@@ -534,6 +542,11 @@ export const taboowordcheck: EPR = async (info, data, send) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const minidump: EPR = async (info, data, send) => {
|
||||
console.log($(data).str('minidump'))
|
||||
return send.object({ result: K.ITEM('s32', 0) })
|
||||
};
|
||||
|
||||
function getDate(): number {
|
||||
let time = new Date();
|
||||
let tempDate = time.getDate();
|
||||
|
||||
@@ -2,7 +2,7 @@ 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, taboowordcheck } from "./handlers/ddrworld";
|
||||
import { musicdataload, playerdatanew, playerdatasave, playerdataload, rivaldataload, ghostdataload, taboowordcheck, minidump } from "./handlers/ddrworld";
|
||||
import { CommonOffset, OptionOffset, Profile } from "./models/profile";
|
||||
|
||||
export function register() {
|
||||
@@ -51,7 +51,9 @@ export function register() {
|
||||
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)
|
||||
|
||||
|
||||
@@ -21,6 +21,15 @@ export interface ScoreWorld {
|
||||
flareForce: number;
|
||||
}
|
||||
|
||||
export interface GhostWorld {
|
||||
collection: "ghost3"
|
||||
|
||||
songId: number;
|
||||
difficulty: number;
|
||||
ghostSize: number;
|
||||
ghost: string;
|
||||
}
|
||||
|
||||
export interface EventWorld {
|
||||
collection: "event3";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user