예제 #1
0
    void Init()
    {
        ComLoading.Close();
        if (_NewActivityData != null)
        {
            m_Title.SafeText(_NewActivityData.activityName);
            StringBuilder builder = new StringBuilder();
            builder.Append(Core.Data.stringManager.getString(25177));
            builder.Append(_NewActivityData.activityDesc);
            m_DecLab.SafeText(builder.ToString());

            BoxCollider _box = m_DecLab.GetComponent <BoxCollider>();
            _box.size   = new Vector3(m_DecLab.width, (float)m_DecLab.height, _box.size.z);
            _box.center = new Vector3((float)m_DecLab.width / 2, (float)-m_DecLab.height / 2, _box.center.z);


            CreatCell(_NewActivityData.items);
            SetTimer(_NewActivityData.activityStartTime, _NewActivityData.activityEndTime);
            m_Grid.Reposition();
            m_ScrollBar.value  = 0f;
            m_ScrollBar2.value = 0f;

            m_ScrollView.disableDragIfFits = !(m_DecLab.height > 28);
        }
    }
예제 #2
0
    void getDateCompleted(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response != null && response.status != BaseResponse.ERROR)
        {
            GetVipLevelRewardResponse res = response as GetVipLevelRewardResponse;
            GetRewardSucUI.OpenUI(res.data.p, Core.Data.stringManager.getString(5047));
            if (!UIDragonMallMgr.GetInstance().m_VipStatusDic.ContainsKey(m_Id))
            {
                UIDragonMallMgr.GetInstance().m_VipStatusDic.Add(m_Id, null);
                m_GetReward.isEnabled = false;
            }


            if (UIDragonMallMgr.GetInstance().GetIsVipGift == true)
            {
                Core.Data.ActivityManager.SetActState(ActivityManager.vipLibaoType, "1");
            }
            else
            {
                Core.Data.ActivityManager.SetActState(ActivityManager.vipLibaoType, "2");
            }


            //  领取vip成功
            if (UIWXLActivityMainController.Instance != null)
            {
                UIWXLActivityMainController.Instance.Refresh();
            }
        }
        else if (response != null && response.status == BaseResponse.ERROR)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
    }
예제 #3
0
    public void BackRefreshSecretShop(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response != null && response.status != BaseResponse.ERROR)
        {
            RefreshSecretShopResponse resp = response as RefreshSecretShopResponse;
            if (resp.data != null)
            {
                SecretShopResponse tResp = new SecretShopResponse();
                tResp.data         = resp.data;
                TotalJifen         = resp.data.jifen;
                _purchaseSoulStone = resp.data.purchaseSoulMoney;
                if (resp.data.refreshMoney != null && resp.data.refreshMoney.Length == 2)
                {
                    _RefreshMoneyType = resp.data.refreshMoney[0];
                    _RefreshMoney     = resp.data.refreshMoney[1];
                    if (_RefreshMoneyType == 0)
                    {
                        Core.Data.playerManager.RTData.curStone -= _RefreshMoney;
                    }
                    else if (_RefreshMoneyType == 1)
                    {
                        Core.Data.playerManager.RTData.curCoin -= _RefreshMoney;
                    }
                }

                _UISecretShop.OnShow(tResp, _ShopType);
            }
        }
        else if (response != null && response.status == BaseResponse.ERROR)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
    }
    //Exception Happened
    void HttpDefaultHandler(BaseTaskAbstract task)
    {
        if (task != null)
        {
            ComLoading.Close();
            //如果是新手引导阶段则不应该弹出错误的信息,直接吞掉
            if (Core.Data.guideManger.isGuiding)
            {
                return;
            }

            HttpTask ht = task as HttpTask;
            if (ht != null)
            {
                string content = string.Empty, title = string.Empty;
                                #if DEBUG
                content = ht.takeErrorOver;
                                #else
                content = Core.Data.stringManager.getString(17);
                                #endif
                title = Core.Data.stringManager.getString(5030);

                UIInformation.GetInstance().SetInformation(content, title, task.DispatchToRealHandler);
            }
        }
    }
