This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-01-23 02:53:23 +08:00
parent c6710e7dfa
commit 26cc480866
27 changed files with 2061 additions and 988 deletions

View File

@@ -12,8 +12,9 @@ export default class GiftData extends BaseData{
records:GiftRecord[] = [];
dayRecords:GiftDayRecord[] = [];
onInit() {
async onInit() {
await this.UpdateGiftRecord();
await this.UpdateGiftDayRecord();
}
//查询充值记录
@@ -38,6 +39,8 @@ export default class GiftData extends BaseData{
//购买礼包
async buy(giftId:number){
await API.BuyGift(giftId);
await this.UpdateGiftRecord();
await this.UpdateGiftDayRecord();
app.event.emit(GiftDataEnum.BUY);
}

View File

@@ -119,7 +119,7 @@ export default class PetEquipData extends BaseData{
//获取指定宠物等级
getForgingBenchPetLevel(petId:number = this.info.forgingPetId){
let exp = this.info.forgingPetLevels[`${petId}`] || 0;
let list = TD.TbGRoleEquipLevel.getDataList().filter(info => info.exp <= exp);
let list = TD.TbGRoleEquipLevel.getDataList().filter(info => (exp-=info.exp) >= 0);
return list[list.length - 1].id;
}

View File

@@ -14,6 +14,7 @@ export enum ResourceType{
DungeonGold = 90004, //钥匙:金币副本
DungeonForgedStones = 90005, //钥匙:锻造石副本
Q1S = 90006, //魂:一品宠物魂
GiftCoupons = 90007, //兑换券
}
//资源刷新类型