mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-09-22 22:27:56 +03:00
Resturcture bit
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { getVersion } from "../utils";
|
||||
import { defaultProcessRawData, processDataBuilder } from "../data"
|
||||
import { CommonMusicDataField, readJSONOrXML, readXML } from "../data";
|
||||
import { defaultProcessRawData, processDataBuilder } from "../data/mdb"
|
||||
import { CommonMusicDataField, readJSONOrXML, readXML } from "../data/mdb";
|
||||
|
||||
export const playableMusic: EPR = async (info, data, send) => {
|
||||
const version = getVersion(info);
|
||||
let music: CommonMusicDataField[] = [];
|
||||
try {
|
||||
if (U.GetConfig("enable_custom_mdb")) {
|
||||
music = (await defaultProcessRawData('data/custom_mdb.xml')).music
|
||||
music = (await defaultProcessRawData('data/mdb/custom.xml')).music
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e.stack);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { getEncoreStageData } from "../utils/extrastage";
|
||||
import { getEncoreStageData } from "../data/extrastage";
|
||||
|
||||
export const shopInfoRegist: EPR = async (info, data, send) => {
|
||||
send.object({
|
||||
@@ -55,6 +55,35 @@ export const gameInfoGet: EPR = async (info, data, send) => {
|
||||
...obj,
|
||||
box_term: {
|
||||
state: K.ITEM('u8', 0)
|
||||
},
|
||||
box: {
|
||||
pack: [
|
||||
{
|
||||
state: K.ITEM("u8", 1),
|
||||
pack_kind: K.ITEM("s32", 0),
|
||||
pack_id: K.ITEM("s32", 0),
|
||||
item: [
|
||||
{
|
||||
index: K.ITEM("s32", 0),
|
||||
item_kind: K.ITEM("s32", 0),
|
||||
item_id: K.ITEM("s32", 2666),
|
||||
item_param: K.ITEM("str", ""),
|
||||
},
|
||||
{
|
||||
index: K.ITEM("s32", 1),
|
||||
item_kind: K.ITEM("s32", 0),
|
||||
item_id: K.ITEM("s32", 2624),
|
||||
item_param: K.ITEM("str", ""),
|
||||
},
|
||||
{
|
||||
index: K.ITEM("s32", 2),
|
||||
item_kind: K.ITEM("s32", 0),
|
||||
item_id: K.ITEM("s32", 2631),
|
||||
item_param: K.ITEM("str", ""),
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
} else {
|
||||
@@ -77,7 +106,7 @@ export const gameInfoGet: EPR = async (info, data, send) => {
|
||||
const extraData = getEncoreStageData(info)
|
||||
|
||||
await send.object({
|
||||
now_date: K.ITEM('u64', time),
|
||||
now_date: K.ITEM('u64', BigInt(Date.now())),
|
||||
extra: {
|
||||
extra_lv: K.ITEM('u8', extraData.level),
|
||||
extramusic: {
|
||||
|
||||
@@ -391,11 +391,13 @@ export const getPlayer: EPR = async (info, data, send) => {
|
||||
player: K.ATTR({ 'no': `${no}` }, {
|
||||
now_date: K.ITEM('u64', time),
|
||||
secretmusic: { // TODO: FIX THIS FOR STOP INFOS ON GAME END
|
||||
music: {
|
||||
musicid: K.ITEM('s32', 0),
|
||||
seq: K.ITEM('u16', 255),
|
||||
kind: K.ITEM('s32', 40),
|
||||
},
|
||||
music: _.merge(_.range(0,2800), _.range(5000, 5100)).map(mid => {
|
||||
return {
|
||||
musicid: K.ITEM('s32', mid),
|
||||
seq: K.ITEM('u16', 255),
|
||||
kind: K.ITEM('s32', 40),
|
||||
}
|
||||
}),
|
||||
},
|
||||
chara_list: {},
|
||||
title_parts: {},
|
||||
@@ -524,10 +526,28 @@ export const getPlayer: EPR = async (info, data, send) => {
|
||||
play_date_ms: K.ITEM("u64", BigInt(0))
|
||||
},
|
||||
lottery_result: {
|
||||
unlock_bit: K.ITEM("u64", BigInt(0))
|
||||
unlock_bit: K.ITEM("u64", BigInt(2305843009213693950)),
|
||||
},
|
||||
},
|
||||
lotterybox: {
|
||||
score_list: {
|
||||
data: [
|
||||
{
|
||||
term: K.ITEM("u8", 0),
|
||||
score: {
|
||||
one_day_play_cnt: K.ITEM("s32", 0),
|
||||
one_day_lottery_cnt: K.ITEM("s32", 0),
|
||||
lucky_star: K.ITEM("s32", 0),
|
||||
bear_mark: K.ITEM("s32", 0),
|
||||
play_date_ms: K.ITEM("u64", BigInt(0))
|
||||
},
|
||||
lottery_result: {
|
||||
unlock_bit: K.ITEM("u64", BigInt(2305843009213693950))
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
lotterybox: {},
|
||||
...addition,
|
||||
...playerData,
|
||||
finish: K.ITEM('bool', 1),
|
||||
|
||||
Reference in New Issue
Block a user