mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
IIDX: Initial support added for tricoro
IIDX: Added movie_upload url setting on plugin settings
This commit is contained in:
parent
b9bedd6d1f
commit
386c4ccb7b
|
|
@ -1,6 +1,6 @@
|
|||
# beatmaniaIIDX
|
||||
|
||||
Plugin Version: **v0.1.5**
|
||||
Plugin Version: **v0.1.6**
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -8,6 +8,7 @@ Supported Versions
|
|||
|
||||
- beatmaniaIIDX 18 Resort Anthem
|
||||
- beatmaniaIIDX 19 Lincle
|
||||
- beatmaniaIIDX 20 tricoro
|
||||
- beatmaniaIIDX 27 HEROIC VERSE
|
||||
- beatmaniaIIDX 28 BISTROVER
|
||||
- beatmaniaIIDX 29 CastHour
|
||||
|
|
@ -33,9 +34,10 @@ Changelogs
|
|||
|
||||
**v0.1.1**
|
||||
- Added Initial support for HEROIC VERSE
|
||||
- Expanded score array to adapting newer difficulty, (SPN ~ DPA [6] -> SPB ~ DPL [10])
|
||||
- Expanded score array to adapting newer difficulty (SPN ~ DPA [6] -> SPB ~ DPL [10])
|
||||
- This borked previous score datas recorded with v0.1.0
|
||||
- All score data now shared with all version. as it doesn't have music_id conversion, it will display incorrect data on certain versions.
|
||||
- All score data now shared with all version.
|
||||
- as it doesn't have music_id conversion, it will display incorrect data on certain versions.
|
||||
- Added Initial customize support (no webui)
|
||||
|
||||
**v0.1.2**
|
||||
|
|
@ -52,3 +54,9 @@ Changelogs
|
|||
- Added Initial support for Resort Anthem
|
||||
- BEGINNER, LEAGUE, STORY does not work yet.
|
||||
- Fixed s_hispeed/d_hispeed doesn't save correctly.
|
||||
|
||||
**v0.1.6**
|
||||
- Added Initial support for tricoro
|
||||
- Event savings are broken
|
||||
- Added movie_upload url setting on plugin setting (BISTROVER ~)
|
||||
- This uses JSON instead of XML and this requires additional setup. (can't test or implement this as I don't own NVIDIA GPU)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const musicgetrank: EPR = async (info, data, send) => {
|
|||
let m = [], top = [];
|
||||
let score_data: number[];
|
||||
let indices, temp_mid = 0;
|
||||
if (version == 18 || version == 19) {
|
||||
if (version < 20) {
|
||||
indices = cltype === 0 ? [1, 2, 3] : [6, 7, 8];
|
||||
music_data.forEach((res: score) => {
|
||||
temp_mid = NewMidToOldMid(res.mid);
|
||||
|
|
@ -58,7 +58,38 @@ export const musicgetrank: EPR = async (info, data, send) => {
|
|||
m.push(K.ARRAY("s16", score_data));
|
||||
});
|
||||
}
|
||||
} else if (version >= 27) {
|
||||
}
|
||||
else if (version > 19 && version < 27) {
|
||||
indices = cltype === 0 ? [1, 2, 3] : [6, 7, 8];
|
||||
music_data.forEach((res: score) => {
|
||||
if (cltype == 0) {
|
||||
score_data = [-1, res.mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
} else {
|
||||
score_data = [-1, res.mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
}
|
||||
|
||||
m.push(K.ARRAY("s16", score_data));
|
||||
});
|
||||
|
||||
for (let i = 0; i < rival_refids.length; i++) {
|
||||
if (_.isNaN(rival_refids[i][0])) continue;
|
||||
|
||||
const rival_score = await DB.Find<score>(String(rival_refids[i][1]),
|
||||
{ collection: "score", }
|
||||
);
|
||||
|
||||
rival_score.forEach((res: score) => {
|
||||
if (cltype == 0) {
|
||||
score_data = [i, res.mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
} else {
|
||||
score_data = [i, res.mid, ...indices.map(i => res.cArray[i]), ...indices.map(i => res.esArray[i]), ...indices.map(i => res.mArray[i])];
|
||||
}
|
||||
|
||||
m.push(K.ARRAY("s16", score_data));
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (version >= 27) {
|
||||
indices = cltype === 0 ? [0, 1, 2, 3, 4] : [5, 6, 7, 8, 9];
|
||||
music_data.forEach((res: score) => {
|
||||
if (cltype == 0) {
|
||||
|
|
@ -131,10 +162,13 @@ export const musicappoint: EPR = async (info, data, send) => {
|
|||
let clid = parseInt($(data).attr().clid);
|
||||
|
||||
const mapping = [1, 2, 3, 6, 7, 8];
|
||||
if (version == 18 || version == 19) {
|
||||
if (version < 20) {
|
||||
mid = OldMidToNewMid(mid);
|
||||
clid = mapping[clid];
|
||||
}
|
||||
else if (version < 27) {
|
||||
clid = mapping[clid];
|
||||
}
|
||||
|
||||
const music_data: score | null = await DB.FindOne<score>(refid, {
|
||||
collection: "score",
|
||||
|
|
@ -187,12 +221,15 @@ export const musicreg: EPR = async (info, data, send) => {
|
|||
|
||||
const mapping = [1, 2, 3, 6, 7, 8];
|
||||
if (version == -1) return send.deny();
|
||||
else if (version == 18 || version == 19) {
|
||||
else if (version < 20) {
|
||||
mid = OldMidToNewMid(mid);
|
||||
if (mid == -1) return send.deny();
|
||||
|
||||
clid = mapping[clid];
|
||||
}
|
||||
else if (version < 27) {
|
||||
clid = mapping[clid];
|
||||
}
|
||||
|
||||
const music_data: score | null = await DB.FindOne<score>(refid, {
|
||||
collection: "score",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata } from "../models/pcdata";
|
||||
import { pcdata, KDZ_pcdata, IIDX27_pcdata, IIDX28_pcdata, IIDX29_pcdata, IIDX30_pcdata, JDZ_pcdata, LDJ_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";
|
||||
|
|
@ -61,10 +61,42 @@ export const pccommon: EPR = async (info, data, send) => {
|
|||
flg: String(-1),
|
||||
}),
|
||||
});
|
||||
} else if (version == 20) {
|
||||
return send.object({
|
||||
"@attr": {
|
||||
expire: 600,
|
||||
},
|
||||
ir: K.ATTR({
|
||||
beat: String(U.GetConfig("BeatPhase")),
|
||||
}),
|
||||
limit: K.ATTR({
|
||||
phase: String(3),
|
||||
}),
|
||||
boss: K.ATTR({
|
||||
phase: String(3),
|
||||
}),
|
||||
red: K.ATTR({
|
||||
phase: String(3),
|
||||
}),
|
||||
yellow: K.ATTR({
|
||||
phase: String(3),
|
||||
}),
|
||||
medal: K.ATTR({
|
||||
phase: String(3),
|
||||
}),
|
||||
cafe: K.ATTR({
|
||||
open: String(1),
|
||||
}),
|
||||
tricolettepark: K.ATTR({
|
||||
open: String(1),
|
||||
}),
|
||||
|
||||
});
|
||||
}
|
||||
else if (version >= 27) {
|
||||
return send.pugFile(`pug/LDJ/${version}pccommon.pug`, {
|
||||
beat: U.GetConfig("BeatPhase"),
|
||||
movie_upload: U.GetConfig("MovieUpload"),
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
|
@ -88,6 +120,9 @@ export const pcreg: EPR = async (info, data, send) => {
|
|||
case 19:
|
||||
pcdata = KDZ_pcdata;
|
||||
break;
|
||||
case 20:
|
||||
pcdata = LDJ_pcdata;
|
||||
break;
|
||||
case 27:
|
||||
pcdata = IIDX27_pcdata;
|
||||
lightning_playdata = lm_playdata;
|
||||
|
|
@ -309,7 +344,29 @@ export const pcget: EPR = async (info, data, send) => {
|
|||
rArray,
|
||||
event,
|
||||
});
|
||||
} else if (version >= 27) {
|
||||
}
|
||||
else if (version == 20) {
|
||||
if (!_.isNil(pcdata.st_help)) pcdata.st_help = Base64toBuffer(pcdata.st_help);
|
||||
|
||||
let link5 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "link5" });
|
||||
let tricolettepark = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "tricolettepark" });
|
||||
let redboss = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "redboss" });
|
||||
let yellowboss = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "yellowboss" });
|
||||
|
||||
return send.pugFile("pug/LDJ/pcget.pug", {
|
||||
profile,
|
||||
pcdata,
|
||||
dArray,
|
||||
appendsettings,
|
||||
custom,
|
||||
rArray,
|
||||
link5,
|
||||
tricolettepark,
|
||||
redboss,
|
||||
yellowboss,
|
||||
});
|
||||
}
|
||||
else if (version >= 27) {
|
||||
event_1 = await DB.Find(refid, { collection: "event_1", version: version });
|
||||
event_1s = await DB.Find(refid, { collection: "event_1_sub", version: version });
|
||||
|
||||
|
|
@ -473,6 +530,9 @@ export const pctakeover: EPR = async (info, data, send) => {
|
|||
case 19:
|
||||
pcdata = KDZ_pcdata;
|
||||
break;
|
||||
case 20:
|
||||
pcdata = LDJ_pcdata;
|
||||
break;
|
||||
case 27:
|
||||
pcdata = IIDX27_pcdata;
|
||||
lightning_playdata = lm_playdata;
|
||||
|
|
@ -648,7 +708,7 @@ export const pcsave: EPR = async (info, data, send) => {
|
|||
r7: parseInt($(data).attr("tour").r7),
|
||||
}
|
||||
|
||||
DB.Upsert(refid,
|
||||
await DB.Upsert(refid,
|
||||
{
|
||||
collection: "event_1",
|
||||
version: version,
|
||||
|
|
@ -714,7 +774,7 @@ export const pcsave: EPR = async (info, data, send) => {
|
|||
piece: $(data).element("kingdom").buffer("piece").toString("base64"),
|
||||
}
|
||||
|
||||
DB.Upsert(refid,
|
||||
await DB.Upsert(refid,
|
||||
{
|
||||
collection: "event_1",
|
||||
version: version,
|
||||
|
|
@ -735,6 +795,265 @@ export const pcsave: EPR = async (info, data, send) => {
|
|||
pcdata.p4 = $(data).element("history").numbers("p4");
|
||||
}
|
||||
}
|
||||
else if (version == 20) {
|
||||
if (cltype == 0) {
|
||||
pcdata.sach = parseInt($(data).attr().achi);
|
||||
pcdata.sp_opt = parseInt($(data).attr().opt);
|
||||
} else {
|
||||
pcdata.dach = parseInt($(data).attr().achi);
|
||||
pcdata.dp_opt = parseInt($(data).attr().opt);
|
||||
pcdata.dp_opt2 = parseInt($(data).attr().opt2);
|
||||
}
|
||||
|
||||
pcdata.gno = parseInt($(data).attr().gno);
|
||||
pcdata.gpos = parseInt($(data).attr().gpos);
|
||||
pcdata.timing = parseInt($(data).attr().timing);
|
||||
pcdata.help = parseInt($(data).attr().help);
|
||||
pcdata.sdhd = parseInt($(data).attr().sdhd);
|
||||
pcdata.sdtype = parseInt($(data).attr().sdtype);
|
||||
pcdata.notes = parseFloat($(data).attr().notes);
|
||||
pcdata.pase = parseInt($(data).attr().pase);
|
||||
pcdata.judge = parseInt($(data).attr().judge);
|
||||
pcdata.opstyle = parseInt($(data).attr().opstyle);
|
||||
pcdata.hispeed = parseFloat($(data).attr().hispeed);
|
||||
pcdata.judgeAdj = parseInt($(data).attr().judgeAdj);
|
||||
pcdata.liflen = parseInt($(data).attr().lift);
|
||||
pcdata.fcombo[cltype] = parseInt($(data).attr().fcombo);
|
||||
|
||||
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("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 (hasStepUpData) {
|
||||
if (cltype == 0) {
|
||||
pcdata.st_sp_ach = parseInt($(data).attr("step").sp_ach);
|
||||
pcdata.st_sp_hdpt = parseInt($(data).attr("step").sp_hdpt);
|
||||
pcdata.st_sp_level = parseInt($(data).attr("step").sp_level);
|
||||
pcdata.st_sp_round = parseInt($(data).attr("step").sp_round);
|
||||
pcdata.st_sp_mplay = parseInt($(data).attr("step").sp_mplay);
|
||||
|
||||
} else {
|
||||
pcdata.st_dp_ach = parseInt($(data).attr("step").dp_ach);
|
||||
pcdata.st_dp_hdpt = parseInt($(data).attr("step").dp_hdpt);
|
||||
pcdata.st_dp_level = parseInt($(data).attr("step").dp_level);
|
||||
pcdata.st_dp_round = parseInt($(data).attr("step").dp_round);
|
||||
pcdata.st_dp_mplay = parseInt($(data).attr("step").dp_mplay);
|
||||
}
|
||||
pcdata.st_review = parseInt($(data).attr("step").review);
|
||||
pcdata.st_help = $(data).element("step").buffer("help").toString("base64");
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// TODO:: fix event saving, these event savings are broken. //
|
||||
if (!_.isNil($(data).element("link5"))) {
|
||||
let link5 = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "link5" });
|
||||
let event_data;
|
||||
|
||||
if (_.isNil(link5)) {
|
||||
event_data = {
|
||||
qpro: parseInt($(data).attr("link5").qpro), // add
|
||||
glass: parseInt($(data).attr("link5").glass), // add
|
||||
beautiful: parseInt($(data).attr("link5").beautiful),
|
||||
quaver: parseInt($(data).attr("link5").quaver),
|
||||
castle: parseInt($(data).attr("link5").castle),
|
||||
flip: parseInt($(data).attr("link5").flip),
|
||||
titans: parseInt($(data).attr("link5").titans),
|
||||
exusia: parseInt($(data).attr("link5").exusia),
|
||||
waxing: parseInt($(data).attr("link5").waxing),
|
||||
sampling: parseInt($(data).attr("link5").sampling),
|
||||
beachside: parseInt($(data).attr("link5").beachside),
|
||||
cuvelia: parseInt($(data).attr("link5").cuvelia),
|
||||
reunion: parseInt($(data).attr("link5").reunion),
|
||||
bad: parseInt($(data).attr("link5").bad),
|
||||
turii: parseInt($(data).attr("link5").turii),
|
||||
anisakis: parseInt($(data).attr("link5").anisakis),
|
||||
second: parseInt($(data).attr("link5").second),
|
||||
whydidyou: parseInt($(data).attr("link5").whydidyou),
|
||||
china: parseInt($(data).attr("link5").china),
|
||||
fallen: parseInt($(data).attr("link5").fallen),
|
||||
broken: parseInt($(data).attr("link5").broken),
|
||||
summer: parseInt($(data).attr("link5").summer),
|
||||
sakura: parseInt($(data).attr("link5").sakura),
|
||||
wuv: parseInt($(data).attr("link5").wuv),
|
||||
survival: parseInt($(data).attr("link5").survival),
|
||||
thunder: parseInt($(data).attr("link5").thunder),
|
||||
}
|
||||
}
|
||||
else {
|
||||
event_data = link5;
|
||||
|
||||
event_data.qpro += parseInt($(data).attr("link5").qpro);
|
||||
event_data.glass += parseInt($(data).attr("link5").glass);
|
||||
event_data.beautiful = parseInt($(data).attr("link5").beautiful);
|
||||
event_data.quaver = parseInt($(data).attr("link5").quaver);
|
||||
event_data.castle = parseInt($(data).attr("link5").castle);
|
||||
event_data.flip = parseInt($(data).attr("link5").flip);
|
||||
event_data.titans = parseInt($(data).attr("link5").titans);
|
||||
event_data.exusia = parseInt($(data).attr("link5").exusia);
|
||||
event_data.waxing = parseInt($(data).attr("link5").waxing);
|
||||
event_data.sampling = parseInt($(data).attr("link5").sampling);
|
||||
event_data.beachside = parseInt($(data).attr("link5").beachside);
|
||||
event_data.cuvelia = parseInt($(data).attr("link5").cuvelia);
|
||||
event_data.reunion = parseInt($(data).attr("link5").reunion);
|
||||
event_data.bad = parseInt($(data).attr("link5").bad);
|
||||
event_data.turii = parseInt($(data).attr("link5").turii);
|
||||
event_data.anisakis = parseInt($(data).attr("link5").anisakis);
|
||||
event_data.second = parseInt($(data).attr("link5").second);
|
||||
event_data.whydidyou = parseInt($(data).attr("link5").whydidyou);
|
||||
event_data.china = parseInt($(data).attr("link5").china);
|
||||
event_data.fallen = parseInt($(data).attr("link5").fallen);
|
||||
event_data.broken = parseInt($(data).attr("link5").broken);
|
||||
event_data.summer = parseInt($(data).attr("link5").summer);
|
||||
event_data.sakura = parseInt($(data).attr("link5").sakura);
|
||||
event_data.wuv = parseInt($(data).attr("link5").wuv);
|
||||
event_data.survival = parseInt($(data).attr("link5").survival);
|
||||
event_data.thunder = parseInt($(data).attr("link5").thunder);
|
||||
}
|
||||
|
||||
await DB.Upsert(refid,
|
||||
{
|
||||
collection: "event_1",
|
||||
version: version,
|
||||
event_name: "link5",
|
||||
},
|
||||
{
|
||||
$set: event_data,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (!_.isNil($(data).element("tricolettepark"))) {
|
||||
let tricolettepark = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "tricolettepark" });
|
||||
let event_data;
|
||||
|
||||
if (_.isNil(tricolettepark)) {
|
||||
event_data = {
|
||||
open_music: parseInt($(data).attr("tricolettepark").open_music),
|
||||
boss0_damage: parseInt($(data).attr("tricolettepark").boss0_damage), // add
|
||||
boss1_damage: parseInt($(data).attr("tricolettepark").boss1_damage),
|
||||
boss2_damage: parseInt($(data).attr("tricolettepark").boss2_damage),
|
||||
boss3_damage: parseInt($(data).attr("tricolettepark").boss3_damage),
|
||||
boss0_stun: parseInt($(data).attr("tricolettepark").boss0_stun),
|
||||
boss1_stun: parseInt($(data).attr("tricolettepark").boss1_stun),
|
||||
boss2_stun: parseInt($(data).attr("tricolettepark").boss2_stun),
|
||||
boss3_stun: parseInt($(data).attr("tricolettepark").boss3_stun),
|
||||
union_magic_used: parseInt($(data).attr("tricolettepark").union_magic_used),
|
||||
}
|
||||
}
|
||||
else {
|
||||
event_data = tricolettepark;
|
||||
|
||||
event_data.open_music = parseInt($(data).attr("tricolettepark").open_music),
|
||||
event_data.boss0_damage += parseInt($(data).attr("tricolettepark").boss0_damage);
|
||||
event_data.boss1_damage += parseInt($(data).attr("tricolettepark").boss1_damage);
|
||||
event_data.boss2_damage += parseInt($(data).attr("tricolettepark").boss2_damage);
|
||||
event_data.boss3_damage += parseInt($(data).attr("tricolettepark").boss3_damage);
|
||||
event_data.boss0_stun = parseInt($(data).attr("tricolettepark").boss0_stun);
|
||||
event_data.boss1_stun = parseInt($(data).attr("tricolettepark").boss1_stun);
|
||||
event_data.boss2_stun = parseInt($(data).attr("tricolettepark").boss2_stun);
|
||||
event_data.boss3_stun = parseInt($(data).attr("tricolettepark").boss3_stun);
|
||||
event_data.union_magic_used = parseInt($(data).attr("tricolettepark").union_magic_used);
|
||||
}
|
||||
|
||||
await DB.Upsert(refid,
|
||||
{
|
||||
collection: "event_1",
|
||||
version: version,
|
||||
event_name: "tricolettepark",
|
||||
},
|
||||
{
|
||||
$set: event_data,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (!_.isNil($(data).element("commonboss"))) {
|
||||
pcdata.deller += parseInt($(data).attr("commonboss").deller);
|
||||
pcdata.orb += parseInt($(data).attr("commonboss").orb);
|
||||
}
|
||||
|
||||
if (!_.isNil($(data).element("yellowboss"))) {
|
||||
let yellowboss = await DB.FindOne(refid, { collection: "event_1", version: version, event_name: "yellowboss" });
|
||||
let event_data;
|
||||
|
||||
if (_.isNil(yellowboss)) {
|
||||
event_data = {
|
||||
level: parseInt($(data).attr("yellowboss").level),
|
||||
heroic0: parseInt($(data).attr("yellowboss").heroic0),
|
||||
heroic1: parseInt($(data).attr("yellowboss").heroic1),
|
||||
critical: parseInt($(data).attr("yellowboss").critical),
|
||||
last_select: parseInt($(data).attr("yellowboss").last_select),
|
||||
p_attack: $(data).element("yellowboss").numbers("p_attack"),
|
||||
pbest_attack: $(data).element("yellowboss").numbers("pbest_attack"),
|
||||
defeat: $(data).element("yellowboss").numbers("defeat"), // <- bools //
|
||||
first_flg: 0, // <- bool //
|
||||
}
|
||||
} else {
|
||||
event_data = yellowboss;
|
||||
|
||||
event_data.level = parseInt($(data).attr("yellowboss").level);
|
||||
event_data.heroic0 = parseInt($(data).attr("yellowboss").heroic0);
|
||||
event_data.heroic1 = parseInt($(data).attr("yellowboss").heroic1);
|
||||
event_data.critical = parseInt($(data).attr("yellowboss").critical);
|
||||
event_data.last_select = parseInt($(data).attr("yellowboss").last_select);
|
||||
|
||||
let p_attack = $(data).element("yellowboss").numbers("p_attack");
|
||||
for (let a = 0; a < 7; a++) {
|
||||
event_data.p_attack[a] += p_attack[a];
|
||||
event_data.pbest_attack[a] = Math.max(event_data.pbest_attack[a], p_attack[a]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
await DB.Upsert(refid,
|
||||
{
|
||||
collection: "event_1",
|
||||
version: version,
|
||||
event_name: "yellowboss",
|
||||
},
|
||||
{
|
||||
$set: event_data,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (!_.isNil($(data).element("redboss"))) {
|
||||
let event_data = {
|
||||
progress: parseInt($(data).attr("redboss").progress),
|
||||
crush: parseInt($(data).attr("redboss").crush),
|
||||
open: parseInt($(data).attr("redboss").open),
|
||||
}
|
||||
|
||||
await DB.Upsert(refid,
|
||||
{
|
||||
collection: "event_1",
|
||||
version: version,
|
||||
event_name: "redboss",
|
||||
},
|
||||
{
|
||||
$set: event_data,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (version >= 27) {
|
||||
// lid bookkeep cid ctype ccode
|
||||
pcdata.rtype = parseInt($(data).attr().d_sdtype);
|
||||
|
|
@ -1242,6 +1561,15 @@ export const pcgetlanegacha: EPR = async (info, data, send) => {
|
|||
});
|
||||
};
|
||||
|
||||
export const pcshopregister: EPR = async (info, data, send) => {
|
||||
let refid = IDtoRef(parseInt($(data).str("iidx_id")));
|
||||
let lid = $(data).str("location_id");
|
||||
|
||||
// TODO //
|
||||
|
||||
return send.success();
|
||||
};
|
||||
|
||||
export const pcdrawlanegacha: EPR = async (info, data, send) => {
|
||||
let drawNum = parseInt($(data).attr().draw_num);
|
||||
let tArray = [];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { pccommon, pcreg, pcget, pcgetname, pctakeover, pcvisit, pcsave, pcoldget, pcgetlanegacha, pcconsumelanegacha, pcdrawlanegacha } from "./handlers/pc";
|
||||
import { pccommon, pcreg, pcget, pcgetname, pctakeover, pcvisit, pcsave, pcoldget, pcgetlanegacha, pcconsumelanegacha, pcdrawlanegacha, pcshopregister } from "./handlers/pc";
|
||||
import { shopgetname, shopgetconvention, shopsetconvention } from "./handlers/shop";
|
||||
import { musicreg, musicgetrank, musicappoint, musicarenacpu } from "./handlers/music";
|
||||
import { graderaised } from "./handlers/grade";
|
||||
import { gssysteminfo } from "./handlers/gamesystem";
|
||||
import { updateRivalSettings } from "./handlers/webui";
|
||||
import { GetVersion } from "./util";
|
||||
|
||||
export function register() {
|
||||
if (CORE_VERSION_MAJOR <= 1 && CORE_VERSION_MINOR < 31) {
|
||||
|
|
@ -23,6 +24,12 @@ export function register() {
|
|||
default: 3,
|
||||
});
|
||||
|
||||
R.Config("MovieUpload", {
|
||||
name: "Movie Upload URL",
|
||||
type: "string",
|
||||
default: "http://localhost/"
|
||||
});
|
||||
|
||||
R.WebUIEvent("updateIIDXRivalSettings", updateRivalSettings);
|
||||
|
||||
const MultiRoute = (method: string, handler: EPR | boolean) => {
|
||||
|
|
@ -41,6 +48,7 @@ export function register() {
|
|||
MultiRoute("pc.takeover", pctakeover);
|
||||
MultiRoute("pc.visit", pcvisit);
|
||||
MultiRoute("pc.save", pcsave);
|
||||
MultiRoute("pc.shopregister", pcshopregister);
|
||||
MultiRoute("pc.getLaneGachaTicket", pcgetlanegacha);
|
||||
MultiRoute("pc.drawLaneGacha", pcdrawlanegacha);
|
||||
MultiRoute("pc.consumeLaneGachaTicket", pcconsumelanegacha);
|
||||
|
|
@ -59,7 +67,7 @@ export function register() {
|
|||
MultiRoute("gameSystem.systemInfo", gssysteminfo);
|
||||
|
||||
R.Unhandled((req: EamuseInfo, data: any, send: EamuseSend) => {
|
||||
console.warn(`Unhandled Request : ${req.module}.${req.method}`);
|
||||
console.warn(`Unhandled Request : ${req.module}.${req.method} , [${GetVersion(req)}]`);
|
||||
return send.success();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ export interface pcdata {
|
|||
mode: number;
|
||||
pmode: number;
|
||||
liflen: number;
|
||||
judge: number; // attribute (tricoro) //
|
||||
opstyle: number;
|
||||
hispeed: number;
|
||||
judgeAdj: number;
|
||||
|
||||
notes: number; // attribute (Lincle) //
|
||||
pase: number;
|
||||
|
|
@ -102,7 +106,7 @@ export interface pcdata {
|
|||
achi_rivalcrush: number;
|
||||
achi_visitflg: number;
|
||||
achi_weeklynum: number;
|
||||
achi_trophy: string[]; // for somewhat reason save throws 160 elements but anything above 20 will rejected //
|
||||
achi_trophy: string[]; // for somewhat reason save throws lots of elements but sending it as-is throws error //
|
||||
|
||||
deller: number; // in-game currency (heroic verse) //
|
||||
orb: number;
|
||||
|
|
@ -118,6 +122,13 @@ export interface pcdata {
|
|||
st_dp_ach: number;
|
||||
st_dp_dif: number;
|
||||
|
||||
st_sp_hdpt: number; // step (tricoro) //
|
||||
st_dp_hdpt: number;
|
||||
st_sp_round: number;
|
||||
st_dp_round: number;
|
||||
st_review: number;
|
||||
st_help: any; // save as base64 string, sent as buffer //
|
||||
|
||||
st_enemy_damage: number; // step (Heroic Verse) //
|
||||
st_progress: number;
|
||||
st_is_track_ticket: boolean;
|
||||
|
|
@ -238,6 +249,61 @@ export const KDZ_pcdata = {
|
|||
p4: Array<number>(30).fill(-1),
|
||||
}
|
||||
|
||||
export const LDJ_pcdata = {
|
||||
version: 20,
|
||||
|
||||
spnum: 0,
|
||||
dpnum: 0,
|
||||
sach: 0,
|
||||
dach: 0,
|
||||
help: 0,
|
||||
gno: 0,
|
||||
gpos: 0,
|
||||
timing: 0,
|
||||
sdhd: 0,
|
||||
sdtype: 0,
|
||||
notes: 0,
|
||||
pase: 0,
|
||||
sp_opt: 0,
|
||||
dp_opt: 0,
|
||||
dp_opt2: 0,
|
||||
mode: 0,
|
||||
pmode: 0,
|
||||
liflen: 0,
|
||||
judge: 0,
|
||||
opstyle: 0,
|
||||
hispeed: 0,
|
||||
judgeAdj: 0,
|
||||
fcombo: Array<number>(2).fill(0),
|
||||
|
||||
sgid: -1,
|
||||
dgid: -1,
|
||||
|
||||
st_sp_ach: 0,
|
||||
st_sp_hdpt: 0,
|
||||
st_sp_level: 0,
|
||||
st_sp_round: 0,
|
||||
st_sp_mplay: 0,
|
||||
st_dp_ach: 0,
|
||||
st_dp_hdpt: 0,
|
||||
st_dp_level: 0,
|
||||
st_dp_round: 0,
|
||||
st_dp_mplay: 0,
|
||||
st_review: 0,
|
||||
st_help: "",
|
||||
|
||||
achi_lastweekly: 0,
|
||||
achi_pack: 0,
|
||||
achi_packcomp: 0,
|
||||
achi_rivalcrush: 0,
|
||||
achi_visitflg: 0,
|
||||
achi_weeklynum: 0,
|
||||
achi_trophy: Array<string>(20).fill("0"),
|
||||
|
||||
deller: 0,
|
||||
orb: 0,
|
||||
}
|
||||
|
||||
export const IIDX27_pcdata = {
|
||||
version: 27,
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
pc(status="0" expire="600")
|
||||
ir(beat=beat)
|
||||
//- cm(id="" folder="" compo="")
|
||||
lincle(phase="2")
|
||||
boss(phase="2")
|
||||
mr_secret(flg="-1")
|
||||
travel(flg="-1")
|
||||
|
|
@ -5,6 +5,7 @@ IIDX28pc(status="0" expire="600")
|
|||
tdj_cm
|
||||
cm(id="" filename="")
|
||||
movie_agreement(version="1")
|
||||
movie_upload(url=movie_upload)
|
||||
expert(phase="1")
|
||||
expert_random_secert(phase="1")
|
||||
boss(phase="1")
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ IIDX29pc(status="0" expire="600")
|
|||
tdj_cm
|
||||
cm(id="" filename="")
|
||||
movie_agreement(version="1")
|
||||
movie_upload(url=movie_upload)
|
||||
expert(phase="1")
|
||||
expert_random_secert(phase="1")
|
||||
boss(phase="1")
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ IIDX30pc(status="0" expire="600")
|
|||
tdj_cm
|
||||
cm(id="" filename="")
|
||||
movie_agreement(version="1")
|
||||
movie_upload(url=movie_upload)
|
||||
vip_pass_black
|
||||
deller_bonus(open="1")
|
||||
newsong_another(open="1")
|
||||
|
|
|
|||
48
iidx@asphyxia/pug/LDJ/pcget.pug
Normal file
48
iidx@asphyxia/pug/LDJ/pcget.pug
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
pc(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 help=pcdata.help gno=pcdata.gno gpos=pcdata.gpos timing=pcdata.timing sdhd=pcdata.sdhd sdtype=pcdata.sdtype notes=pcdata.notes pase=pcdata.pase sp_opt=pcdata.sp_opt dp_opt=pcdata.dp_opt dp_opt2=pcdata.dp_opt2 mode=pcdata.mode pmode=pcdata.pmode liflen=pcdata.liflen judge=pcdata.judge opstyle=pcdata.opstyle hispeed=pcdata.hispeed judgeAdj=pcdata.judgeAdj)
|
||||
secret
|
||||
flg1(__type="s64" __count="1") -1
|
||||
flg2(__type="s64" __count="1") -1
|
||||
flg3(__type="s64" __count="1") -1
|
||||
qpro_secret
|
||||
head(__type="s64" __count="2") -1 -1
|
||||
hair(__type="s64" __count="2") -1 -1
|
||||
face(__type="s64" __count="2") -1 -1
|
||||
body(__type="s64" __count="2") -1 -1
|
||||
hand(__type="s64" __count="2") -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")
|
||||
fcombo(__type="s16" __count="2") #{pcdata.fcombo[0]} #{pcdata.fcombo[1]}
|
||||
step(sp_ach=pcdata.st_sp_ach dp_ach=pcdata.st_dp_ach sp_hdpt=pcdata.st_sp_hdpt dp_hdpt=pcdata.st_dp_hdpt sp_level=pcdata.st_sp_level dp_level=pcdata.st_dp_level sp_round=pcdata.st_sp_round dp_round=pcdata.st_dp_round sp_mplay=pcdata.st_sp_mplay dp_mplay=pcdata.st_dp_mplay review=pcdata.st_review)
|
||||
//-stamp(__type="bin")
|
||||
help(__type="bin") #{pcdata.st_help}
|
||||
achievements(last_weekly=pcdata.achi_lastweekly pack=pcdata.achi_pack pack_comp=pcdata.achi_packcomp rival_crush=pcdata.achi_rivalcrush visit_flg=pcdata.achi_visitflg weekly_num=pcdata.achi_weeklynum)
|
||||
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]}
|
||||
if link5 != null
|
||||
link5(qpro=link5.qpro glass=link5.glass treasure="0" beautiful=link5.beautiful quaver=link5.quaver castle=link5.castle flip=link5.flip titans=link5.titans exusia=link5.exusia waxing=link5.waxing sampling=link5.sampling beachside=link5.beachside cuvelia=link5.cuvelia reunion=link5.reunion bad=link5.bad turii=link5.turii anisakis=link5.anisakis second=link5.second whydidyou=link5.whydidyou china=link5.china fallen=link5.fallen broken=link5.broken summer=link5.summer sakura=link5.sakura wuv=link5.wuv survival=link5.survival thunder=link5.thunder qproflg="0" glassflg="0" reflec_data="0")
|
||||
//-cafe(food pastry rainbow beastie astraia beachimp holysnow trueblue ledvsscu service is_first)
|
||||
gakuen(music_list="-1")
|
||||
if tricolettepark != null
|
||||
tricolettepark(open_music=tricolettepark.open_music boss0_damage=tricolettepark.boss0_damage boss1_damage=tricolettepark.boss1_damage boss2_damage=tricolettepark.boss2_damage boss3_damage=tricolettepark.boss3_damage boss0_stun=tricolettepark.boss0_stun boss1_stun=tricolettepark.boss1_stun boss2_stun=tricolettepark.boss2_stun boss3_stun=tricolettepark.boss3_stun magic_gauge="0" party="0" is_union="0" attack_rate="1")
|
||||
commonboss(deller=pcdata.deller orb=pcdata.orb baron="0")
|
||||
if redboss != null
|
||||
redboss(progress=redboss.progress crush=redboss.crush open=redboss.open)
|
||||
//-blueboss(level gauge item item_flg column0 column1 sector first_flg general)
|
||||
if yellowboss != null
|
||||
yellowboss(join_num="1" first_flg=yellowboss.first_flg level=yellowboss.level heroic0=yellowboss.heroic0 heroic1=yellowboss.heroic1 critical=yellowboss.critical destiny="0" last_select=yellowboss.last_select shop_message="SHOP MESSAGE" special_move="SPECIAL MOVE")
|
||||
//-shop_damage(__type="s32" __count="7")
|
||||
p_attack(__type="s32" __count="7") #{yellowboss.p_attack[0]} #{yellowboss.p_attack[1]} #{yellowboss.p_attack[2]} #{yellowboss.p_attack[3]} #{yellowboss.p_attack[4]} #{yellowboss.p_attack[5]} #{yellowboss.p_attack[6]}
|
||||
pbest_attack(__type="s32" __count="7") #{yellowboss.pbest_attack[0]} #{yellowboss.pbest_attack[1]} #{yellowboss.pbest_attack[2]} #{yellowboss.pbest_attack[3]} #{yellowboss.pbest_attack[4]} #{yellowboss.pbest_attack[5]} #{yellowboss.pbest_attack[6]}
|
||||
defeat(__type="bool" __count="7") #{yellowboss.defeat[0]} #{yellowboss.defeat[1]} #{yellowboss.defeat[2]} #{yellowboss.defeat[3]} #{yellowboss.defeat[4]} #{yellowboss.defeat[5]} #{yellowboss.defeat[6]}
|
||||
//-contribution(bno rank contribution head_parts hair_parts face_parts body_parts hand_parts myflg message name) (loop)
|
||||
//-random_qpro(head_parts hair_parts face_parts body_parts hand_parts) (loop)
|
||||
|
|
@ -61,7 +61,10 @@ export function GetVersion(info: EamuseInfo) {
|
|||
switch (info.model.substring(0, 3)) {
|
||||
case "JDZ": return 18;
|
||||
case "KDZ": return 19;
|
||||
case "LDJ": return parseInt(info.module.substring(4, 6));
|
||||
case "LDJ":
|
||||
version = parseInt(info.module.substring(4, 6));
|
||||
if (_.isNaN(version)) version = 20;
|
||||
break;
|
||||
}
|
||||
|
||||
return version;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user