mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-13 02:26:07 +00:00
提交开宝箱
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { app } from "../App";
|
||||
import { API, PlayerInfoOV, PlayerPetOV } from "../consts/API";
|
||||
import BaseData from "./BaseData";
|
||||
import { GBattleDataEnum } from "./GBattleData";
|
||||
import GOnHookData from "./GOnHookData";
|
||||
import PlayerTacticalData from "./PlayerTacticalData";
|
||||
import { ResourceUpdateType } from "./ResourceData";
|
||||
|
||||
@@ -39,10 +41,17 @@ export default class PlayerPetData extends BaseData{
|
||||
return this.datas.filter(data => PlayerTacticalData.getIns().getTacticalInfo().indexOf(data.petId) < 0);
|
||||
}
|
||||
|
||||
//获取上阵的宠物
|
||||
getTacticalData():PlayerPetOV[]{
|
||||
return this.datas.filter(data => PlayerTacticalData.getIns().getTacticalInfo().indexOf(data.petId) >= 0);
|
||||
}
|
||||
|
||||
//更新玩家宠物
|
||||
async UpdatePlayerPet(){
|
||||
//获取全部宠物
|
||||
this.datas = await API.GetPlayerPets();
|
||||
|
||||
app.event.emit(GBattleDataEnum.UPDARE_ATTRIBUTE); //刷新属性
|
||||
}
|
||||
|
||||
//选择宠物
|
||||
|
Reference in New Issue
Block a user