娃娃机改为掉落组

This commit is contained in:
dy 2023-12-27 16:41:22 +08:00
parent 0df09e0f9e
commit 7c83a8bbe8
4 changed files with 6 additions and 4 deletions

View File

@ -20,7 +20,7 @@ export default async function (call: ApiCall<ReqDMRec, ResDMRec>) {
}
if (call.req.id) {
let prize = PublicShared.randomDropGroup(call.req.id, 1, _hd.data.game);
let prize = PublicShared.randomDropGroup('1', 1, {'1': _hd.data.game});
await PlayerFun.sendPrize(call, prize);
}

View File

@ -2,7 +2,7 @@
*
*/
export type ReqDMRec = {
id: string | null
id: 1 | 0
}
export type ResDMRec = {}

View File

@ -11410,14 +11410,15 @@ export const serviceProto: ServiceProto<ServiceType> = {
{
"id": 0,
"type": {
"type": "String"
"type": "Literal",
"literal": 1
}
},
{
"id": 1,
"type": {
"type": "Literal",
"literal": null
"literal": 0
}
}
]

View File

@ -73,6 +73,7 @@ export class PublicShared {
*
* @param id id
* @param num
* @param conf
*/
static randomDropGroup(id: string | number, num = 1, conf = G.gc.diaoluo): prizeType[] {
let prize = [];