diff --git a/iidx@asphyxia/README.md b/iidx@asphyxia/README.md index 045954c..24b59be 100644 --- a/iidx@asphyxia/README.md +++ b/iidx@asphyxia/README.md @@ -1,6 +1,6 @@ # beatmaniaIIDX -Plugin Version: **v0.1.6** +Plugin Version: **v0.1.8** --- @@ -10,6 +10,7 @@ Supported Versions - beatmaniaIIDX 19 Lincle - beatmaniaIIDX 20 tricoro - beatmaniaIIDX 21 SPADA + - beatmaniaIIDX 22 PENDUAL - beatmaniaIIDX 27 HEROIC VERSE - beatmaniaIIDX 28 BISTROVER - beatmaniaIIDX 29 CastHour @@ -54,7 +55,7 @@ Changelogs **v0.1.5** - Added Initial support for Resort Anthem - BEGINNER, LEAGUE, STORY does not work yet. - - Fixed s_hispeed/d_hispeed doesn't save correctly. + - Fixed where s_hispeed/d_hispeed doesn't save correctly. **v0.1.6** - Added Initial support for tricoro @@ -65,4 +66,12 @@ Changelogs **v0.1.7** - Added Initial support for SPADA - Event savings are broken - - Fixed rtype didn't save correctly. (BISTROVER ~) + - Fixed where rtype didn't save correctly. (BISTROVER ~) + +**v0.1.8** + - Added RIVAL pacemaker support + - Added Initial support for PENDUAL + - Event savings are broken + - Fixed where old_linkage_secret_flg is missing on pc.get response (RESIDENT) + - Fixed where game could crash due to invalid rival qprodata + - Fixed where lift isn't saving (SPADA) diff --git a/iidx@asphyxia/handlers/music.ts b/iidx@asphyxia/handlers/music.ts index f1eb814..fe020c1 100644 --- a/iidx@asphyxia/handlers/music.ts +++ b/iidx@asphyxia/handlers/music.ts @@ -1,4 +1,4 @@ -import { IDtoRef, Base64toBuffer, GetVersion, OldMidToNewMid, NewMidToOldMid } from "../util"; +import { IDtoRef, Base64toBuffer, GetVersion, OldMidToNewMid, NewMidToOldMid, ReftoProfile, ReftoPcdata, ClidToPlaySide } from "../util"; import { score, score_top } from "../models/score"; import { profile } from "../models/profile"; @@ -160,6 +160,8 @@ export const musicappoint: EPR = async (info, data, send) => { // clid, ctype, grd, iidxid, lv, mid, subtype // const refid = await IDtoRef(parseInt($(data).attr().iidxid)); + const ctype = parseInt($(data).attr().ctype); + const subtype = parseInt($(data).attr().subtype); let mid = parseInt($(data).attr().mid); let clid = parseInt($(data).attr().clid); @@ -171,7 +173,8 @@ export const musicappoint: EPR = async (info, data, send) => { else if (version < 27) { clid = mapping[clid]; } - + + // MINE // const music_data: score | null = await DB.FindOne(refid, { collection: "score", mid: mid, @@ -191,9 +194,83 @@ export const musicappoint: EPR = async (info, data, send) => { } else mydata = K.ITEM("bin", Base64toBuffer(music_data[clid])); + /*** ctype + [-1] - DEFAULT + [1] - RIVAL + [2] - ALL TOP + [3] - ALL AVG. + [4] - LOCATION TOP + [5] - LOCATION AVG. + [6] - SAME DAN TOP + [7] - SAME DAN AVG. + [8] - RIVAL TOP + [9] - RIVAL AVG. + [10] - STORE TOP + [13] - RIVAL NEXT + [14] - STORE ROTATE + [15] - RIVAL ROTATE + ***/ + + // OTHERS // + let other_refid, other_musicdata: score | null, other_pcdata, other_profile, sdata = null; + switch (ctype) { + case 1: + if (_.isNaN(subtype)) break; + + other_refid = await IDtoRef(subtype); + other_profile = await ReftoProfile(other_refid); + other_pcdata = await ReftoPcdata(other_refid, version); + other_musicdata = await DB.FindOne(other_refid, { + collection: "score", + mid: mid, + [clid]: { $exists: true }, + }); + if (_.isNaN(other_pcdata) || _.isNil(other_musicdata)) break; + + sdata = K.ITEM("bin", Base64toBuffer(other_musicdata[clid]), { + score: other_musicdata.esArray[clid].toString(), + pid: other_profile[1].toString(), + name: other_profile[0].toString(), + riidxid: other_profile[2].toString() + }); + break; + + default: + break; + } + if (version >= 27) { let my_gauge_data = Base64toBuffer(music_data[clid + 10]); + if (!_.isNil(sdata)) { + if (_.isNil(other_musicdata.optArray)) { // temp // + other_musicdata.optArray = Array(10).fill(0); + other_musicdata.opt2Array = Array(10).fill(0); + } + + let other_data = K.ITEM("bin", Base64toBuffer(other_musicdata[clid]), { + score: other_musicdata.esArray[clid].toString(), + achieve: other_pcdata[ClidToPlaySide(clid) + 2].toString(), + pid: other_profile[1].toString(), + name: other_profile[0].toString(), + riidxid: other_profile[2].toString(), + option: other_musicdata.optArray[clid].toString(), // CastHour // + option2: other_musicdata.opt2Array[clid].toString(), + }); + + sdata = { + ...other_data, + gauge_data: K.ITEM("bin", Base64toBuffer(other_musicdata[clid + 10])) + }; + + return send.object({ + "@attr": { my_option: option, my_option2: option2 }, // CastHour // + mydata: K.ITEM("bin", mydata), + my_gauge_data: K.ITEM("bin", my_gauge_data), + sdata, + }); + } + return send.object({ "@attr": { my_option: option, my_option2: option2 }, // CastHour // mydata: K.ITEM("bin", mydata), @@ -201,8 +278,15 @@ export const musicappoint: EPR = async (info, data, send) => { }); } + if (!_.isNil(sdata)) { + return send.object({ + mydata, + sdata, + }); + } + return send.object({ - mydata + mydata, }); } diff --git a/iidx@asphyxia/handlers/pc.ts b/iidx@asphyxia/handlers/pc.ts index 9e309e8..3bd48d5 100644 --- a/iidx@asphyxia/handlers/pc.ts +++ b/iidx@asphyxia/handlers/pc.ts @@ -1,4 +1,4 @@ -import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_pcdata, IIDX21_pcdata } from "../models/pcdata"; +import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_pcdata, IIDX21_pcdata, IIDX22_pcdata } from "../models/pcdata"; import { grade } from "../models/grade"; import { custom, default_custom } from "../models/custom"; import { IDtoCode, IDtoRef, Base64toBuffer, GetVersion, ReftoProfile, ReftoPcdata, ReftoQPRO, appendSettingConverter } from "../util"; @@ -71,7 +71,7 @@ export const pccommon: EPR = async (info, data, send) => { beat: String(U.GetConfig("BeatPhase")), }), limit: K.ATTR({ - phase: String(3), + phase: String(4), }), boss: K.ATTR({ phase: String(3), @@ -126,6 +126,9 @@ export const pcreg: EPR = async (info, data, send) => { case 21: pcdata = IIDX21_pcdata; break; + case 22: + pcdata = IIDX22_pcdata; + break; case 27: pcdata = IIDX27_pcdata; lightning_playdata = lm_playdata; @@ -280,7 +283,7 @@ export const pcget: EPR = async (info, data, send) => { for (let a = 0; a < rivals.length; a++) { let profile = await ReftoProfile(rivals[a].rival_refid); let pcdata = await ReftoPcdata(rivals[a].rival_refid, version); - let qprodata = await ReftoQPRO(rivals[a].rival_refid); + let qprodata = await ReftoQPRO(rivals[a].rival_refid, version); let rival_data: rival_data = { play_style: rivals[a].play_style, @@ -370,23 +373,29 @@ export const pcget: EPR = async (info, data, send) => { }); } else if (version >= 21) { - let link5 = null, tricolettepark = null, boss1 = null, evtArray = [], evtArray2 = []; - if (version == 20 || version == 21) { - link5 = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "link5" }); - tricolettepark = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "tricolettepark" }); + let link5 = null, + tricolettepark = null, + boss1 = null, + chrono_diver = null, + evtArray = [], evtArray2 = []; + if (version == 21 || version == 22) { + if (!_.isNil(pcdata.sp_mlist)) { + pcdata.sp_mlist = Base64toBuffer(pcdata.sp_mlist).toString("hex"); + pcdata.sp_clist = Base64toBuffer(pcdata.sp_clist).toString("hex"); + pcdata.dp_mlist = Base64toBuffer(pcdata.dp_mlist).toString("hex"); + pcdata.dp_clist = Base64toBuffer(pcdata.dp_clist).toString("hex"); + } + + if (!_.isNil(pcdata.st_album)) pcdata.st_album = Base64toBuffer(pcdata.st_album).toString("hex"); if (version == 21) { - if (!_.isNil(pcdata.sp_mlist)) { - pcdata.sp_mlist = Base64toBuffer(pcdata.sp_mlist).toString("hex"); - pcdata.sp_clist = Base64toBuffer(pcdata.sp_clist).toString("hex"); - pcdata.dp_mlist = Base64toBuffer(pcdata.dp_mlist).toString("hex"); - pcdata.dp_clist = Base64toBuffer(pcdata.dp_clist).toString("hex"); - } - - if (!_.isNil(pcdata.st_album)) pcdata.st_album = Base64toBuffer(pcdata.st_album).toString("hex"); + link5 = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "link5" }); + tricolettepark = await DB.FindOne(refid, { collection: "event_1", version: 20, event_name: "tricolettepark" }); boss1 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "boss1" }); if (!_.isNil(boss1.durability)) boss1.durability = Base64toBuffer(boss1.durability).toString("hex"); + } else if (version == 22) { + chrono_diver = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "chrono_diver" }); } } else { @@ -510,6 +519,7 @@ export const pcget: EPR = async (info, data, send) => { boss1, link5, tricolettepark, + chrono_diver, wArray, bArray, }); @@ -566,6 +576,9 @@ export const pctakeover: EPR = async (info, data, send) => { case 21: pcdata = IIDX21_pcdata; break; + case 22: + pcdata = IIDX22_pcdata; + break; case 27: pcdata = IIDX27_pcdata; lightning_playdata = lm_playdata; @@ -587,7 +600,6 @@ export const pctakeover: EPR = async (info, data, send) => { lightning_settings = lm_settings_new; break; - default: return send.deny(); } @@ -1123,6 +1135,9 @@ export const pcsave: EPR = async (info, data, send) => { pcdata.s_opstyle = parseInt($(data).attr().s_opstyle); pcdata.d_opstyle = parseInt($(data).attr().d_opstyle); + if (!_.isNil($(data).attr().s_lift)) pcdata.s_liflen = parseInt($(data).attr().s_lift); + if (!_.isNil($(data).attr().d_lift)) pcdata.s_liflen = parseInt($(data).attr().d_lift); + if (!_.isNil($(data).element("secret"))) { pcdata.secret_flg1 = $(data).element("secret").bigints("flg1").map(String); pcdata.secret_flg2 = $(data).element("secret").bigints("flg2").map(String); @@ -1346,6 +1361,163 @@ export const pcsave: EPR = async (info, data, send) => { ); } } + else if (version == 22) { + pcdata.rtype = parseInt($(data).attr().rtype); + pcdata.sach = parseInt($(data).attr().s_achi); + pcdata.dach = parseInt($(data).attr().d_achi); + pcdata.sp_opt = parseInt($(data).attr().sp_opt); + pcdata.dp_opt = parseInt($(data).attr().dp_opt); + pcdata.dp_opt2 = parseInt($(data).attr().dp_opt2); + pcdata.gpos = parseInt($(data).attr().gpos); + pcdata.s_sorttype = parseInt($(data).attr().s_sorttype); + pcdata.d_sorttype = parseInt($(data).attr().d_sorttype); + pcdata.s_disp_judge = parseInt($(data).attr().s_disp_judge); + pcdata.d_disp_judge = parseInt($(data).attr().d_disp_judge); + pcdata.s_pace = parseInt($(data).attr().s_pace); + pcdata.d_pace = parseInt($(data).attr().d_pace); + pcdata.s_gno = parseInt($(data).attr().s_gno); + pcdata.d_gno = parseInt($(data).attr().d_gno); + pcdata.s_gtype = parseInt($(data).attr().s_gtype); + pcdata.d_gtype = parseInt($(data).attr().d_gtype); + pcdata.s_sdlen = parseInt($(data).attr().s_sdlen); + pcdata.d_sdlen = parseInt($(data).attr().d_sdlen); + pcdata.s_sdtype = parseInt($(data).attr().s_sdtype); + pcdata.d_sdtype = parseInt($(data).attr().d_sdtype); + pcdata.s_notes = parseFloat($(data).attr().s_notes); + pcdata.d_notes = parseFloat($(data).attr().d_notes); + pcdata.s_judge = parseInt($(data).attr().s_judge); + pcdata.d_judge = parseInt($(data).attr().d_judge); + pcdata.s_judgeAdj = parseInt($(data).attr().s_judgeAdj); + pcdata.d_judgeAdj = parseInt($(data).attr().d_judgeAdj); + pcdata.s_hispeed = parseFloat($(data).attr().s_hispeed); + pcdata.d_hispeed = parseFloat($(data).attr().d_hispeed); + pcdata.s_opstyle = parseInt($(data).attr().s_opstyle); + pcdata.d_opstyle = parseInt($(data).attr().d_opstyle); + pcdata.s_exscore = parseInt($(data).attr().s_exscore); + pcdata.d_exscore = parseInt($(data).attr().d_exscore); + pcdata.s_largejudge = parseInt($(data).attr().s_largejudge); + pcdata.d_largejudge = parseInt($(data).attr().d_largejudge); + + if (!_.isNil($(data).attr().s_lift)) pcdata.s_liflen = parseInt($(data).attr().s_lift); + if (!_.isNil($(data).attr().d_lift)) pcdata.s_liflen = parseInt($(data).attr().d_lift); + + if (!_.isNil($(data).element("secret"))) { + pcdata.secret_flg1 = $(data).element("secret").bigints("flg1").map(String); + pcdata.secret_flg2 = $(data).element("secret").bigints("flg2").map(String); + pcdata.secret_flg3 = $(data).element("secret").bigints("flg3").map(String); + } + + if (!_.isNil($(data).element("favorite"))) { + pcdata.sp_mlist = $(data).element("favorite").buffer("sp_mlist").toString("base64"); + pcdata.sp_clist = $(data).element("favorite").buffer("sp_clist").toString("base64"); + pcdata.dp_mlist = $(data).element("favorite").buffer("dp_mlist").toString("base64"); + pcdata.dp_clist = $(data).element("favorite").buffer("dp_clist").toString("base64"); + } + + if (!_.isNil($(data).element("qpro_secret"))) { + custom.qpro_secret_head = $(data).element("qpro_secret").bigints("head").map(String); + custom.qpro_secret_hair = $(data).element("qpro_secret").bigints("hair").map(String); + custom.qpro_secret_face = $(data).element("qpro_secret").bigints("face").map(String); + custom.qpro_secret_body = $(data).element("qpro_secret").bigints("body").map(String); + custom.qpro_secret_hand = $(data).element("qpro_secret").bigints("hand").map(String); + } + + if (!_.isNil($(data).element("qpro_equip"))) { + custom.qpro_head = parseInt($(data).attr("qpro_equip").head); + custom.qpro_hair = parseInt($(data).attr("qpro_equip").hair); + custom.qpro_face = parseInt($(data).attr("qpro_equip").face); + custom.qpro_body = parseInt($(data).attr("qpro_equip").body); + custom.qpro_hand = parseInt($(data).attr("qpro_equip").head); + } + + if (!_.isNil($(data).element("achievements"))) { + // TODO:: achi_packflg, achi_packid, achi_playpack // + pcdata.achi_lastweekly = parseInt($(data).attr("achievements").last_weekly); + pcdata.achi_packcomp = parseInt($(data).attr("achievements").pack_comp); + pcdata.achi_visitflg = parseInt($(data).attr("achievements").visit_flg); + pcdata.achi_weeklynum = parseInt($(data).attr("achievements").weekly_num); + pcdata.achi_trophy = $(data).element("achievements").bigints("trophy").map(String); + } + + if (hasStepUpData) { + pcdata.st_damage = parseInt($(data).attr("step").damage); + pcdata.st_defeat = parseInt($(data).attr("step").defeat); + pcdata.st_progress = parseInt($(data).attr("step").progress); + pcdata.st_is_secret = parseInt($(data).attr("step").is_secret); + pcdata.st_sp_mission = parseInt($(data).attr("step").sp_mission); + pcdata.st_dp_mission = parseInt($(data).attr("step").dp_mission); + pcdata.st_sp_level = parseInt($(data).attr("step").sp_level); + pcdata.st_dp_level = parseInt($(data).attr("step").dp_level); + pcdata.st_sp_mplay = parseInt($(data).attr("step").sp_mplay); + pcdata.st_dp_mplay = parseInt($(data).attr("step").dp_mplay); + pcdata.st_age_list = parseInt($(data).attr("step").age_list); + pcdata.st_album = $(data).buffer("step").toString("base64"); // TODO:: verify // + pcdata.st_is_present = parseInt($(data).attr("step").is_present); + pcdata.st_is_future = parseInt($(data).attr("step").is_future); + } + + if (!_.isNil($(data).element("deller"))) pcdata.deller += parseInt($(data).attr("deller").deller); + if (!_.isNil($(data).element("orb_data"))) pcdata.orb += parseInt($(data).attr("orb_data").add_orb); + + // TODO:: fix event saving, these event savings are broken. // + if (!_.isNil($(data).element("chrono_diver"))) { + let event_data = { + play_count: parseInt($(data).attr("chrono_diver").play_count), + present_unlock: parseInt($(data).attr("chrono_diver").present_unlock), + future_unlock: parseInt($(data).attr("chrono_diver").future_unlock), + success_count_0_n: parseInt($(data).attr("chrono_diver").success_count_0_n), + success_count_0_h: parseInt($(data).attr("chrono_diver").success_count_0_h), + success_count_0_a: parseInt($(data).attr("chrono_diver").success_count_0_a), + success_count_1_n: parseInt($(data).attr("chrono_diver").success_count_1_n), + success_count_1_h: parseInt($(data).attr("chrono_diver").success_count_1_h), + success_count_1_a: parseInt($(data).attr("chrono_diver").success_count_1_a), + success_count_2_n: parseInt($(data).attr("chrono_diver").success_count_2_n), + success_count_2_h: parseInt($(data).attr("chrono_diver").success_count_2_h), + success_count_2_a: parseInt($(data).attr("chrono_diver").success_count_2_a), + success_count_3_n: parseInt($(data).attr("chrono_diver").success_count_3_n), + success_count_3_h: parseInt($(data).attr("chrono_diver").success_count_3_h), + success_count_3_a: parseInt($(data).attr("chrono_diver").success_count_3_a), + story_list: parseInt($(data).attr("chrono_diver").story_list) + }; + + await DB.Upsert(refid, + { + collection: "event_1", + version: version, + event_name: "chrono_diver", + }, + { + $set: event_data, + } + ); + } + + if (!_.isNil($(data).element("boss_event_3"))) { + let boss_event_3 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "boss_event_3" }); + let event_data; + + if (_.isNil(boss_event_3)) { + event_data = { + point: parseInt($(data).attr().add_bonus_point) + } + } + else { + event_data = boss_event_3; + event_data.point += parseInt($(data).attr("boss_event_3").add_bonus_point); + } + + await DB.Upsert(refid, + { + collection: "event_1", + version: version, + event_name: "boss_event_3", + }, + { + $set: event_data, + } + ); + } + } else if (version >= 27) { // lid bookkeep cid ctype ccode pcdata.rtype = parseInt($(data).attr().rtype); diff --git a/iidx@asphyxia/index.ts b/iidx@asphyxia/index.ts index 046f36f..6d6d7d0 100644 --- a/iidx@asphyxia/index.ts +++ b/iidx@asphyxia/index.ts @@ -35,6 +35,7 @@ export function register() { const MultiRoute = (method: string, handler: EPR | boolean) => { R.Route(`${method}`, handler); R.Route(`IIDX21${method}`, handler); + R.Route(`IIDX22${method}`, handler); R.Route(`IIDX27${method}`, handler); R.Route(`IIDX28${method}`, handler); R.Route(`IIDX29${method}`, handler); diff --git a/iidx@asphyxia/models/pcdata.ts b/iidx@asphyxia/models/pcdata.ts index dac1271..47c1ff8 100644 --- a/iidx@asphyxia/models/pcdata.ts +++ b/iidx@asphyxia/models/pcdata.ts @@ -64,6 +64,10 @@ export interface pcdata { d_disp_judge: number; s_opstyle: number; d_opstyle: number; + s_exscore: number; // PENDUAL // + d_exscore: number; + s_largejudge: number; + d_largejudge: number; s_graph_score: number; d_graph_score: number; s_auto_scrach: number; @@ -140,6 +144,10 @@ export interface pcdata { st_dp_mplay: number; st_last_select: number; st_album: any; + st_is_secret: number; // step (PENDUAL) // + st_age_list: number; + st_is_present: number; + st_is_future: number; st_enemy_damage: number; // step (Heroic Verse) // st_progress: number; @@ -380,7 +388,88 @@ export const IIDX21_pcdata = { st_sp_mplay: 0, st_dp_mplay: 0, st_last_select: 0, - st_album: "", + st_album: null, + + achi_pack: 0, + achi_packcomp: 0, + achi_lastweekly: 0, + achi_weeklynum: 0, + achi_visitflg: 0, + achi_rivalcrush: 0, + achi_trophy: Array(20).fill("0"), + + deller: 0, + orb: 0, +} + +export const IIDX22_pcdata = { + version: 22, + + spnum: 0, + dpnum: 0, + sach: 0, + dach: 0, + mode: 0, + pmode: 0, + rtype: 0, + sp_opt: 0, + dp_opt: 0, + dp_opt2: 0, + gpos: 0, + s_sorttype: 0, + d_sorttype: 0, + s_pace: 0, + d_pace: 0, + s_gno: 0, + d_gno: 0, + s_gtype: 0, + d_gtype: 0, + s_sdlen: 0, + d_sdlen: 0, + s_sdtype: 0, + d_sdtype: 0, + s_timing: 0, + d_timing: 0, + s_notes: 0, + d_notes: 0, + s_judge: 0, + d_judge: 0, + s_judgeAdj: 0, + d_judgeAdj: 0, + s_hispeed: 0, + d_hispeed: 0, + s_liflen: 0, + d_liflen: 0, + s_disp_judge: 0, + d_disp_judge: 0, + s_opstyle: 0, + d_opstyle: 0, + s_exscore: 0, + d_exscore: 0, + s_largejudge: 0, + d_largejudge: 0, + + secret_flg1: Array(3).fill("-1"), + secret_flg2: Array(3).fill("-1"), + secret_flg3: Array(3).fill("-1"), + + sgid: -1, + dgid: -1, + + st_damage: 0, + st_defeat: 0, + st_progress: 0, + st_sp_mission: 0, + st_dp_mission: 0, + st_sp_level: 0, + st_dp_level: 0, + st_sp_mplay: 0, + st_dp_mplay: 0, + st_age_list: 0, + st_is_secret: 0, + st_is_present: 0, + st_is_future: 0, + st_album: null, achi_pack: 0, achi_packcomp: 0, diff --git a/iidx@asphyxia/pug/LDJ/21pccommon.pug b/iidx@asphyxia/pug/LDJ/21pccommon.pug index e3545f1..b76d976 100644 --- a/iidx@asphyxia/pug/LDJ/21pccommon.pug +++ b/iidx@asphyxia/pug/LDJ/21pccommon.pug @@ -1,14 +1,14 @@ IIDX21pc(status="0" expire="600") ir(beat=beat) - limit(phase="1") - boss(phase="1") - boss1(phase="1") + limit(phase="4") + boss(phase="3") + boss1(phase="4") medal(phase="1") vip_pass_black cafe(open="1") tricolettepark(open="1") - tricolettepark_skip(phase="1") + tricolettepark_skip(phase="2") deller_bonus(open="1") gumi_event newsong_another(open="1") - superstar(phase="1") + superstar(phase="2") diff --git a/iidx@asphyxia/pug/LDJ/22pccommon.pug b/iidx@asphyxia/pug/LDJ/22pccommon.pug new file mode 100644 index 0000000..a7a7949 --- /dev/null +++ b/iidx@asphyxia/pug/LDJ/22pccommon.pug @@ -0,0 +1,21 @@ +IIDX22pc(status="0" expire="600") + ir(beat=beat) + //- + cm(id="" folder="" compo="") + pre_play(phase="2") + expert(phase="2") + toho_remix(phase="2") + expert_random_secret(phase="2") + limit(phase="9") + boss(phase="3") + chrono_diver(phase="4") + qpronicle_chord(phase="3") + vip_pass_black + cc_collabo_event(phase="3") + cc_collabo_license + deller_bonus(open="1") + newsong_another(open="1") + common_timeshift_phase(phase="1") + expert_secret_full_open + eaappli_expert + eaorder diff --git a/iidx@asphyxia/pug/LDJ/22pcget.pug b/iidx@asphyxia/pug/LDJ/22pcget.pug new file mode 100644 index 0000000..74bac33 --- /dev/null +++ b/iidx@asphyxia/pug/LDJ/22pcget.pug @@ -0,0 +1,63 @@ +IIDX22pc(status="0") + pcdata(id=profile.id idstr=profile.idstr name=profile.name pid=profile.pid spnum=pcdata.spnum dpnum=pcdata.dpnum sach=pcdata.sach dach=pcdata.dach mode=pcdata.mode pmode=pcdata.pmode rtype=pcdata.rtype sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 gpos=pcdata.gpos s_sorttype=pcdata.s_sorttype d_sorttype=pcdata.d_sorttype s_pace=pcdata.s_pace d_pace=pcdata.d_pace s_gno=pcdata.s_gno d_gno=pcdata.d_gno s_gtype=pcdata.s_gtype d_gtype=pcdata.d_gtype s_sdlen=pcdata.s_sdlen d_sdlen=pcdata.d_sdlen s_sdtype=pcdata.s_sdtype d_sdtype=pcdata.d_sdtype s_timing=pcdata.s_timing d_timing=pcdata.d_timing s_notes=pcdata.s_notes d_notes=pcdata.d_notes s_judge=pcdata.s_judge d_judge=pcdata.d_judge s_judgeAdj=pcdata.s_judgeAdj d_judgeAdj=pcdata.d_judgeAdj s_hispeed=pcdata.s_hispeed d_hispeed=pcdata.d_hispeed s_liflen=pcdata.s_liflen d_liflen=pcdata.d_liflen s_disp_judge=pcdata.s_disp_judge d_disp_judge=pcdata.d_disp_judge s_opstyle=pcdata.s_opstyle d_opstyle=pcdata.d_opstyle s_exscore=pcdata.s_exscore d_exscore=pcdata.d_exscore s_largejudge=pcdata.s_largejudge d_largejudge=pcdata.d_largejudge) + spdp_rival(flg="-1") + bind_eaappli + secret + flg1(__type="s64" __count="3") -1 -1 -1 + flg2(__type="s64" __count="3") -1 -1 -1 + flg3(__type="s64" __count="3") -1 -1 -1 + if pcdata.sp_mlist != null + favorite + sp_mlist(__type="bin") #{pcdata.sp_mlist} + sp_clist(__type="bin") #{pcdata.sp_clist} + dp_mlist(__type="bin") #{pcdata.dp_mlist} + dp_clist(__type="bin") #{pcdata.dp_clist} + qpro_secret + head(__type="s64" __count="4") -1 -1 -1 -1 + hair(__type="s64" __count="4") -1 -1 -1 -1 + face(__type="s64" __count="4") -1 -1 -1 -1 + body(__type="s64" __count="4") -1 -1 -1 -1 + hand(__type="s64" __count="4") -1 -1 -1 -1 + grade(sgid=pcdata.sgid dgid=pcdata.dgid) + - for (let d of dArray) + g(__type="u8" __count="4") #{d[0]} #{d[1]} #{d[2]} #{d[3]} + skin(__type="s16" __count="14") #{custom.frame} #{custom.turntable} #{custom.note_burst} #{custom.menu_music} #{appendsettings} #{custom.lane_cover} 0 #{custom.category_vox} #{custom.note_skin} #{custom.full_combo_splash} 0 #{custom.disable_musicpreview} 0 0 + qprodata(__type="u32" __count="5") #{custom.qpro_head} #{custom.qpro_hair} #{custom.qpro_face} #{custom.qpro_hand} #{custom.qpro_body} + rlist + - for (let rd of rArray) + rival(spdp=rd.play_style id=rd.profile[2] id_str=rd.profile[3] djname=rd.profile[0] pid=rd.profile[1] sg=rd.pcdata[0] dg=rd.pcdata[1] sa=rd.pcdata[2] da=rd.pcdata[3]) + stepdata(step_sach="-1" step_dach="-1") + qprodata(body=rd.qprodata[3] face=rd.qprodata[2] hair=rd.qprodata[0] hand=rd.qprodata[4] head=rd.qprodata[1]) + shop(name="CORE") + join_shop(joinflg="1" join_cflg="1" join_id="0" join_name="CORE") + if pcdata.st_album != null + step(damage=pcdata.st_damage defeat=pcdata.st_defeat progress=pcdata.st_progress round=pcdata.st_round sp_mission=pcdata.st_sp_mission dp_mission=pcdata.st_dp_mission sp_level=pcdata.st_sp_level dp_level=pcdata.st_dp_level sp_mplay=pcdata.st_sp_mplay dp_mplay=pcdata.st_dp_mplay age_list=pcdata.st_age_list is_secret=pcdata.st_is_secret is_present=pcdata.st_is_present is_future=pcdata.st_is_future) + album(__type="bin") #{pcdata.st_album} + //-step_assist(iidx_id iidx_id_str name hair head face body hand) + if chrono_diver != null + chrono_diver(play_count=chrono_diver.play_count present_unlock=chrono_diver.present_unlock future_unlock=chrono_diver.future_unlock success_count_0_n=chrono_diver.success_count_0_n success_count_0_h=chrono_diver.success_count_0_h success_count_0_a=chrono_diver.success_count_0_a success_count_1_n=chrono_diver.success_count_1_n success_count_1_h=chrono_diver.success_count_1_h success_count_1_a=chrono_diver.success_count_1_a success_count_2_n=chrono_diver.success_count_2_n success_count_2_h=chrono_diver.success_count_2_h success_count_2_a=chrono_diver.success_count_2_a success_count_3_n=chrono_diver.success_count_3_n success_count_3_h=chrono_diver.success_count_3_h success_count_3_a=chrono_diver.success_count_3_a story_list=chrono_diver.story_list) + //-qpronicle_chord(is_first_select_map last_select_map story_view_list is_login_bonus patona_leader patona_sub_1 patona_sub_2 rare_enemy_damage1 rare_enemy_damage2 rare_enemy_damage3 rare_enemy_damage4 rare_enemy_damage5) + patona_data(patona_no level exp affection dissatisfaction) + //-qpronicle_phase3(stairs_num flame_list lane_list map0_select map1_select map2_select map3_select map5_select map6_select is_love_scene_skip) + qpronicle_love(music_list="-1") + boss_event_3(music_list="-1" bonus_point="0") + //-chaser(phase attack exist_age summon_gate success failed damage_point boss_hp) + ues_music(__type="u32" __count="40") + achievements(pack=pcdata.achi_pack pack_comp=pcdata.achi_packcomp last_weekly=pcdata.achi_lastweekly weekly_num=pcdata.achi_weeklynum visit_flg=pcdata.achi_visitflg rival_crush=pcdata.achi_rivalcrush) + trophy(__type="s64" __count="10") #{pcdata.achi_trophy[0]} #{pcdata.achi_trophy[1]} #{pcdata.achi_trophy[2]} #{pcdata.achi_trophy[3]} #{pcdata.achi_trophy[4]} #{pcdata.achi_trophy[5]} #{pcdata.achi_trophy[6]} #{pcdata.achi_trophy[7]} #{pcdata.achi_trophy[8]} #{pcdata.achi_trophy[9]} + old_linked_event(gakuen_list="-1" baseball_list="-1" tricolette_list="-1" cafedetran_list="-1") + pyramid(music_list="-1" item_list="-1" statue_0="0" statue_1="0" statue_2="0") + reflec_collabo(collabo_phase="2" phase1_iidx_play="10" phase2_iidx_play="10" phase1_reflec_play="10" phase2_reflec_play="10" phase1_music_list="-1" phase2_music_list="-1" phase1_iidx_item="-1" phase2_iidx_item="-1" phase1_reflec_item="-1" phase2_reflec_item="-1") + destiny_catharsis(music_bit="-1") + bemani_summer_collabo(music_bit="-1") + deller(deller=pcdata.deller rate="1") + orb_data(rest_orb=pcdata.orb) + time_sandglass(item_num="10") + present_time_sandglass(item_num="10") + sound_holic(music_list="-1" announce_list="-1") + cc_collabo_music(music_list="-1") + cc_collabo_data(customize_list="-1" new_get_customize="1" new_open_music="1" new_consume_drink="1") + beatstream_collabo(music_list="-1") + konami_stytle + is_skip(__type="bool") 1 + floor_infection(music_list="-1") diff --git a/iidx@asphyxia/pug/LDJ/30pcget.pug b/iidx@asphyxia/pug/LDJ/30pcget.pug index 1d016b2..558eee5 100644 --- a/iidx@asphyxia/pug/LDJ/30pcget.pug +++ b/iidx@asphyxia/pug/LDJ/30pcget.pug @@ -55,6 +55,7 @@ IIDX30pc(status="0") trophy(__type="s64" __count="10") #{pcdata.achi_trophy[0]} #{pcdata.achi_trophy[1]} #{pcdata.achi_trophy[2]} #{pcdata.achi_trophy[3]} #{pcdata.achi_trophy[4]} #{pcdata.achi_trophy[5]} #{pcdata.achi_trophy[6]} #{pcdata.achi_trophy[7]} #{pcdata.achi_trophy[8]} #{pcdata.achi_trophy[9]} deller(deller=pcdata.deller rate="1") orb_data(rest_orb=pcdata.orb present_orb=pcdata.present_orb) + old_linkage_secret_flg(song_battle="-1") arena_data(play_num="2" play_num_dp="1" play_num_sp="1" prev_best_class_sp="20" prev_best_class_dp="20") achieve_data(play_style="0" arena_class="20" rating_value="20" win_count="0" now_winning_streak_count="0" best_winning_streak_count="0" perfect_win_count="0" counterattack_num="0" mission_clear_num="0") achieve_data(play_style="1" arena_class="20" rating_value="20" win_count="0" now_winning_streak_count="0" best_winning_streak_count="0" perfect_win_count="0" counterattack_num="0" mission_clear_num="0") diff --git a/iidx@asphyxia/util.ts b/iidx@asphyxia/util.ts index d767dff..a61af63 100644 --- a/iidx@asphyxia/util.ts +++ b/iidx@asphyxia/util.ts @@ -31,6 +31,22 @@ export function NewMidToOldMid(mid: number) { return Number(`${numberString.slice(0, 2)}${numberString.slice(3)}`); } +export function ClidToPlaySide(clid: number) { + switch (clid) { + case 0: // SPB // + case 1: + case 2: + case 3: + case 4: + return 0; // SPA // + + default: + break; + } + + return 1; +} + export function Base64toBuffer(s: string) { const base64list = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; @@ -143,9 +159,10 @@ export async function ReftoPcdata(refid: string, version: number) { return p_data; } -export async function ReftoQPRO(refid: string) { +export async function ReftoQPRO(refid: string, version: number) { const custom = await DB.FindOne(refid, { collection: "custom", + version: version, }); let qpro_data = [];