Exemple #1
0
        /// <summary>
        /// 是特殊的新手引导吗? --------- 已经不再使用,服务器来保存这个值
        /// </summary>
        /// winOrLose 战斗的输赢, 1 左边赢 0 右边赢
        bool Assignment(int winOrLose)
        {
            bool isSpecial = false;

            TemporyData          temp   = Core.Data.temper;
            AccountConfigManager AccMgr = Core.Data.AccountMgr;

            ClientBattleParam param = temp.clientReqParam;

            if (temp.currentBattleType == TemporyData.BattleType.BossBattle && param != null)
            {
                int floorId = param.doorId;
                if (floorId == 60104)                  //60104副本第一次打

                {
                    if (!TeamUI.secondPosUnLock)
                    {
                        AccMgr.UserConfig.SpecialGuideID = 1000;
                        AccMgr.save();
                    }
                }

                if (floorId == 60109)                  //60109副本第一次打,必须失败
                {
                    isSpecial = AccMgr.UserConfig.FB_60109 == 0;

                    if (isSpecial)
                    {
                        AccMgr.UserConfig.FB_60109       = 1;
                        AccMgr.UserConfig.SpecialGuideID = isSpecial ? 2000 : 0;
                        AccMgr.save();
                    }
                }

                //是技能副本吗
                if (floorId / 100 == 301)
                {
                    isSpecial = temp.warBattle.battleData.isfirst == 1;

                    if (isSpecial)
                    {
                        AccMgr.UserConfig.SpecialGuideID = isSpecial ? 3000 : 0;
                        AccMgr.save();
                    }
                }
            }

            return(isSpecial);
        }
Exemple #2
0
    /*点击BOSS关卡<执行>按钮后服务器返回的数据
     * */
    void BattleResponseFUC(BaseHttpRequest request, BaseResponse response)
    {
        ComLoading.Close();
        if (response != null)
        {
            TemporyData temp = Core.Data.temper;

            if (response.status != BaseResponse.ERROR)
            {
                BattleResponse r = response as BattleResponse;

                ClientBattleResponse resp = response as ClientBattleResponse;

                if (r != null)
                {
                    if (r != null && r.data != null && r.data.reward != null && r.data.sync != null)
                    {
                        Core.Data.playerManager.RTData.curVipLevel = r.data.sync.vip;
                    }

                    r.data.battleData.rsty = null;
                    r.data.battleData.rsmg = null;
                    temp.warBattle         = r.data;

                    temp.currentBattleType = TemporyData.BattleType.BossBattle;

                    HttpRequest      req   = request as HttpRequest;
                    BaseRequestParam param = req.ParamMem;
                    //BattleResponse res = response as BattleResponse;
                    BattleParam bp     = param as BattleParam;
                    FloorData   floorD = Core.Data.dungeonsManager.getFloorData(bp.doorId);
                    if (r.data.battleData.iswin == 1)
                    {
                        if (floorD != null)
                        {
                            Core.Data.ActivityManager.OnMissionComplete(floorD.name);
                        }
                    }
                    else
                    {
                        if (floorD != null)
                        {
                            Core.Data.ActivityManager.OnMissionFail(floorD.name);
                        }
                    }
                    if (bp.flag == 1)
                    {
                        //add by wxl
                        Core.Data.ActivityManager.OnPurchaseVirtualCurrency(ActivityManager.ChapterType, 1, 10);
                    }
                }

                if (resp != null)
                {
                    temp.currentBattleType = TemporyData.BattleType.BossBattle;
                    temp.clientDataResp    = resp;

                                        #if LOCAL_AUTO
                    temp.Open_StepMode = false;
                                        #else
                    temp.Open_StepMode = true;
                                        #endif
                    temp.Open_LocalWarMode = true;

                    HttpRequest req = request as HttpRequest;
                    if (req != null)
                    {
                        ClientBattleParam param = req.ParamMem as ClientBattleParam;
                        if (param != null)
                        {
                            temp.clientReqParam = param;
                        }
                    }
                }

                Core.Data.deblockingBuildMgr.mFloorRecord = Core.Data.newDungeonsManager.lastFloorId;

                //跳转至Ban 的场景
                JumpToBattleView();
            }
            else
            {
                if (response.errorCode == 4002)
                {
                    JCRestoreEnergyMsg.OpenUI(110015, 110016);
                }
                else
                {
                    ErrorDeal(response.errorCode);
                }
            }
        }
    }