예제 #5
0
 public void getFriendListRequestCompleted(BaseHttpRequest request, BaseResponse response)
 {
     if (response != null && response.status != BaseResponse.ERROR)
     {
         //            GetFriendListResponse getFriendListResponse = response as GetFriendListResponse;
         //            if(getFriendListResponse.data != null)
         //            {
         //                GetOtherUserListInfo getFriendListInfo = getFriendListResponse.data;
         //                this.friendList.AddRange(getFriendListInfo.friends);
         //                this.friendListCount = getFriendListInfo.count;
         //                this.friendListPageCount = this.getPageCount(this.friendListCount);
         //                if(getFriendListRequestCompletedDelegate != null)
         //                {
         //                    getFriendListRequestCompletedDelegate();
         //                }
         //            }
         //
         //
         //            if(!UIMainFriend.Instance.gameObject.activeSelf)
         //            {
         //                UIMainFriend.Instance.gameObject.SetActive(true);
         //            }
     }
     // 测试用 start
     if (!UIMainFriend.Instance.gameObject.activeSelf)
     {
         UIMainFriend.Instance.gameObject.SetActive(true);
     }
     // end
     ComLoading.Close();
 }
예제 #6
0
    void SaoDangSucess(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response.status != BaseResponse.ERROR)
        {
            SaoDangResponse r = response as SaoDangResponse;

            HttpRequest  htp   = request as HttpRequest;
            SaoDangParam param = htp.ParamMem as SaoDangParam;
            if (r != null && r.data != null)
            {
                BattleSequence[]      bsquesce  = r.data.sweepList;
                List <BattleSequence> list_data = new List <BattleSequence> ();
                foreach (BattleSequence data in bsquesce)
                {
                    list_data.Add(data);
                }
                JCPVESaoDangPanel.OpenUI(list_data);

                //同步通过次数
                NewFloor floor = Core.Data.newDungeonsManager.GetFloorData(param.doorId);
                floor.passTimes = r.data.passCount;
                RefreshPanel(floor);
            }
        }
        else
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
    }
예제 #7
0
    public void learnAoYiCompleted(BaseHttpRequest request, BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            LearnAoYiResponse learnAoYiResponse = response as LearnAoYiResponse;
            if (learnAoYiResponse.data != null)
            {
                AoYi aoyi = new AoYi(learnAoYiResponse.data, this);
                this.AoYiDic[aoyi.ID] = aoyi;
                if (learnAoYiCompletedDelegate != null)
                {
                    learnAoYiCompletedDelegate(aoyi);
                }
                // if(aoyi.AoYiDataConfig.dragonType == 1){
                if (aoyi != null)
                {
                    Core.Data.dragonManager.isCheckedCallDragon [aoyi.AoYiDataConfig.dragonType - 1] = false;
                }

                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(5155));
            }
        }
        else if (response != null)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
            Core.Data.dragonManager.learnAoYiCompletedDelegate = null;
        }
        ComLoading.Close();
    }
예제 #8
0
    //服务器任务列表返回
    void OnListRequestFinished(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();

        if (Core.Data.guideManger.isGuiding)
        {
            Core.Data.guideManger.AutoRUN();
        }

        if (response.status != BaseResponse.ERROR)
        {
            TaskListResponse res = response as TaskListResponse;
            foreach (TaskDataResponse data in res.data.tasks)
            {
                TaskData tdata = tm[data.id];
                if (tdata != null)
                {
                    tdata.curProgress = data.progress;
                    tdata.Progress    = data.condition;
                    if (tdata.Type == 0)
                    {
                        DayTaskList.Add(tdata);
                    }
                    else if (tdata.Type == 1)
                    {
                        MainTaskList.Add(tdata);
                    }
                }
                else
                {
                    Debug.LogError("Not find Task[" + data.id.ToString() + "]");
                }
            }
        }

        //如果某种任务完成,优先显示那一类
        if (isHaveCompleteTask(ref MainTaskList))
        {
            Core.Data.taskManager.LastSelectedType = 1;
        }
        if (isHaveCompleteTask(ref DayTaskList))
        {
            Core.Data.taskManager.LastSelectedType = 0;
        }

        if (curTaskType == UITaskType.None)
        {
            curTaskType = (UITaskType)Core.Data.taskManager.LastSelectedType;
        }

        //每日任务列表可能为空,但主线任务列表永远不会为空

        if (DayTaskList.Count == 0)
        {
            _view.SetBtnBright(0, 1);
            curTaskType = UITaskType.MainLine;
        }

        RefreshTaskList();
    }
