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.
91 lines
4.3 KiB
91 lines
4.3 KiB
|
|
// import ChengHaoManager from "./ChengHaoManager";
|
|
// import InterfaceManager from "./InterfaceManager";
|
|
|
|
import TaskManager, { MainTaskIdEnum } from "../JuQingChat/TaskManager";
|
|
import BagManager from "./BagManager";
|
|
import InterfaceManager from "./InterfaceManager";
|
|
|
|
//冰雪世界
|
|
// const {ccclass, property} = cc._decorator;
|
|
|
|
// let IceWorldConfigs = [
|
|
// { buyNum:3, goodId:1501,descStr:'冰红茶',goodName:'冰红茶', priceNum:10},
|
|
// { buyNum:3, goodId:1502,descStr:'水球',goodName:'水球', priceNum:5},
|
|
// { buyNum:3, goodId:1503,descStr:'冰糖葫芦',goodName:'冰糖葫芦', priceNum:15},
|
|
// { buyNum:3, goodId:1504,descStr:'西瓜条',goodName:'西瓜条', priceNum:20},
|
|
// { buyNum:3, goodId:1505,descStr:'菠萝包',goodName:'菠萝包', priceNum:25},
|
|
// { buyNum:3, goodId:1506,descStr:'丹东大草莓',goodName:'丹东大草莓', priceNum:35},
|
|
// { buyNum:3, goodId:1507,descStr:'鲨鱼蜜蜂',goodName:'鲨鱼蜜蜂', priceNum:43},
|
|
// { buyNum:3, goodId:1508,descStr:'大鲨瓜',goodName:'大鲨瓜', priceNum:45},
|
|
// { buyNum:3, goodId:1509,descStr:'开水壶',goodName:'开水壶', priceNum:80},
|
|
// { buyNum:3, goodId:1510,descStr:'冰壶擦', goodName:'冰壶擦', priceNum:99},
|
|
// { buyNum:3, goodId:1511,descStr:'大海星', goodName:'大海星', priceNum:99},
|
|
// { buyNum:2, goodId:1512,descStr:'冰镇西瓜', goodName:'冰镇西瓜', priceNum:100},
|
|
// { buyNum:2, goodId:1513,descStr:'陈年咸鱼', goodName:'陈年咸鱼', priceNum:100},
|
|
// { buyNum:2, goodId:1514,descStr:'冰封玫瑰', goodName:'冰封玫瑰', priceNum:120},
|
|
// { buyNum:2, goodId:1515,descStr:'菜狗', goodName:'菜狗', priceNum:125},
|
|
// { buyNum:2, goodId:1516,descStr:'神灯', goodName:'神灯', priceNum:180},
|
|
// { buyNum:2, goodId:1517,descStr:'冰封冻鱼', goodName:'冰封冻鱼', priceNum:200},
|
|
// { buyNum:2, goodId:1518,descStr:'保温杯', goodName:'保温杯', priceNum:200},
|
|
// { buyNum:2, goodId:1519,descStr:'溜冰鞋', goodName:'溜冰鞋', priceNum:500},
|
|
// { buyNum:2, goodId:1520,descStr:'古董团扇', goodName:'古董团扇', priceNum:600},
|
|
// { buyNum:1, goodId:1521,descStr:'滑雪套装', goodName:'滑雪套装', priceNum:1200},
|
|
// { buyNum:1, goodId:1522,descStr:'上古宝剑', goodName:'上古宝剑', priceNum:2000},
|
|
// { buyNum:1, goodId:1523,descStr:'定海神针', goodName:'定海神针', priceNum:8000},
|
|
// { buyNum:1, goodId:1524,descStr:'绿水鬼手表', goodName:'绿水鬼手表', priceNum:12000},
|
|
|
|
// ]
|
|
|
|
export default class IceWorldManager{
|
|
static gameConfigs = [];
|
|
|
|
public static getManagerConfigs(){
|
|
return this.gameConfigs
|
|
}
|
|
|
|
|
|
public static initManager(callFunc){
|
|
let self = this
|
|
cc.loader.loadRes('Json/gameConfig/iceWorld.json', function (err, gameconfig) {
|
|
if (err) {
|
|
console.log(err);
|
|
return;
|
|
}
|
|
self.gameConfigs = gameconfig.json;
|
|
// console.log("游戏配置加载成功", self.gameConfigs);
|
|
callFunc()
|
|
});
|
|
}
|
|
|
|
public static getCurGoodList(){
|
|
//将任务/剧情道具替换掉最后的商品
|
|
let daoYeList = InterfaceManager.getDaoyeList()
|
|
let replaceGoodsTab = []
|
|
for(let i=0;i<daoYeList.length;i++){
|
|
let goodId = daoYeList[i].goodId
|
|
if(daoYeList[i].gameType == '冰雪乐园' && BagManager.getBagGoodNums(goodId) <= 0){
|
|
replaceGoodsTab.push(BagManager.getJuQingGoodConfig(goodId))
|
|
}
|
|
}
|
|
let mainTaskInfo:any = TaskManager.getCurUnLockMainTaskInfo()
|
|
let mainId = mainTaskInfo.Id
|
|
// if(mainId == MainTaskIdEnum.MainTask_516){
|
|
// let goodInfo = BagManager.getJuQingGoodConfig(1712)
|
|
// replaceGoodsTab.push(goodInfo)
|
|
// }else if(mainId == MainTaskIdEnum.MainTask_547){
|
|
// let goodInfo = BagManager.getJuQingGoodConfig(2704)
|
|
// replaceGoodsTab.push(goodInfo)
|
|
// }
|
|
|
|
|
|
let useConfig = []
|
|
for(let i=0;i<this.gameConfigs.length-replaceGoodsTab.length;i++){
|
|
useConfig.push(this.gameConfigs[i])
|
|
}
|
|
for(let j=0;j<replaceGoodsTab.length;j++){
|
|
useConfig.push(replaceGoodsTab[j])
|
|
}
|
|
return useConfig
|
|
}
|
|
} |