HJ_Server/src/api_s2c/zhanqianbushu/ApiSelect.ts
DESKTOP-15R5JU0\legu 97e070ea81 init
2023-11-17 12:02:12 +08:00

12 lines
455 B
TypeScript

import { ApiCall } from "tsrpc";
import { PlayerFun } from '../../public/player';
import { ReqSelect, ResSelect } from "../../shared/protocols/zhanqianbushu/PtlSelect";
export default async function (call: ApiCall<ReqSelect, ResSelect>) {
let config = G.gc.fightPlan[call.req.type];
if (!config && call.req.type != '') return call.error('', { code: -1 });
await PlayerFun.addAttr(call, { selectMatrix: call.req.type });
call.succ({});
}