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

28 lines
860 B
TypeScript

import { boolean } from 'mathjs';
import { ApiCall } from 'tsrpc';
import { rankType } from '../shared/protocols/rank/PtlOpen';
import { rankInfo } from '../shared/protocols/type';
import { PublicShared } from '../shared/public/public';
// 游服 外部接口相关方法
export class NotifiCationFun {
/**格式化奖励 */
static async getFmtPrize(assets: { itemId: string, num: number }[]) {
let _prize = []
for (let index = 0; index < assets.length; index++) {
const element = assets[index];
let _tmp = { a: "item", t: element.itemId, n: element.num }
_prize.push(_tmp)
}
return _prize;
}
/**格式化排名值 */
static async getFmtRankVal(rantype: rankType, rankInfo: rankInfo): Promise<number> {
if (rantype == "jjc") return 0
return 1;
}
}