예제 #9
0
    void SendOpenBuilding(BaseHttpRequest request, BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            BuildOperateResponse buildResponse = response as BuildOperateResponse;
            if (buildResponse.data != null)
            {
//				Debug.Log ("   id resp =  " +buildResponse.data.id  + " data  id = " + m_data.buildingId  + "   pidddd  = " +  m_data.buildingPid);
                if (buildResponse.data.id == m_data.buildingPid)
                {
                    if (buildResponse.data.dur > 0)
                    {
                        openBtn.isEnabled = false;
                        m_data.canOpen    = false;
                        Building data = Core.Data.BuildingManager.GetBuildFromBagByNum(buildResponse.data.num);
                        UISourceBuilding.mInstance.SetData(data);

                        BuildScene.mInstance.BuildOpenUpdate(data.RTData.id);
//						this.Refresh ();
                    }
                }
            }
        }
        else if (response.status == BaseResponse.ERROR)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
            openBtn.isEnabled = true;
            m_data.canOpen    = true;
        }
        ComLoading.Close();
    }
예제 #10
0
    void BattleResponseFUC(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response != null)
        {
            if (response.status != BaseResponse.ERROR)
            {
                BattleResponse r = response as BattleResponse;
                if (r != null && r.data != null && r.data.reward != null)
                {
                    Core.Data.playerManager.RTData.curVipLevel = r.data.sync.vip;
                }

                r.data.battleData.rsty             = null;
                r.data.battleData.rsmg             = null;
                Core.Data.temper.warBattle         = r.data;
                Core.Data.temper.currentBattleType = TemporyData.BattleType.FightWithFulisa;
                //跳转至Ban 的场景
                JumpToBattleView();
            }
            else
            {
                RED.LogError(response.errorCode.ToString());
            }
        }
    }
예제 #11
0
    void testHttpResp_UI(BaseHttpRequest request, BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            res = response as PayCountResponse;
            Core.Data.rechargeDataMgr.payData = res.data;
//			CheckFirstRecharge();
            if (UIFirstRechargePanel.GetInstance() != null)
            {
                UIFirstRechargePanel.GetInstance().ShowBtnlabel();
            }
            if (IsFirstRequest)
            {
                IsFirstRequest = false;
                return;
            }
            else
            {
                OpenRechargeUI();
            }
//			if(GetGiftPanelController.Instance != null)
//			{
//				GetGiftPanelController.Instance.BtnBack();
//			}
        }
        else if (response != null && response.status == BaseResponse.ERROR)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
//			_RechageStatus = 0;
        }
        ComLoading.Close();
    }
    void testHttpResp_UI(BaseHttpRequest req, BaseResponse response)
    {
        ComLoading.Close();

        /*只能主线程访问
         * */
        Core.Data.EquipManager.InlayGemToEquipment(req, response);
        if (response.status != BaseResponse.ERROR)
        {
            HttpRequest         htReq     = req as HttpRequest;
            Send_GemInLaySystem sendparam = htReq.ParamMem as Send_GemInLaySystem;
            if (sendparam.beUp == 0)
            {
                /*摘除宝石成功
                 * */
                int SelectedSoltIndex = System.Convert.ToInt32(LastSelectedHoleButtonName.Substring(LastSelectedHoleButtonName.Length - 1));
                view.SetHoleGem(SelectedSoltIndex, null);

                //view.ShowEquipEffect(SelectedEqudata,Core.Data.EquipManager.isHaveEffect(SelectedEqudata));
                view.ShowEquipmentInfo(SelectedEqudata);
            }
            else if (sendparam.beUp == 1)
            {
                /*镶嵌宝石成功
                 * */
                int SelectedSoltIndex = System.Convert.ToInt32(LastSelectedHoleButtonName.Substring(LastSelectedHoleButtonName.Length - 1));
                view.SetHoleGem(SelectedSoltIndex, SelectedGemdata.configData.anime2D);

                //view.ShowEquipEffect(SelectedEqudata,Core.Data.EquipManager.isHaveEffect(SelectedEqudata));
                view.ShowEquipmentInfo(SelectedEqudata);
            }
        }
    }
