mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
qqqq
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -14,6 +14,7 @@ export enum ResourceType{
|
||||
DungeonGold = 90004, //钥匙:金币副本
|
||||
DungeonForgedStones = 90005, //钥匙:锻造石副本
|
||||
Q1S = 90006, //魂:一品宠物魂
|
||||
GiftCoupons = 90007, //兑换券
|
||||
}
|
||||
|
||||
//资源刷新类型
|
||||
|
Reference in New Issue
Block a user