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;
    }


}