예제 #13
0
    void SendMsg()
    {
        ComLoading.Open();
        HttpTask task = new HttpTask(ThreadType.MainThread, TaskResponse.Default_Response);

        task.AppendCommonParam(RequestType.GET_COMBO, new GetComboParam(Core.Data.playerManager.PlayerID));

        task.ErrorOccured   = (BaseHttpRequest b, string error) => { ConsoleEx.DebugLog("______Error =" + error.ToString());  ComLoading.Close(); };
        task.afterCompleted = (BaseHttpRequest request, BaseResponse response) =>
        {
            ComLoading.Close();
            if (response.status != BaseResponse.ERROR)
            {
                isFristOpenClient = false;
                ComboResponse resp = response as ComboResponse;

                RTPlayer player = Core.Data.playerManager.RTData;

                player.TotalCombo      = resp.data.combo.total;
                player.TotalGambleWin  = resp.data.gamble.win;
                player.TotalGambleLose = resp.data.gamble.lose;

                UIOptionController.CreatOptionCtrl(DBUIController.mDBUIInstance._TopRoot);
            }
            else
            {
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
            }
        };

        task.DispatchToRealHandler();
    }
예제 #14
0
    //消息正方返回
    void activityAward_UI(BaseHttpRequest request, BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            GetAwardActivity re = response as GetAwardActivity;
            if (re.data.status.id == 0)
            {
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(90016));
            }
            else
            {
                ActivityManager.activityZPID = re.data.status.id;
                setActivityType(re.data.status.id);
                StartCoroutine("startPosition");

                startBtn.gameObject.SetActive(false);
                sp.rotationsPerSecond = new Vector3(0, 0, -1.25f);
            }
        }
        else if (response != null && response.status == BaseResponse.ERROR)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(90016));
        }

        ComLoading.Close();
    }
예제 #15
0
    public void HttpRespGemExChange(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response.status != BaseResponse.ERROR)
        {
            HttpRequest rq = request as HttpRequest;
            if (rq.Type == RequestType.GEM_EXCHANGE)
            {
                GemExChangeResponse resp = response as GemExChangeResponse;

                GemData tempdata = Core.Data.gemsManager.getGemData(resp.data.pid);
                if (tempdata != null)
                //if(Core.Data.gemsManager.gemPriceConfig.ContainsKey(resp.data.pid))
                {
                    int price = tempdata.price;
                    Debug.Log("Price:" + price);
                    GemDebrisCountInBag -= price;
                    //view.SetGemDebrisNum(GemDebrisCountInBag);
                }
                GetGemSucUI.OpenUI(Core.Data.gemsManager.getGems(resp.data.ppid).configData, view.TEXT(9014));
            }
        }
        else
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
    }
예제 #16
0
    //取得转盘状态Suc
    void GetRouletteStateSuc(BaseHttpRequest req, BaseResponse resp)
    {
        ComLoading.Close();
        GetAwardActivity re = resp as GetAwardActivity;

        ActivityManager.activityZPID = re.data.status.id;

//		if (re.data.status.id == 0)
//		{
//			UIInformation.GetInstance ().SetInformation (Core.Data.stringManager.getString (5206), Core.Data.stringManager.getString (5030), OpenZhuanPanUI);
//		}
//		else
//		{
//			if(ActivityManager.activityZPID != 4)
//			{
//				SQYAlertViewMove.CreateAlertViewMove (Core.Data.stringManager.getString(5207));
//				return;
//			}
//			else
//			{
        if (!Core.Data.gpsWarManager.SyncGPSSuc)
        {
            //启动GPS服务
            m_gpsLocation.StartCoroutine(m_gpsLocation.StartGPS());
            type = 1;
        }
        else
        {
            SendCreateRoomRQ();
        }

        //}
        //}
    }
    void GetActivityLimitTimeReponse(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response != null && response.status != BaseResponse.ERROR)
        {
            GetActivityLimittimeRewardResponse res = response as GetActivityLimittimeRewardResponse;
            if (res != null)
            {
                GetRewardSucUI.OpenUI(res.data.p, Core.Data.stringManager.getString(5047));
                if (res.data != null && res.data.item != null)
                {
                    m_Item = res.data.item;
                    StringBuilder builder = new StringBuilder();
                    builder.Append(res.data.item.completeRate.ToString());
                    builder.Append("/");
                    builder.Append(res.data.item.completeWhere);
                    if (m_Title2 != null)
                    {
                        m_Title2.SafeText(builder.ToString());
                    }
                    SetBtnStatus(res.data.item.status);
                    DBUIController.mDBUIInstance.RefreshUserInfo();

                    Core.Data.HolidayActivityManager.SetNewActivityResponseData(activityItemIndex, res.data.item);
                }
            }
        }
        if (response != null && response.status == BaseResponse.ERROR)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
    }
