nov 2024 events etc

This commit is contained in:
vvo
2024-11-07 09:59:38 +08:00
parent 7fe1b0536e
commit c94b6cb36f
7 changed files with 87 additions and 16 deletions
+12 -1
View File
@@ -4,7 +4,7 @@ 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 { ProfileWorld, CustomizeWorld } from "./models/ddrworld";
import { SONGS_WORLD, SONGS_OVERRIDE_WORLD, LEAGUE_WORLD } from "./data/world"
export function register() {
@@ -210,6 +210,17 @@ export function register() {
});
});
R.WebUIEvent("playerCustomize", async ({ customize, refid, selected }) => {
const catPat = {'appeal': [1, 1]}
if(selected === 0) await DB.Remove<CustomizeWorld>(refid, { collection: "customize3", category: catPat[customize][0], pattern: catPat[customize][1] })
else await DB.Upsert<CustomizeWorld>(refid, { collection: "customize3", category: catPat[customize][0] }, {
$set: {
key: selected,
pattern: catPat[customize][1]
}
});
});
R.WebUIEvent("getMDB", async (data: {}, send: WebUISend) => {
let mdbData = []
let mdbLimName = U.GetConfig('mdb_limited')