You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
AdLike2048/assets/script/manager/RankReport.ts

51 lines
1.4 KiB

import { RankDataManager } from './RankDataManager';
/** 排行榜相关 inLevel 打点 */
export class RankReport {
/** 当前段位 id */
static rankId(): number {
const id = RankDataManager.getPlayerRankId();
return id > 0 ? id : 1;
}
/** 上报 inLevel 事件 */
static report(suffix: string): void {
const text = String(suffix ?? '').trim();
if (!text) return;
gg.sdk.reportDY('inLevel', `首页-${text}`);
}
/** 进入排行榜 */
static rankEnter(): void {
this.report('排行榜进入');
}
/** 领取省榜俸禄 */
static rankSalary(): void {
this.report('排行榜领取俸禄');
}
/** 名将库穿戴 */
static mingjiangWear(heroName: string, weaponName: string): void {
const xx = String(heroName ?? '').trim();
const yy = String(weaponName ?? '').trim();
if (!xx || !yy) return;
this.report(`神将武器,${xx}装备${yy}武器`);
}
/** 广告购买每日商店商品 */
static adShopBuy(): void {
this.report('AD-道具商店购买');
}
/** 每日商店广告抽奖 */
static adLottery(): void {
this.report('AD-道具商店抽奖');
}
/** 每日商店购买 */
static shopBuy(name: string): void {
const xx = String(name ?? '').trim() || '物品';
this.report(`道具商店购买${xx}物品`);
}
}