예제 #18
0
    void HttpResp_Error(BaseHttpRequest request, string error)
    {
        ConsoleEx.DebugLog("---- Http Resp - Error has ocurred." + error);
        ComLoading.Close();
        if (request != null && request is HttpRequest)
        {
            HttpRequest myRequest = (HttpRequest)request;
            switch (myRequest.Type)
            {
            case RequestType.GET_PARTITION_SERVER:
            case RequestType.THIRD_GET_SERVER:
//				SQYAlertViewMove.CreateAlertViewMove ("Network is broken down.", gameObject);
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(17), gameObject);
                break;

            case RequestType.LOGIN_GAME:
                if (!Content.activeSelf)
                {
                    Content.SetActive(true);
                }
                break;
            }
        }

        if (request != null && request is ThirdPartyHttpRequest)
        {
            step = LoginStep.Download_ERROR;
        }
    }
예제 #19
0
    void testHttpResp_UI(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response.status != BaseResponse.ERROR)
        {
            HttpRequest       req   = request as HttpRequest;
            SkillUpgradeParam param = req.ParamMem as SkillUpgradeParam;

            m_txtCardCnt.text = Core.Data.itemManager.GetBagItemCount(ItemManager.SKILL_CARD).ToString();
            m_txtCoinCnt.text = Core.Data.playerManager.RTData.curCoin.ToString();

            List <Skill> list = m_monster.getSkill;
            for (int i = 0; i < list.Count; i++)
            {
                if (list [i].sdConfig.ID == param.skillNum)
                {
                    m_dicSkillCells [param.skillNum].InitUI(list [i], i / 2);

                    List <string> upParamList = list[i].skillLvConfig.GetUpParam(list[i].level);
                    m_dicSkillCells [param.skillNum].ShowUpParam(upParamList);
                    break;
                }
            }
            DBUIController.mDBUIInstance.RefreshUserInfoWithoutShow();
        }
        else
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }
    }
예제 #20
0
 void AfterComplete(BaseHttpRequest request, BaseResponse response)
 {
     if (response != null && response.status != BaseResponse.ERROR)
     {
         HttpRequest httprequest = request as HttpRequest;
         if (httprequest.Act == HttpRequestFactory.ACTION_GET_CHALLENGE_RANK)
         {
             GetChallengeRankResponse res = response as GetChallengeRankResponse;
             if (res != null)
             {
                 CreateRobCell(res);
                 _Grid.Reposition();
             }
         }
         else if (httprequest.Act == HttpRequestFactory.ACTION_GET_TIANXIADIYI_RANK)
         {
             GetChallengeRankResponse res = response as GetChallengeRankResponse;
             if (res != null)
             {
                 TianXiaCell(res);
                 _Grid.Reposition();
             }
         }
         ComLoading.Close();
     }
     else if (response != null && response.status == BaseResponse.ERROR)
     {
         SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
     }
 }
예제 #21
0
    public void buyAoYiSlotCompleted(BaseHttpRequest request, BaseResponse response)
    {
        if (response != null && response.status != BaseResponse.ERROR)
        {
            BuyAoYiSlotResponse buyAoYiSlotResponse = response as BuyAoYiSlotResponse;
            if (buyAoYiSlotResponse.data != null)
            {
                Core.Data.playerManager.RTData.curCoin  += buyAoYiSlotResponse.data.coin;
                Core.Data.playerManager.RTData.curStone += buyAoYiSlotResponse.data.stone;
                //talking data add by wxl
                if (buyAoYiSlotResponse.data.stone != 0)
                {
                    Core.Data.ActivityManager.OnPurchaseVirtualCurrency(ActivityManager.DragonSlotType, 1, buyAoYiSlotResponse.data.stone);
                }
                if (buyAoYiSlotCompletedDelegate != null)
                {
                    buyAoYiSlotCompletedDelegate(buyAoYiSlotResponse.data.slot);
                }
            }
        }
        else if (response != null)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
        }

        ComLoading.Close();
    }
