少年修仙传客户端代码仓库
hch
2024-12-19 a39a4d876bb4b688b7377a0022a8b38e7f311f4d
System/HappyXB/HappyXBGetItemWin.cs
@@ -350,56 +350,56 @@
        public void SendXBQuest(int xbNum)
        {
            if (!XBModel.CheckIsEmptyGrid(PackType.Treasure)) return;
            //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(moneyType) >= (ulong)oneMoney;
            }
            else
            {
                isMoneyEnough = UIHelper.GetMoneyCnt(moneyType) >= (ulong)manyMoney;
            }
            //int moneyType = XBModel.XBCostTypeDict[(int)XBModel.title];
            //int costType = GetCostType(xbNum);
            //bool isMoneyEnough = true;
            //if (xbNum == 0)
            //{
            //    isMoneyEnough = UIHelper.GetMoneyCnt(moneyType) >= (ulong)oneMoney;
            //}
            //else
            //{
            //    isMoneyEnough = UIHelper.GetMoneyCnt(moneyType) >= (ulong)manyMoney;
            //}
            switch(costType)
            {
                case 0:
                    if (!isMoneyEnough)
                    {
                        //WindowCenter.Instance.Open<RechargeTipWin>();
                        SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
                        return;
                    }
                    break;
                case 1:
                case 2:
            //switch(costType)
            //{
            //    case 0:
            //        if (!isMoneyEnough)
            //        {
            //            //WindowCenter.Instance.Open<RechargeTipWin>();
            //            SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
            //            return;
            //        }
            //        break;
            //    case 1:
            //    case 2:
                    break;
            }
            //        break;
            //}
            switch (XBModel.title)
            {
                case HappXBTitle.Best:
                    XBModel.SendXBQuest(1, xbNum, costType);
                    break;
                case HappXBTitle.Rune:
                    XBModel.SendXBQuest(2, xbNum, costType);
                    break;
                case HappXBTitle.Gubao1:
                case HappXBTitle.Gubao2:
                case HappXBTitle.Gubao3:
                case HappXBTitle.Gubao4:
                    int treasureID = TreasurePavilionModel.Instance.xbIDArr[TreasurePavilionModel.Instance.xbIndex];
                    int treasureType = XBGetItemConfig.Get(treasureID).TreasureType;
                    XBModel.SendXBQuest(treasureType, xbNum, costType);
                    break;
                case HappXBTitle.GatherSoul:
                    XBModel.SendXBQuest(GatheringSoulModel.xbType, xbNum, costType);
                    break;
            }
            //switch (XBModel.title)
            //{
            //    case HappXBTitle.Best:
            //        XBModel.SendXBQuest(1, xbNum, costType);
            //        break;
            //    case HappXBTitle.Rune:
            //        XBModel.SendXBQuest(2, xbNum, costType);
            //        break;
            //    case HappXBTitle.Gubao1:
            //    case HappXBTitle.Gubao2:
            //    case HappXBTitle.Gubao3:
            //    case HappXBTitle.Gubao4:
            //        int treasureID = TreasurePavilionModel.Instance.xbIDArr[TreasurePavilionModel.Instance.xbIndex];
            //        int treasureType = XBGetItemConfig.Get(treasureID).TreasureType;
            //        XBModel.SendXBQuest(treasureType, xbNum, costType);
            //        break;
            //    case HappXBTitle.GatherSoul:
            //        XBModel.SendXBQuest(GatheringSoulModel.xbType, xbNum, costType);
            //        break;
            //}
        }
        private void OnStartXB(int oneOrMany)