少年修仙传客户端代码仓库
hch
2020-09-18 b2da6e7dd58e66fa8b0812b3fe3a93172b43bdc4
0312 开启极品寻宝
2个文件已修改
37 ■■■■ 已修改文件
System/HappyXB/HappyXBGetItemWin.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/HappyXBModel.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/HappyXBGetItemWin.cs
@@ -35,6 +35,9 @@
        [SerializeField] GameObject costManyToolObj;
        [SerializeField] Text costToolNumText;
        [SerializeField] Text costToolManyText;
        //Money_Type_1
        [SerializeField] Image costImage;
        [SerializeField] Image costImage2;
        HappyXBModel XBModel { get { return ModelCenter.Instance.GetModel<HappyXBModel>(); } }
        PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
@@ -197,6 +200,16 @@
                    xbManyMoneyText.text = manyMoney.ToString();
                }
            }
            if (XBModel.title == HappXBTitle.Best)
            {
                costImage.SetSprite("Money_Type_1");
                costImage2.SetSprite("Money_Type_1");
            }
            else if (XBModel.title == HappXBTitle.Rune)
            {
                costImage.SetSprite("Money_Type_2");
                costImage2.SetSprite("Money_Type_2");
            }
        }
        private void RefreshFreeTime(float time)
@@ -326,15 +339,16 @@
        {
            if (!XBModel.CheckIsEmptyGrid(PackType.Treasure)) return;
            int moneyType = XBModel.XBCostTypeDict[(int)XBModel.title];
            int costType = GetCostType(xbNum);
            bool isMoneyEnough = true;
            if (xbNum == 0)
            {
                isMoneyEnough = UIHelper.GetMoneyCnt(2) >= (ulong)oneMoney;
                isMoneyEnough = UIHelper.GetMoneyCnt(moneyType) >= (ulong)oneMoney;
            }
            else
            {
                isMoneyEnough = UIHelper.GetMoneyCnt(2) >= (ulong)manyMoney;
                isMoneyEnough = UIHelper.GetMoneyCnt(moneyType) >= (ulong)manyMoney;
            }
            switch(costType)
@@ -343,7 +357,7 @@
                    if (!isMoneyEnough)
                    {
                        //WindowCenter.Instance.Open<RechargeTipWin>();
                        SysNotifyMgr.Instance.ShowTip("LackMoney", 2);
                        SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
                        return;
                    }
                    break;
System/HappyXB/HappyXBModel.cs
@@ -16,6 +16,7 @@
        private Dictionary<int, List<XBGetItemConfig>> xbTypeItemDict = new Dictionary<int, List<XBGetItemConfig>>();
        private Dictionary<string, Dictionary<int, XBGetItem>> jobXBItemDict = new Dictionary<string, Dictionary<int, XBGetItem>>();
        private Dictionary<int, XBFuncSet> xbFuncSetDict = new Dictionary<int, XBFuncSet>();
        public Dictionary<int, int> XBCostTypeDict = new Dictionary<int, int>();
        public HappXBTitle title = HappXBTitle.Best;
        PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
@@ -66,7 +67,13 @@
            SetXBFuncDict(2, treasureSet12);
            SysNotifyMgr.Instance.RegisterCondition("HappyXB", SatisfyNotifyCondition);
            XBCostTypeDict.Clear();
            XBCostTypeDict[(int)HappXBTitle.Best] = int.Parse(FuncConfigConfig.Get("TreasureSet21").Numerical4);
            XBCostTypeDict[(int)HappXBTitle.Rune] = int.Parse(FuncConfigConfig.Get("TreasureSet22").Numerical4);
        }
        public void OnBeforePlayerDataInitialize()
        {
@@ -610,14 +617,15 @@
                else
                {
                    int xbOneMoney = funcSet.xbPrices[0];
                    if (UIHelper.GetMoneyCnt(2) >= (ulong)xbOneMoney)
                    int moneyType = XBCostTypeDict[xbType];
                    if (UIHelper.GetMoneyCnt(moneyType) >= (ulong)xbOneMoney)
                    {
                        SendXBQuest(xbType, 0, 0);
                    }
                    else
                    {
                        //WindowCenter.Instance.Open<RechargeTipWin>();
                        SysNotifyMgr.Instance.ShowTip("LackMoney", 2);
                        SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
                    }
                }
@@ -671,14 +679,15 @@
        public void CheckXBManyLimit(int needMoney, int xbtype, int costType)
        {
            if (UIHelper.GetMoneyCnt(2) >= (ulong)needMoney)
            int moneyType = XBCostTypeDict[xbtype];
            if (UIHelper.GetMoneyCnt(moneyType) >= (ulong)needMoney)
            {
                SendXBQuest(xbtype, 1, costType);
            }
            else
            {
                //WindowCenter.Instance.Open<RechargeTipWin>();
                SysNotifyMgr.Instance.ShowTip("LackMoney", 2);
                SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
            }
        }
        #endregion