예제 #22
0
    void ShowRewards(int srcID, ItemOfReward[] rewards)
    {
        if (rewards != null)
        {
            if (rewards.Length == 0)
            {
                RED.LogWarning("get nothing!");
                return;
            }
            if (srcID == 110026)
            {
                ComLoading.Close();
                CradSystemFx.GetInstance().SetCardPanel(rewards, 3150, true, true, false);
                UIMiniPlayerController.Instance.SetActive(false);
            }
            else if ((srcID < 110026 && srcID >= 110024) || srcID == 110092)
            {
                CradSystemFx.GetInstance().SetCardSinglePanel(rewards, 350, true, true, false);
                UIMiniPlayerController.Instance.SetActive(false);
            }
            else
            {
                if (UIDragonMallMgr.GetInstance().CheckOpenWindowList.Contains(srcID))
                {
                    SQYAlertViewMove.CreateAlertViewMove(string.Format(Core.Data.stringManager.getString(5214), Core.Data.itemManager.getItemData(srcID).name, ""));
                }
                else
                {
                    GetRewardSucUI.OpenUI(rewards, Core.Data.stringManager.getString(5097));
                }

                DBUIController.mDBUIInstance.RefreshUserInfo();
            }
        }
    }
예제 #23
0
    void testHttpResp_UI(BaseHttpRequest request, BaseResponse reponse)
    {
        ComLoading.Close();
        if (reponse.status != BaseResponse.ERROR)
        {
            HttpRequest req = request as HttpRequest;
            switch (req.Type)
            {
            case RequestType.BUILD_GET:
            {
                BuildOperateResponse resp = reponse as BuildOperateResponse;
                int[] getMoney            = new int[2] {
                    resp.data.coin, resp.data.stone
                };
                GetProductionSuc();
                this.ShowEffect(getMoney);
                break;
            }
//				case RequestType.BUILD_CREATED:
//				{
//					BuildCreateSuc();
//					break;
//				}
            }
        }
        else
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(reponse.errorCode));
        }
    }
예제 #24
0
    public void testHttpResp_UI(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response != null && response.status != BaseResponse.ERROR)
        {
            BuyItemSuc(request, response);

            if (_type == ShopItemType.Active)
            {
                if (mActivedata != null)
                {
                    mActivedata.yetBuyCount += 1;
                    SetActiveItemBuyNum(uiLab);
                }

                CheckCanBuy(mActivedata.yetBuyCount, mActivedata.buyCount);
            }
        }
        else if (response != null && response.status == BaseResponse.ERROR)
        {
            if (response.errorCode == 30000)
            {
                SQYAlertViewMove.CreateAlertViewMove(string.Format(Core.Data.stringManager.getNetworkErrorString(response.errorCode), Core.Data.itemManager.GetBagItemCount(110084)));
            }
            else
            {
                SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getNetworkErrorString(response.errorCode));
            }
        }
    }
예제 #25
0
    public void Fight(int floorID, int[] array = null, int teamID = 1)
    {
        ComLoading.Open();

        //赋值floordata
        Core.Data.newDungeonsManager.FloorList.TryGetValue(floorID, out floordata);

        //added by zhangqiang ao rember level
        if (Core.Data.playerManager.RTData.curTeam.validateMember == 0)
        {
            SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(5031));
            ComLoading.Close();
            return;
        }

        Core.Data.temper.mPreLevel = Core.Data.playerManager.RTData.curLevel;
        Core.Data.temper.mPreVipLv = Core.Data.playerManager.RTData.curVipLevel;

        HttpTask task = new HttpTask(ThreadType.MainThread, TaskResponse.Default_Response);

        //int flag =0 ;
        //检测该关卡是否是这一章节的最后一个关卡
        //bool isLastFloorOfChapter = false;

        task.AppendCommonParam(RequestType.NEW_PVE_BOSSBATTLE, new ClientBattleParam(Core.Data.playerManager.PlayerID, floorID, 0, 0, 0, 0, Core.Data.guideManger.isGuiding ? 1 : 0, array, teamID));

        task.ErrorOccured   += HttpResp_Error;
        task.afterCompleted += BattleResponseFUC;
        task.DispatchToRealHandler();
    }
예제 #26
0
    void SmallBattleResponse(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        FBReword = null;
        if (response != null && response.status != BaseResponse.ERROR)
        {
            BattleResponse r = response as BattleResponse;
            FBReword = r.data;
            cityFloorManager.ShowReward(FBReword, GoNextFloor);
            //如果是新手引导点击的
            if (IsGuideClick)
            {
                Core.Data.guideManger.DelayAutoRun(1.8f);
            }
        }
        else
        {
            isCanClick = true;
            if (response.errorCode == 4002)
            {
                JCRestoreEnergyMsg.OpenUI(110015, 110016);
            }
            else
            {
                ErrorDeal(response.errorCode);
            }
        }

        //UIMiniPlayerController.Instance.freshPlayerInfoView ();
        //DBUIController.mDBUIInstance.RefreshUserInfo ();
    }
예제 #27
0
    void DoFail()
    {
        ComLoading.Close();
        m_nZhufu++;
        if (m_nZhufu > 3)
        {
            m_nZhufu            = 0;
            m_sliderZhufu.alpha = 0;
        }
        else
        {
            m_sliderZhufu.alpha = 1;
        }
        SQYAlertViewMove.CreateAlertViewMove(Core.Data.stringManager.getString(5101));



        m_sliderZhufu.value = m_nZhufu / 3f;
        m_txtZhufu.text     = m_nZhufu.ToString() + "/3";



        isAtkPress       = false;
        i_AtkCounting    = 0;
        i_UpdateCounting = 0;

        isDefPress    = false;
        i_DefCounting = 0;
    }
예제 #28
0
    //全部合成返回
    void BackGemGroupCombine()
    {
        if (count == CombineTimes)
        {
            if (tempId != 0)
            {
                Gems resultGem = Core.Data.gemsManager.getGems(tempId);
                if (resultGem != null)
                {
                    GetGemSucUI.OpenUI(resultGem.configData, view.TEXT(5064));
                }
            }
            else
            {
                // SQYAlertViewMove.CreateAlertViewMove(view.TEXT(9014));
                ClearLastSelected();
            }

            Debug.Log(" lv  =" + tempLv + ";  defaultNum =" + defaultNum + "; successNum = " + successNum);
            view.SetCombineGemsResult(tempLv, CombineTimes, successNum);
            GemMouldNumInBag = Core.Data.itemManager.GetBagItemCount(110064);
            SelectedMouldNum = 0;
            view.SetSelectedGemNumMouldNum(SelectedMouldNum, GemMouldNumInBag);
            DBUIController.mDBUIInstance.RefreshUserInfo();
            ClearLastSelected();
            CombineTimes = 0;
        }
        ComLoading.Close();
    }
예제 #29
0
 void ShowRewards(int srcID, ItemOfReward[] rewards)
 {
     if (rewards != null)
     {
         if (rewards.Length == 0)
         {
             RED.LogWarning("get nothing!");
             return;
         }
         if (srcID == 110026)
         {
             ComLoading.Close();
             CradSystemFx.GetInstance().SetCardPanel(rewards, 3150, true, true, false);
             UIMiniPlayerController.Instance.SetActive(false);
         }
         else if ((srcID < 110026 && srcID >= 110024) || srcID == 110092)
         {
             CradSystemFx.GetInstance().SetCardSinglePanel(rewards, 350, true, true, false);
             UIMiniPlayerController.Instance.SetActive(false);
         }
         else
         {
             GetRewardSucUI.OpenUI(rewards, Core.Data.stringManager.getString(5097));
             DBUIController.mDBUIInstance.RefreshUserInfo();
         }
     }
 }
    public void SendMsg()
    {
        ComLoading.Open();
        if (NoticeManager.openSign && NoticeManager.firstShowState == 1)
        {
            ComLoading.Close();
            SetSevenRewardDetail(NoticeManager._AlertInfo.sevenSgin);
            if (Core.Data.guideManger.isGuiding)
            {
                Core.Data.guideManger.AutoRUN();
            }
        }
        else
        {
            GetSevenRewardListParam param = new GetSevenRewardListParam(int.Parse(Core.Data.playerManager.PlayerID));
            HttpTask task = new HttpTask(ThreadType.MainThread, TaskResponse.Default_Response);

            task.AppendCommonParam(RequestType.SEVENDAYREWARD, param);

            task.ErrorOccured   += testHttpResp_Error;
            task.afterCompleted += testHttpResp_UI;

            task.DispatchToRealHandler();
        }
    }