Exemplo n.º 1
0
        private void onBtnQuitTeamClick(GameObject go)
        {
            bool flag = BaseProxy <TeamProxy> .getInstance().MyTeamData.itemTeamDataList.Count == 1;

            if (flag)
            {
                uint teamId = BaseProxy <TeamProxy> .getInstance().MyTeamData.teamId;

                BaseProxy <TeamProxy> .getInstance().SendDissolve(teamId);
            }
            else
            {
                BaseProxy <TeamProxy> .getInstance().SendLeaveTeam(this.cid);
            }
            Variant variant = SvrLevelConfig.instacne.get_level_data(MapModel.getInstance().curLevelId);
            bool    flag2   = variant != null && variant["team"]._int == 1;

            if (!flag2)
            {
                a3_currentTeamPanel._instance.gameObject.SetActive(false);
                a3_teamPanel._instance.gameObject.SetActive(true);
                BaseProxy <A3_ActiveProxy> .getInstance().SendGiveUpHunt();
            }
        }
Exemplo n.º 2
0
        public void onChangeLevel(Variant svrconf, Variant cursvrmsg)
        {
            if (curRoom != null)
            {
                curRoom.onEnd();
                curRoom = null;
            }
            //    debug.Log("!!!!:::::::::::"+cursvrmsg.dump());



            //skillbar.setAutoFightType(0);
            uint curId = svrconf["id"];

            if (dRooms.ContainsKey(curId))
            {
                curRoom = dRooms[curId];
            }
            else if (MapModel.getInstance().curLevelId > 0)
            {
                curRoom = dRooms[9999999];
            }
            else
            {
                curRoom = dRooms[0];
            }
            curRoom.onStart(svrconf);



            if (cursvrmsg != null && cursvrmsg.ContainsKey("dpitms"))
            {
                List <Variant> dps = cursvrmsg["dpitms"]._arr;
                Dictionary <string, List <DropItemdta> > ll = new Dictionary <string, List <DropItemdta> >();
                long curtimer = NetClient.instance.CurServerTimeStampMS;
                foreach (Variant v in dps)
                {
                    int x = v["x"];
                    int y = v["y"];

                    string strpos = x + "+" + y;
                    if (!ll.ContainsKey(strpos))
                    {
                        ll[strpos] = new List <DropItemdta>();
                    }
                    DropItemdta d = new DropItemdta();
                    d.init(v, curtimer);
                    d.x = x;
                    d.y = y;
                    ll[strpos].Add(d);
                }

                foreach (List <DropItemdta> l in ll.Values)
                {
                    Vector3 ve = new Vector3((float)l[0].x / GameConstant.PIXEL_TRANS_UNITYPOS, 0f, (float)l[0].y / GameConstant.PIXEL_TRANS_UNITYPOS);
                    BaseRoomItem.instance.showDropItem(ve, l);
                }
            }

            //if (curId == 0)
            //{
            //    if (skillbar.instance != null)
            //    {
            //        skillbar.instance.autifight.visiable = false;

            //    }

            //    InterfaceMgr.getInstance().close(InterfaceMgr.MONSTER_DICT);
            //    InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_NORMAL);
            //    return;
            //}
            //if (expbar.instance != null)
            //{
            //    skillbar.instance.autifight.visiable = true;

            //}

            //SXML xml = XMLMgr.instance.GetSXML("worldcfg.world", "level_id==" + MapModel.getInstance().curLevelId);

            //bool b = xml.hasFound;
            //if (xml.hasFound)
            //{
            //    skillbar.setAutoFightType();
            //    InterfaceMgr.getInstance().open(InterfaceMgr.MONSTER_DICT);
            //    InterfaceMgr.getInstance().changeState(InterfaceMgr.STATE_FB_BATTLE);
            //}
            //else if (dRooms.ContainsKey(curId))
            //{
            //    dRooms[curId].onStart();
            //    curRoom = dRooms[curId];
            //}

            //MapProxy.getInstance().sendShowMapObj();
        }
Exemplo n.º 3
0
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            a3_insideui_fb.room = this;
            isOpen = true;
            data   = MapModel.getInstance().getMapDta(9000);
            if (data == null)
            {
                data = new MapData();
            }
            MapModel.getInstance().AddMapDta(9000, data);

            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }

            Variant v = new Variant();

            v["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.showbtnIcon", "ui/interfaces/low/a1_low_fightgame", false);
            InterfaceMgr.doCommandByLua("a1_high_fightgame.showbtnIcon", "ui/interfaces/high/a1_high_fightgame", false);
            entertimer = muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.begintime = entertimer;
            enterdata = muLGClient.instance.g_levelsCT.get_curr_lvl_info();
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.JDZC);

            A3_SummonProxy.getInstance().sendZhaohui();

            if (a3_expbar.instance)
            {
                a3_expbar.instance.showBtnIcon(false);
            }

            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.showbtnIcon(false);
            }

            if (a1_gamejoy.inst_joystick)
            {
                a1_gamejoy.inst_joystick.show_btnIcon(false);
            }

            if (a3_herohead.instance)
            {
                a3_herohead.instance.showbtnIcon(false);
            }

            if (a3_equipup.instance)
            {
                a3_equipup.instance.showbtnIcom(false);
            }

            InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_LITEMINIBASEMAP);
            if (data != null)
            {
                data.cycleCount++;
            }
        }
Exemplo n.º 4
0
        public void refreshInfo()//更改锁定是调用一次
        {
            role = SelfRole._inst.m_LockRole;
            menu.hide();
            iconMagic.SetActive(false);
            iconJy.SetActive(false);
            iconPhy.SetActive(false);
            iconWar.SetActive(false);
            iconAss.SetActive(false);
            iconMage.SetActive(false);
            bossBg.SetActive(false);
            bg.SetActive(true);
            fgim.SetActive(true);
            hp1.SetActive(true);
            golevel.SetActive(true);
            otherHP.SetActive(true);
            type1.SetActive(true);
            pro.SetActive(true);
            fg2.SetActive(true);
            fg3.SetActive(false);
            bossHead.SetActive(false);
            bosshps.SetActive(false);
            bosshp1.SetActive(false);

            if (b_useing == true)
            {
                InterfaceMgr.doCommandByLua("a1_low_fightgame.setactive_btn", "ui/interfaces/low/a1_low_fightgame", true);
                b_useing = false;
            }

            if (role is CollectRole)//采集怪
            {
                golevel.SetActive(false);
                txtLv.text       = "";
                bossName.text    = "";
                bossHPCount.text = "";
                txtname.text     = role.roleName;
                isboss           = false;
            }
            else if (role is MonsterRole)
            {
                if (role.tempXMl != null && role.tempXMl.getInt("boss_hp") == 1)
                {
                    txtname.gameObject.SetActive(false);
                    bossName.gameObject.SetActive(true);
                    bossHPCount.gameObject.SetActive(true);
                    isboss = true;
                }
                else
                {
                    bossName.gameObject.SetActive(false);
                    bossHPCount.gameObject.SetActive(false);
                    txtname.gameObject.SetActive(true);
                    isboss = false;
                }
                if (role.tempXMl != null && role.tempXMl.getInt("atktp") == 1)
                {
                    iconPhy.SetActive(true);
                }
                else if (role.tempXMl != null)
                {
                    iconMagic.SetActive(true);
                }
                if (isboss)//boss
                {
                    bossBg.SetActive(true);
                    bg.SetActive(false);
                    fgim.SetActive(false);
                    otherHP.SetActive(false);
                    hp1.SetActive(false);
                    bosshp1.SetActive(true);
                    type1.SetActive(false);
                    pro.SetActive(false);
                    fg2.SetActive(false);
                    fg3.SetActive(true);
                    bossHead.SetActive(true);
                    bosshps.SetActive(true);
                    if (b_useing == false)
                    {
                        InterfaceMgr.doCommandByLua("a1_low_fightgame.setactive_btn", "ui/interfaces/low/a1_low_fightgame", false);
                        b_useing = true;
                    }
                }
                if (role is P2Warrior && iconWar.activeSelf == false)
                {
                    iconWar.SetActive(true);
                }
                else if (role is P3Mage && iconMage.activeSelf == false)
                {
                    iconMage.SetActive(true);
                }
                else if (role is P5Assassin && iconAss.activeSelf == false)
                {
                    iconAss.SetActive(true);
                }

                if (role is ohterP2Warrior && iconWar.activeSelf == false)
                {
                    iconWar.SetActive(true);
                }
                else if (role is ohterP3Mage && iconMage.activeSelf == false)
                {
                    iconMage.SetActive(true);
                }
                else if (role is ohterP5Assassin && iconAss.activeSelf == false)
                {
                    iconAss.SetActive(true);
                }
                //副本中的怪物显示等级为外观等级
                if (MapModel.getInstance().curLevelId != 0)
                {
                    txtLv.text   = MapModel.getInstance().show_instanceLvl(MapModel.getInstance().curLevelId).ToString();
                    txtname.text = role.roleName;
                }
                else
                {
                    txtLv.text   = role.tempXMl.getString("lv");
                    txtname.text = role.roleName;
                }
            }
            else
            {
                bossName.gameObject.SetActive(false);
                bossHPCount.gameObject.SetActive(false);
                txtname.gameObject.SetActive(true);
                bosshp1.SetActive(false);
                if (role is ProfessionRole)//玩家
                {
                    txtLv.text = (role as ProfessionRole).lvl.ToString();
                    if (role.roleName != txtname.text)
                    {
                        txtname.text = role.roleName;
                    }
                    bossBg.SetActive(false);
                    bg.SetActive(true);
                    fgim.SetActive(true);
                    otherHP.SetActive(true);
                    hp1.SetActive(true);
                    bosshp1.SetActive(false);
                    type1.SetActive(true);
                    pro.SetActive(true);
                    fg2.SetActive(true);
                    fg3.SetActive(false);
                    bossHead.SetActive(false);
                    bosshps.SetActive(false);
                    bossHP.gameObject.SetActive(false);
                    isboss = false;
                    if (b_useing == true)
                    {
                        InterfaceMgr.doCommandByLua("a1_low_fightgame.setactive_btn", "ui/interfaces/low/a1_low_fightgame", true);
                        b_useing = false;
                    }
                }

                if (role is P2Warrior && iconWar.activeSelf == false)
                {
                    iconWar.SetActive(true);
                }
                else if (role is P3Mage && iconMage.activeSelf == false)
                {
                    iconMage.SetActive(true);
                }
                else if (role is P5Assassin && iconAss.activeSelf == false)
                {
                    iconAss.SetActive(true);
                }
            }
        }
Exemplo n.º 5
0
 private void OnBackRespawn(GameObject go)
 {
     MapProxy.getInstance().sendRespawn(false);
     //PlayerModel.getInstance().c
     if (MapModel.getInstance().curLevelId == 108 || MapModel.getInstance().curLevelId == 109 || MapModel.getInstance().curLevelId == 110 || MapModel.getInstance().curLevelId == 111)
     {
         TeamProxy.getInstance().SendLeaveTeam(PlayerModel.getInstance().cid);
     }
 }
Exemplo n.º 6
0
        public override void onShowed()
        {
            if (uiData != null && uiData.Count == 2 && (bool)uiData[1])
            {
                InterfaceMgr.getInstance().closeAllWin(InterfaceMgr.A3_FB_TEAM);
            }
            Instance = this;
            if (bufferData != null && (uiData == null || uiData.Count == 0))
            {
                uiData = bufferData;
            }
            if (uiData.Count > 0)
            {
                if (uiData[0] == null)
                {
                    uiData = bufferData;
                }
                levelId = (uint)uiData[0];
                Variant _levelInfo = SvrLevelConfig.instacne.get_level_data(levelId);
                if (_levelInfo != null && _levelInfo.ContainsKey("name"))
                {
                    txtLevelName.text = _levelInfo["name"];
                }
                Variant data = SvrLevelConfig.instacne.get_level_data(levelId);


                Variant datasss         = SvrLevelConfig.instacne.get_level_data(levelId);
                int     thisday_count_g = data["daily_cnt"];

                int vip_buy_g = 0;
                if (MapModel.getInstance().dFbDta.ContainsKey((int)levelId))
                {
                    vip_buy_g = MapModel.getInstance().dFbDta[(int)levelId].vip_buycount;
                }
                //总次数包括购买的
                int all_count_g = thisday_count_g + vip_buy_g;
                //进入次数:
                int goin_count_g = 0;
                if (MapModel.getInstance().dFbDta.ContainsKey((int)levelId))
                {
                    goin_count_g = Mathf.Min(MapModel.getInstance().dFbDta[(int)levelId].cycleCount, all_count_g /*+ A3_VipModel.getInstance().goldFb_count*/);
                }
                // int max_times = data["daily_cnt"];
                // int use_times = 0;
                if (MapModel.getInstance().dFbDta.ContainsKey((int)levelId))
                {
                    goin_count_g   = Mathf.Min(MapModel.getInstance().dFbDta[(int)levelId].cycleCount, all_count_g);
                    leftTimes.text = (all_count_g - goin_count_g).ToString();
                }
                else
                {
                    leftTimes.text = all_count_g.ToString();  /*"0";*/
                }
            }
            else
            {
                return;
            }

            #region add listeners to events
            //TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_CREATETEAM, OnTeamStatuChange);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_CREATETEAM, OnCreateTeam);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_CHANGECAPTAIN, OnTeamStatuChange);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_KICKOUT, OnMemberInfoChange);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_NEWMEMBERJOIN, OnMemberInfoChange);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_LEAVETEAM, OnMemberInfoChange);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_AFFIRMINVITE, OnMemberInfoChange);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_CURPAGE_TEAM, OnRefreshTeamInfo);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_DISSOLVETEAM, OnTeamDissolve);
            TeamProxy.getInstance().addEventListener(TeamProxy.EVENT_TEAM_READY, OnReady);
            #endregion
            #region send msg to server
            TeamProxy.getInstance().SendGetPageTeam(levelId, TeamProxy.BEGININDEX, TeamProxy.ENDINDEX);
            #endregion
            if (PlayerModel.getInstance().IsInATeam)
            {
                btnCreate.gameObject.SetActive(false);
                btnQuickJoin.gameObject.SetActive(false);
                if (PlayerModel.getInstance().IsCaptain)
                {
                    btnStart.gameObject.SetActive(true);
                    btnStart.interactable = true;
                    btnInvite.gameObject.SetActive(true);
                    btncall.gameObject.SetActive(true);
                }
                else
                {
                    btnStart.interactable = false;
                    btnInvite.gameObject.SetActive(false);
                    btncall.gameObject.SetActive(false);
                }
            }
            else
            {
                btncall.gameObject.SetActive(false);
                btnCreate.gameObject.SetActive(true);
                btnQuickJoin.gameObject.SetActive(true);
            }
            Variant levelInfo = SvrLevelConfig.instacne.get_level_data(levelId);
            if (levelInfo != null && levelInfo.ContainsKey("zdl"))
            {
                needZDL.transform.parent.gameObject.SetActive(true);
                int zdl = levelInfo["zdl"];
                if (zdl != 0)
                {
                    needZDL.text = zdl.ToString();
                }
                else
                {
                    needZDL.transform.parent.gameObject.SetActive(false);
                }
            }
            else
            {
                needZDL.transform.parent.gameObject.SetActive(false);
            }
        }
Exemplo n.º 7
0
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            a3_insideui_fb.room = this;
            isOpen = true;
            data   = MapModel.getInstance().getMapDta(104);
            if (data == null)
            {
                data = new MapData();
            }
            MapModel.getInstance().AddMapDta(104, data);
            data.OnKillNumChange = (int i) => {
                if (a3_insideui_fb.instance != null)
                {
                    Variant d = SvrLevelConfig.instacne.get_level_data(104);
                    foreach (var a in d["fin_check"]._arr)
                    {
                        foreach (var v in a["km"]._arr)
                        {
                            int id = v["cnt"];
                            data.total_enemyNum = id;
                        }
                    }

                    a3_insideui_fb.instance.SetKillNum(i, data.total_enemyNum);
                }
            };
            int     ic  = 0;
            Variant sdc = SvrLevelConfig.instacne.get_level_data(104);

            foreach (var a in sdc["diff_lvl"]._arr)
            {
                if (a != null)
                {
                    foreach (var m in a["map"]._arr)
                    {
                        foreach (var v in m["trigger"]._arr)
                        {
                            foreach (var s in v["addmon"]._arr)
                            {
                                foreach (var z in s["m"]._arr)
                                {
                                    uint id = z["mid"];
                                    ic++;
                                }
                            }
                        }
                    }
                }
            }
            data.total_enemyNum = ic;
            startExp            = PlayerModel.getInstance().exp;
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }
            Variant vv = new Variant();

            vv["curLevelId"] = MapModel.getInstance().curLevelId;
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", vv);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", vv);


            //InterfaceMgr.getInstance().close(InterfaceMgr.BROADCASTING);

            entertimer = muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.begintime = entertimer;
            enterdata = muLGClient.instance.g_levelsCT.get_curr_lvl_info();
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.MLZD);

            if (data != null)
            {
                data.cycleCount++;
            }
        }
Exemplo n.º 8
0
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            showHpBtn = a1_gamejoy.inst_skillbar.m_skillbar_hp_Add_btn.gameObject.activeSelf;
            a1_gamejoy.inst_skillbar.m_skillbar_hp_Add_btn.gameObject.SetActive(false);
            instan = this;
            a3_insideui_fb.room = this;
            isOpen = true;
            data   = MapModel.getInstance().getMapDta(107);
            if (data == null)
            {
                data = new MapData();
            }
            MapModel.getInstance().AddMapDta(107, data);
            //data.OnKillNumChange = (int i) => {
            //    if (a3_insideui_fb.instance != null)
            //    {
            //        a3_insideui_fb.instance.SetKillNum(i);
            //    }
            //};
            startExp   = PlayerModel.getInstance().exp;
            entertimer = muNetCleint.instance.CurServerTimeStamp;
            a3_insideui_fb.begintime = entertimer;
            enterdata = muLGClient.instance.g_levelsCT.get_curr_lvl_info();
            MapModel.getInstance().curLevelId = 107;
            // InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", 107);
            a3_insideui_fb.ShowInUI(a3_insideui_fb.e_room.PVP);
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.updateUICseth();
            }
            if (a3_liteMinimap.instance != null)
            {
                a3_liteMinimap.instance.refreshByUIState();
            }
            if (a1_gamejoy.inst_skillbar)
            {
                a1_gamejoy.inst_skillbar.clearCD();
            }
            Variant v = new Variant();

            InterfaceMgr.doCommandByLua("MapModel:getInstance().getcurLevelId", "model/MapModel", MapModel.getInstance().curLevelId);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_map_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_low_fightgame.refresh_btn_ByUIState", "ui/interfaces/low/a1_low_fightgame", v);
            InterfaceMgr.doCommandByLua("a1_high_fightgame.close_heroih_ani", "ui/interfaces/high/a1_high_fightgame");
            if (tragethead.instance != null)
            {
                tragethead.instance.inFB = true;
            }
            if (data != null)
            {
                data.cycleCount++;
            }

            if (a3_expbar.instance)
            {
                a3_expbar.instance.showBtnIcon(false);
            }
            if (a3_equipup.instance)
            {
                a3_equipup.instance.showbtnIcom(false);
            }
            if (a1_gamejoy.inst_joystick)
            {
                a1_gamejoy.inst_joystick.show_btnIcon(false);
            }
            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.showbtnIcon(false);
            }
        }
Exemplo n.º 9
0
        //

        private void get_lvl_info_res(Variant msgData)
        {
            int levelId; MapData mapdata;
            int res = msgData["res"];

            if (res < 0)
            {
                Globle.err_output(res);
                return;
            }
            debug.Log("KKKKKKKK" + msgData.dump());
            // debug.Log("<color=#00ff00>"+ msgData.dump() +"</color>");
            MapModel m = MapModel.getInstance();
            MapData  d;

            switch (res)
            {
            case 1:    //表示请求副本信息的结果
                       //int time = -1;

                //if (msgData.ContainsKey("refresh_time_left"))
                //   time = msgData["refresh_time_left"];

                int maxid0 = 0;
                int maxid1 = 0;
                //m.beginTimer = time + Time.time;
                if (msgData.ContainsKey("lvls"))
                {
                    List <Variant> lv = msgData["lvls"]._arr;

                    foreach (Variant v in lv)
                    {
                        d = m.getMapDta(v["lvlid"]);
                        if (d == null)
                        {
                            d = new MapData();
                        }

                        d.starNum = v["score"];

                        if (v.ContainsKey("last_enter_time"))
                        {
                            d.enterTime = v["last_enter_time"];
                        }
                        if (v.ContainsKey("enter_times"))
                        {
                            d.cycleCount = v["enter_times"];
                        }
                        if (v.ContainsKey("limit_tm"))
                        {
                            d.limit_tm = v["limit_tm"];
                        }
                        if (v.ContainsKey("vip_cnt"))
                        {
                            d.vip_buycount = v["vip_cnt"];
                        }
                        m.AddMapDta(v["lvlid"], d);
                        d = m.getMapDta(v["lvlid"]);
                        if (d.type == 1)
                        {
                            if (d.starNum > 0 && d.id > maxid0)
                            {
                                maxid0 = d.id;
                            }
                        }
                        else if (d.type == 2)
                        {
                            if (d.starNum > 0 && d.id > maxid1)
                            {
                                maxid1 = d.id;
                            }
                        }
                        //if (v["lvlid"] == 104)
                        //{
                        //    if (v.ContainsKey ("diff_lvl"))
                        //    {
                        //        A3_ActiveModel.getInstance().nowlvl = v["diff_lvl"];
                        //    }
                        //}
                    }

                    m.setLastMapId(0, maxid0);
                    m.setLastMapId(1, maxid1);

                    m.inited = true;
                }

                if (msgData.ContainsKey("mlzd_info"))
                {
                    Variant mlzd = msgData["mlzd_info"];
                    if (mlzd.ContainsKey("mlzd_diff"))
                    {
                        A3_ActiveModel.getInstance().maxlvl = mlzd["mlzd_diff"];
                    }

                    if (mlzd.ContainsKey("diff_floor"))
                    {
                        A3_ActiveModel.getInstance().nowlvl = mlzd["diff_floor"];
                    }
                    if (mlzd.ContainsKey("times"))
                    {
                        A3_ActiveModel.getInstance().count_mlzd = mlzd["times"];
                    }
                    if (mlzd.ContainsKey("sweep_type"))
                    {
                        A3_ActiveModel.getInstance().sweep_type = mlzd["sweep_type"];
                    }

                    if (mlzd.ContainsKey("tm"))
                    {
                        A3_ActiveModel.getInstance().Time = mlzd["tm"];
                    }
                    if (a3_active_mlzd.instans != null)
                    {
                        a3_active_mlzd.instans.RefreshLeftTimes();
                    }
                }

                MapModel mapM = MapModel.getInstance();
                //凌晨界面打开时数据要刷新(单/组队人副本)
                if (a3_counterpart._instance)
                {
                    a3_counterpart._instance.refreshGoldTimes();
                    a3_counterpart._instance.refreshExpTimes();
                    a3_counterpart._instance.refreshMateTimes();
                }
                break;

            case 2:    // <!--扫荡了多少次,客户端按此值对rewards数组进行分组-->

                levelId       = msgData["lvlid"];
                mapdata       = MapModel.getInstance().getMapDta(levelId);
                mapdata.count = msgData["left_times"];
                List <Variant> rewards = msgData["rewards"]._arr;

                int len = rewards.Count / 3;
                int idx = 0;
                List <List <MapItemData> > ll = new List <List <MapItemData> >();
                List <MapItemData>         l;
                MapItemData mapitemdata;
                for (int i = 0; i < len; i++)
                {
                    l = new List <MapItemData>();
                    for (int j = 0; j < 3; j++)
                    {
                        mapitemdata       = new MapItemData();
                        mapitemdata.id    = rewards[idx]["tpid"];
                        mapitemdata.count = rewards[idx]["cnt"];
                        l.Add(mapitemdata);
                        idx++;
                    }
                    ll.Add(l);
                }

                //fb_wipeout.showIt(ll, mapdata);
                break;

            case 3:    // <!--3表示重置副本-->
                levelId            = msgData["lvlid"];
                mapdata            = MapModel.getInstance().getMapDta(levelId);
                mapdata.count      = msgData["left_times"];
                mapdata.resetCount = msgData["left_reset_times"];

                //if (fb_info.instance != null)
                //    fb_info.instance.onRefresh(levelId);
                break;

            case 4:    // <!--4表示有新的最高分产生,同步给客户端-->
                int id = msgData["lvlid"];
                if (id == 104)
                {
                    if (msgData.ContainsKey("mlzd_diff"))
                    {
                        A3_ActiveModel.getInstance().maxlvl = msgData["mlzd_diff"];
                    }

                    if (msgData.ContainsKey("diff_floor"))
                    {
                        A3_ActiveModel.getInstance().nowlvl = msgData["diff_floor"];
                    }
                }
                if (m.containerID(id))
                {
                    break;
                }

                d = m.getMapDta(id);
                if (d == null)
                {
                    return;
                }
                d.starNum    = msgData["score"];
                d.count      = msgData["left_times"];
                d.resetCount = msgData["left_reset_times"];



                break;

            //vip购买增加次数返回
            case 5:

                MapData data = m.getMapDta(msgData["ltpid"]);
                if (data == null)
                {
                    data = new MapData();
                    data.vip_buycount = msgData["vip_cnt"];
                    MapModel.getInstance().AddMapDta(msgData["ltpid"], data);
                }
                else
                {
                    MapModel.getInstance().dFbDta[msgData["ltpid"]].vip_buycount = msgData["vip_cnt"];
                }

                if (a3_counterpart._instance)
                {
                    a3_counterpart._instance.refreshGoldTimes();
                    a3_counterpart._instance.refreshExpTimes();
                    a3_counterpart._instance.refreshMateTimes();
                }



                //MJJDModel.getInstance().GetBuyRefresh(msgData);
                break;

            case 6:
                //MJJDModel.getInstance().GetMJJDTimes(msgData);
                break;

            case 7:    //刷新墨家境地波数
                //if (float_mjjd.instance != null && msgData.ContainsKey("current_wave"))
                //    float_mjjd.instance.refreshBo(msgData["current_wave"]);
                break;

            default:
                break;
            }


            //NetClient.instance.dispatchEvent(
            //     GameEvent.Create(PKG_NAME.S2C_GET_LVL_INFO_RES, this, GameTools.CreateSwitchData("get_lvl_info_res", msgData))
            // );
            //GameSession(this.session).logicClient.logicInGame.lgGD_levels.get_lvl_info_res(msgData);
        }
Exemplo n.º 10
0
        private void get_lvl_info_res(Variant msgData)
        {
            int  num  = msgData["res"];
            bool flag = num < 0;

            if (flag)
            {
                Globle.err_output(num);
            }
            else
            {
                debug.Log("KKKKKKKK" + msgData.dump());
                MapModel instance = MapModel.getInstance();
                switch (num)
                {
                case 1:
                {
                    int  num2  = 0;
                    int  num3  = 0;
                    bool flag2 = msgData.ContainsKey("lvls");
                    if (flag2)
                    {
                        List <Variant> arr = msgData["lvls"]._arr;
                        foreach (Variant current in arr)
                        {
                            MapData mapData = instance.getMapDta(current["lvlid"]);
                            bool    flag3   = mapData == null;
                            if (flag3)
                            {
                                mapData = new MapData();
                            }
                            instance.AddMapDta(current["lvlid"], mapData);
                            mapData         = instance.getMapDta(current["lvlid"]);
                            mapData.starNum = current["score"];
                            bool flag4 = current.ContainsKey("last_enter_time");
                            if (flag4)
                            {
                                mapData.enterTime = current["last_enter_time"];
                            }
                            bool flag5 = current.ContainsKey("enter_times");
                            if (flag5)
                            {
                                mapData.cycleCount = current["enter_times"];
                            }
                            bool flag6 = current.ContainsKey("limit_tm");
                            if (flag6)
                            {
                                mapData.limit_tm = current["limit_tm"];
                            }
                            bool flag7 = mapData.type == 1;
                            if (flag7)
                            {
                                bool flag8 = mapData.starNum > 0 && mapData.id > num2;
                                if (flag8)
                                {
                                    num2 = mapData.id;
                                }
                            }
                            else
                            {
                                bool flag9 = mapData.type == 2;
                                if (flag9)
                                {
                                    bool flag10 = mapData.starNum > 0 && mapData.id > num3;
                                    if (flag10)
                                    {
                                        num3 = mapData.id;
                                    }
                                }
                            }
                        }
                        instance.setLastMapId(0, num2);
                        instance.setLastMapId(1, num3);
                        instance.inited = true;
                    }
                    bool flag11 = msgData.ContainsKey("mlzd_diff");
                    if (flag11)
                    {
                        ModelBase <A3_ActiveModel> .getInstance().nowlvl = msgData["mlzd_diff"];
                    }
                    MapModel instance2 = MapModel.getInstance();
                    break;
                }

                case 2:
                {
                    int     id     = msgData["lvlid"];
                    MapData mapDta = MapModel.getInstance().getMapDta(id);
                    mapDta.count = msgData["left_times"];
                    List <Variant>             arr2 = msgData["rewards"]._arr;
                    int                        num4 = arr2.Count / 3;
                    int                        num5 = 0;
                    List <List <MapItemData> > list = new List <List <MapItemData> >();
                    for (int i = 0; i < num4; i++)
                    {
                        List <MapItemData> list2 = new List <MapItemData>();
                        for (int j = 0; j < 3; j++)
                        {
                            list2.Add(new MapItemData
                                {
                                    id    = arr2[num5]["tpid"],
                                    count = arr2[num5]["cnt"]
                                });
                            num5++;
                        }
                        list.Add(list2);
                    }
                    break;
                }

                case 3:
                {
                    int     id     = msgData["lvlid"];
                    MapData mapDta = MapModel.getInstance().getMapDta(id);
                    mapDta.count      = msgData["left_times"];
                    mapDta.resetCount = msgData["left_reset_times"];
                    break;
                }

                case 4:
                {
                    int  num6   = msgData["lvlid"];
                    bool flag12 = instance.containerID(num6);
                    if (!flag12)
                    {
                        MapData mapData = instance.getMapDta(num6);
                        bool    flag13  = mapData == null;
                        if (!flag13)
                        {
                            mapData.starNum    = msgData["score"];
                            mapData.count      = msgData["left_times"];
                            mapData.resetCount = msgData["left_reset_times"];
                            bool flag14 = num6 == 104;
                            if (flag14)
                            {
                                bool flag15 = msgData.ContainsKey("diff_lvl");
                                if (flag15)
                                {
                                    ModelBase <A3_ActiveModel> .getInstance().nowlvl = msgData["diff_lvl"];
                                }
                            }
                        }
                    }
                    break;
                }
                }
            }
        }
Exemplo n.º 11
0
        public override void onShowed()
        {
            uint up_lvl = ModelBase <PlayerModel> .getInstance().up_lvl;

            foreach (KeyValuePair <uint, uint> current in this.diff_lvl_zhaun)
            {
                bool flag = current.Value == up_lvl;
                if (flag)
                {
                    this.diff_lvl = current.Key;
                }
            }
            bool flag2 = up_lvl > this.diff_lvl_zhaun[4u];

            if (flag2)
            {
                this.diff_lvl = 4u;
            }
            int      minutes  = this.data["tm"];
            TimeSpan timeSpan = new TimeSpan(0, minutes, 0);

            base.getTransformByPath("cue/time").gameObject.SetActive(false);
            bool flag3 = MapModel.getInstance().dFbDta.ContainsKey(105);

            if (flag3)
            {
                MapData  mapData   = MapModel.getInstance().dFbDta[105];
                TimeSpan timeSpan2 = new TimeSpan(0, 0, mapData.limit_tm);
                base.getTransformByPath("cue/limit").GetComponent <Text>().text = string.Concat(new object[]
                {
                    "剩余时间: ",
                    timeSpan2.Hours,
                    "时",
                    timeSpan2.Minutes,
                    "分",
                    timeSpan2.Seconds,
                    "秒"
                });
                bool flag4 = mapData.limit_tm <= 0;
                if (flag4)
                {
                    this.enterbtn.interactable = false;
                }
                else
                {
                    this.enterbtn.interactable = true;
                }
            }
            else
            {
                base.getTransformByPath("cue/limit").GetComponent <Text>().text = string.Concat(new object[]
                {
                    "剩余时间: ",
                    1,
                    "时",
                    0,
                    "分",
                    0,
                    "秒"
                });
                this.enterbtn.interactable = true;
            }
            base.getTransformByPath("cue/reword").GetComponent <Text>().text = "副本奖励: <color=#ff9900>召唤兽宝宝</color>";
            this.RefreshLeftTimes();
        }
Exemplo n.º 12
0
        void refresh()
        {
            var dd = A3_TaskModel.getInstance().GetDailyTask();

            if (dd != null)
            {
                cs_rotine.text = "(" + (A3_TaskModel.getInstance().GetTaskMaxCount(dd.taskId) - dd.taskCount) + "/" + A3_TaskModel.getInstance().GetTaskMaxCount(dd.taskId) + ")";
                this.transform.FindChild("cells/scroll/content/routine").gameObject.SetActive(true);
            }
            else
            {
                //cs_rotine.text = "(未开启)";
                this.transform.FindChild("cells/scroll/content/routine").gameObject.SetActive(false);
            }
            Variant data      = SvrLevelConfig.instacne.get_level_data(102);
            int     max_times = data["daily_cnt"];
            int     use_times = 0;

            if (MapModel.getInstance().dFbDta.ContainsKey(102))
            {
                use_times = Mathf.Min(MapModel.getInstance().dFbDta[102].cycleCount, max_times);
            }
            if (FunctionOpenMgr.instance.Check(FunctionOpenMgr.GOLD_DUNGEON) && max_times != use_times)
            {
                cs_goldfb.text = "(" + (max_times - use_times) + "/" + max_times + ")";
                this.transform.FindChild("cells/scroll/content/goldfb").gameObject.SetActive(true);
            }
            else
            {
                //cs_expfb.text = "(未开启)";
                this.transform.FindChild("cells/scroll/content/goldfb").gameObject.SetActive(false);
            }

            //if (ExchangeModel.getInstance().Count >= 10)
            //{

            //}
            //else
            //{
            //    cs_getMoney.text = "(" + (10 - ExchangeModel.getInstance().Count) + "/10)";
            //    this.transform.FindChild("cells/scroll/content/dianjin").gameObject.SetActive(true);
            //}
            int num;

            if (A3_VipModel.getInstance().Level > 0)
            {
                num = A3_VipModel.getInstance().vip_exchange_num(3);
            }
            else
            {
                num = 10;
            }
            ExchangeModel exModel = ExchangeModel.getInstance();

            if (num - exModel.Count > 0)
            {
                cs_getMoney.text = "(" + (num - exModel.Count) + "/" + num + ")";
                this.transform.FindChild("cells/scroll/content/dianjin").gameObject.SetActive(true);
            }
            else
            {
                this.transform.FindChild("cells/scroll/content/dianjin").gameObject.SetActive(false);
            }
        }
Exemplo n.º 13
0
        public void refreshInfo()
        {
            this.role = SelfRole._inst.m_LockRole;
            this.menu.hide();
            this.iconMagic.SetActive(false);
            this.iconJy.SetActive(false);
            this.iconPhy.SetActive(false);
            this.iconWar.SetActive(false);
            this.iconAss.SetActive(false);
            this.iconMage.SetActive(false);
            this.bossBg.SetActive(false);
            this.bg.SetActive(true);
            this.fgim.SetActive(true);
            this.hp1.SetActive(true);
            this.golevel.SetActive(true);
            this.otherHP.SetActive(true);
            this.type1.SetActive(true);
            this.pro.SetActive(true);
            this.fg2.SetActive(true);
            this.fg3.SetActive(false);
            this.bossHead.SetActive(false);
            this.bosshps.SetActive(false);
            this.bosshp1.SetActive(false);
            bool flag = this.b_useing;

            if (flag)
            {
                InterfaceMgr.doCommandByLua("a3_litemap.setactive_btn", "ui/interfaces/floatui/a3_litemap", new object[]
                {
                    true
                });
                this.b_useing = false;
            }
            bool flag2 = this.role is CollectRole;

            if (flag2)
            {
                this.golevel.SetActive(false);
                this.txtLv.text       = "";
                this.bossName.text    = "";
                this.bossHPCount.text = "";
                this.txtname.text     = this.role.roleName;
                this.isboss           = false;
            }
            else
            {
                bool flag3 = this.role is MonsterRole;
                if (flag3)
                {
                    bool flag4 = this.role.tempXMl != null && this.role.tempXMl.getInt("boss_hp") == 1;
                    if (flag4)
                    {
                        this.txtname.gameObject.SetActive(false);
                        this.bossName.gameObject.SetActive(true);
                        this.bossHPCount.gameObject.SetActive(true);
                        this.isboss = true;
                    }
                    else
                    {
                        this.bossName.gameObject.SetActive(false);
                        this.bossHPCount.gameObject.SetActive(false);
                        this.txtname.gameObject.SetActive(true);
                        this.isboss = false;
                    }
                    bool flag5 = this.role.tempXMl != null && this.role.tempXMl.getInt("atktp") == 1;
                    if (flag5)
                    {
                        this.iconPhy.SetActive(true);
                    }
                    else
                    {
                        bool flag6 = this.role.tempXMl != null;
                        if (flag6)
                        {
                            this.iconMagic.SetActive(true);
                        }
                    }
                    bool flag7 = this.isboss;
                    if (flag7)
                    {
                        this.bossBg.SetActive(true);
                        this.bg.SetActive(false);
                        this.fgim.SetActive(false);
                        this.otherHP.SetActive(false);
                        this.hp1.SetActive(false);
                        this.bosshp1.SetActive(true);
                        this.type1.SetActive(false);
                        this.pro.SetActive(false);
                        this.fg2.SetActive(false);
                        this.fg3.SetActive(true);
                        this.bossHead.SetActive(true);
                        this.bosshps.SetActive(true);
                        bool flag8 = !this.b_useing;
                        if (flag8)
                        {
                            InterfaceMgr.doCommandByLua("a3_litemap.setactive_btn", "ui/interfaces/floatui/a3_litemap", new object[]
                            {
                                false
                            });
                            this.b_useing = true;
                        }
                    }
                    bool flag9 = this.role is P2Warrior && !this.iconWar.activeSelf;
                    if (flag9)
                    {
                        this.iconWar.SetActive(true);
                    }
                    else
                    {
                        bool flag10 = this.role is P3Mage && !this.iconMage.activeSelf;
                        if (flag10)
                        {
                            this.iconMage.SetActive(true);
                        }
                        else
                        {
                            bool flag11 = this.role is P5Assassin && !this.iconAss.activeSelf;
                            if (flag11)
                            {
                                this.iconAss.SetActive(true);
                            }
                        }
                    }
                    bool flag12 = MapModel.getInstance().curLevelId > 0u;
                    if (flag12)
                    {
                        this.txtLv.text   = MapModel.getInstance().show_instanceLvl(MapModel.getInstance().curLevelId).ToString();
                        this.txtname.text = this.role.roleName;
                    }
                    else
                    {
                        this.txtLv.text   = this.role.tempXMl.getString("lv");
                        this.txtname.text = this.role.roleName;
                    }
                }
                else
                {
                    this.bossName.gameObject.SetActive(false);
                    this.bossHPCount.gameObject.SetActive(false);
                    this.txtname.gameObject.SetActive(true);
                    this.bosshp1.SetActive(false);
                    bool flag13 = this.role is ProfessionRole;
                    if (flag13)
                    {
                        this.txtLv.text = (this.role as ProfessionRole).lvl.ToString();
                        bool flag14 = this.role.roleName != this.txtname.text;
                        if (flag14)
                        {
                            this.txtname.text = this.role.roleName;
                        }
                        this.bossBg.SetActive(false);
                        this.bg.SetActive(true);
                        this.fgim.SetActive(true);
                        this.otherHP.SetActive(true);
                        this.hp1.SetActive(true);
                        this.bosshp1.SetActive(false);
                        this.type1.SetActive(true);
                        this.pro.SetActive(true);
                        this.fg2.SetActive(true);
                        this.fg3.SetActive(false);
                        this.bossHead.SetActive(false);
                        this.bosshps.SetActive(false);
                        this.bossHP.gameObject.SetActive(false);
                        this.isboss = false;
                        bool flag15 = this.b_useing;
                        if (flag15)
                        {
                            InterfaceMgr.doCommandByLua("a3_litemap.setactive_btn", "ui/interfaces/floatui/a3_litemap", new object[]
                            {
                                true
                            });
                            this.b_useing = false;
                        }
                    }
                    bool flag16 = this.role is P2Warrior && !this.iconWar.activeSelf;
                    if (flag16)
                    {
                        this.iconWar.SetActive(true);
                    }
                    else
                    {
                        bool flag17 = this.role is P3Mage && !this.iconMage.activeSelf;
                        if (flag17)
                        {
                            this.iconMage.SetActive(true);
                        }
                        else
                        {
                            bool flag18 = this.role is P5Assassin && !this.iconAss.activeSelf;
                            if (flag18)
                            {
                                this.iconAss.SetActive(true);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 14
0
        private void a3_scene_loaded()
        {
            MapProxy.getInstance().changingMap = false;

            if (!grmap_loading)
            {
                return;
            }

            //   PlayerNameUIMgr.getInstance().Clear();

            //清空音效
            //MediaClient.instance.clearMusic();

            SceneCamera.Init();
            if (SelfRole._inst != null)
            {
                SelfRole._inst.dispose();
            }

            debug.Log("初始化角色");
            SelfRole.Init();

            SelfRole._inst.m_unIID             = PlayerModel.getInstance().iid;
            SelfRole._inst.m_curModel.position = PlayerModel.getInstance().enter_map_pos;
            SelfRole._inst.setNavLay(NavmeshUtils.listARE[1]);
            //debug.Log("地图加载后的坐标为" + SelfRole._inst.m_curModel.position);


            Time.fixedDeltaTime = 0.02f;

            GameObject svr = GameObject.Find("SVR_DATA");

            if (svr != null)
            {
                GameObject.Destroy(svr);
            }

            //主城添加一个z轴的18高度,防止初始化判断在阻挡外面。加了高度后虽然在阻挡外面,但hit返回的xy值正常,z值调整为正常
            float z = 0f;

            if (curSvrConf["id"] == 10 || GRMap.curSvrConf["id"] == 24)
            {
                z = 18f;
            }
            SelfRole._inst.setPos(new Vector3(PlayerModel.getInstance().mapBeginX, z, PlayerModel.getInstance().mapBeginY));

            if (PlayerModel.getInstance().mapBeginroatate > 0f)
            {
                SelfRole._inst.setRoleRoatate(PlayerModel.getInstance().mapBeginroatate);
                PlayerModel.getInstance().mapBeginroatate = 0f;
            }

            DoAfterMgr.instacne.addAfterRender(() =>
            {
                if (MapModel.getInstance().CheckAutoPlay())
                {
                    SelfRole.fsm.StartAutofight();
                }
            });


            GameRoomMgr.getInstance().onChangeLevel(curSvrConf, curSvrMsg);
            grmap_loading = false;

            if (!fristloaded)
            {
                if (showid.Contains(curSvrConf["id"]))
                {
                    InterfaceMgr.getInstance().close(InterfaceMgr.A3_PKMAPUI);
                }
                else
                {
                    if (curSvrConf.ContainsKey("pk_hint") && curSvrConf["pk_hint"] == 1)
                    {
                        InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_PKMAPUI);
                        showid.Add(curSvrConf["id"]);
                    }
                    else
                    {
                        InterfaceMgr.getInstance().close(InterfaceMgr.A3_PKMAPUI);
                    }
                }
            }
            //打开魔炼之地
            if (a3_fb_finish.ismlzd)
            {
                ArrayList dl = new ArrayList();
                dl.Add("mlzd");
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ACTIVE, dl);
                a3_fb_finish.ismlzd = false;
            }
            if (curSvrConf.ContainsKey("pk_lock"))
            {
                InterfaceMgr.doCommandByLua("a1_low_fightgame.refreskCanPk", "ui/interfaces/low/a1_low_fightgame", false);
            }
            else
            {
                InterfaceMgr.doCommandByLua("a1_low_fightgame.refreskCanPk", "ui/interfaces/low/a1_low_fightgame", true);
            }

            if (a1_gamejoy.inst_skillbar != null)
            {
                if (GRMap.curSvrConf["id"] == 10 || GRMap.curSvrConf["id"] == 24)
                {
                    a1_gamejoy.inst_skillbar.ShowCombatUI(false);
                }
                else
                {
                    a1_gamejoy.inst_skillbar.ShowCombatUI(true);
                }
            }

            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.refreshMapname();
            }
            InterfaceMgr.doCommandByLua("a1_high_fightgame.refreshMapname", "ui/interfaces/high/a1_high_fightgame", null);

            if (a1_gamejoy.inst_skillbar != null)
            {
                a1_gamejoy.inst_skillbar.refreshAllSkills(SelfRole.s_bStandaloneScene ? 0 : -1);
            }

            if (curSvrConf.ContainsKey("music"))
            {
                MediaClient.instance.PlayMusicUrl("audio_map_" + curSvrConf["music"], null, true);
            }

            fristloaded = false;

            OtherPlayerMgr._inst.onMapLoaded();
            MonsterMgr._inst.onMapLoaded();
            NpcMgr.instance.onMapLoaded();
            BattleProxy.getInstance().onMapLoaded();
        }
Exemplo n.º 15
0
        void refresh()
        {
            var dd = A3_TaskModel.getInstance().GetDailyTask();

            if (dd != null)
            {
                cs_rotine.text = "(" + (A3_TaskModel.getInstance().GetTaskMaxCount(dd.taskId) - dd.taskCount) + "/" + A3_TaskModel.getInstance().GetTaskMaxCount(dd.taskId) + ")";
                this.transform.FindChild("cells/scroll/content/routine").gameObject.SetActive(true);
            }
            else
            {
                //cs_rotine.text = "(未开启)";
                this.transform.FindChild("cells/scroll/content/routine").gameObject.SetActive(false);
            }

            Variant data      = SvrLevelConfig.instacne.get_level_data(101);
            int     max_times = data["daily_cnt"] + A3_VipModel.getInstance().expFb_count;
            int     use_times = 0;

            if (MapModel.getInstance().dFbDta.ContainsKey(101))
            {
                use_times = Mathf.Min(MapModel.getInstance().dFbDta[101].cycleCount, max_times);
            }
            if (FunctionOpenMgr.instance.Check(FunctionOpenMgr.EXP_DUNGEON))
            {
                cs_expfb.text = "(" + (max_times - use_times) + "/" + max_times + ")";
                this.transform.FindChild("cells/scroll/content/expfb").gameObject.SetActive(true);
            }
            else
            {
                //cs_expfb.text = "(未开启)";
                this.transform.FindChild("cells/scroll/content/expfb").gameObject.SetActive(false);
            }

            if (FunctionOpenMgr.instance.Check(FunctionOpenMgr.ENTRUST_TASK))
            {
                TaskData entrustTask;
                if ((entrustTask = A3_TaskModel.getInstance().GetEntrustTask()) != null)
                {
                    int curCount, maxCount;
                    maxCount = XMLMgr.instance.GetSXML("task.emis_limit").getInt("emis_limit") * XMLMgr.instance.GetSXML("task.emis_limit").getInt("loop_limit");
                    curCount = maxCount - (entrustTask.taskCount + entrustTask.taskLoop * XMLMgr.instance.GetSXML("task.emis_limit").getInt("emis_limit"));
                    curCount = curCount > 0 ? curCount : 0;
                    this.transform.FindChild("cells/scroll/content/entrustTask").gameObject.SetActive(true);
                    this.transform.FindChild("cells/scroll/content/entrustTask/name/dj").GetComponent <Text>().text =
                        string.Format("{0}/{1}", curCount, maxCount);
                }
                else
                {
                    this.transform.FindChild("cells/scroll/content/entrustTask").gameObject.SetActive(false);
                }
            }
            else
            {
                this.transform.FindChild("cells/scroll/content/entrustTask").gameObject.SetActive(false);
            }

            if (FunctionOpenMgr.instance.Check(FunctionOpenMgr.AUTO_PLAY))
            {
                if (GeneralProxy.getInstance().active_open)
                {
                    getTransformByPath("cells/scroll/content/sczghd/go").GetComponent <Button>().interactable = true;
                    this.transform.FindChild("cells/scroll/content/sczghd").gameObject.SetActive(true);
                    this.transform.FindChild("cells/scroll/content/guaji").gameObject.SetActive(false);
                    //getTransformByPath("cells/scroll/content/sczghd/go/text").GetComponent<Text>().text = "(已经开启)";
                }
                else
                {
                    this.transform.FindChild("cells/scroll/content/sczghd").gameObject.SetActive(false);
                    this.transform.FindChild("cells/scroll/content/guaji").gameObject.SetActive(true);
                    //getTransformByPath("cells/scroll/content/sczghd/go").GetComponent<Button>().interactable = false;
                    //getTransformByPath("cells/scroll/content/sczghd/go/text").GetComponent<Text>().text = "(等待开启)";
                }
            }
            else
            {
                getTransformByPath("cells/scroll/content/sczghd/go").GetComponent <Button>().interactable = false;
                this.transform.FindChild("cells/scroll/content/sczghd").gameObject.SetActive(false);
                this.transform.FindChild("cells/scroll/content/guaji").gameObject.SetActive(false);
            }
            cs_sczghd.text = "";
            want_to();
        }
Exemplo n.º 16
0
        private void DealByType(TaskData taskData, bool checkItems)
        {
            A3_TaskOpt.Instance.ResetStat();
            A3_TaskOpt.Instance.Reset(alsoHideGameObject: true, resetCase: 0);
            TaskTargetType taskTargetType = taskData.targetType;
            TaskType       taskType       = taskData.taskT;

            if (A3_TaskOpt.Instance == null)
            {
                //Debug.LogError("请将A3_TaskOpt预制件默认设为Active");
                return;// not init
            }
            if (!A3_TaskOpt.Instance.taskOptElement.ContainsKey(taskData.taskId))
            {
                A3_TaskOpt.Instance.taskOptElement[taskData.taskId] = new TaskOptElement(taskData.taskId);
            }
            A3_TaskOpt.Instance.curTaskId = taskData.taskId;
            if (taskTargetType == TaskTargetType.WAIT_POINT_GIVEN /* || TaskTargetType.MESSAGE_GIVEN_POS == taskTargetType*/)
            {
                Vector3 waitPosition = Vector3.zero;
                var     pointInfo    = A3_TaskModel.getInstance().GetTaskXML().GetNode("Task", "id==" + taskData.taskId);
                //A3_TaskOpt.Instance.IsOnTaskWait = true;
                A3_TaskOpt.Instance.LockStat = false;
                if (A3_TaskOpt.Instance.isWaiting)
                {
                    A3_TaskOpt.Instance.StopCD();
                }
                A3_TaskOpt.Instance.BtnWait.interactable = true;
                A3_TaskOpt.Instance.waitPosition         = new Vector3(pointInfo.getFloat("target_coordinate_x"), 0, pointInfo.getFloat("target_coordinate_y"));
                waitPosition = A3_TaskOpt.Instance.waitPosition;
                A3_TaskOpt.Instance.actionImage.sprite = GAMEAPI.ABUI_LoadSprite("icon_task_action_" + pointInfo.getInt("act_icon"));
                A3_TaskOpt.Instance.transform.FindChild("wait/action_text").GetComponent <Text>().text = pointInfo.getString("act_name");



                #region
                PlayerModel.getInstance().task_monsterIdOnAttack[taskData.taskId] = pointInfo.getInt("target_param2");
                //InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                //{
                //    mapId = pointInfo.getInt("tasking_map_id"),
                //    check_beforeShow = true,
                //    handle_customized_afterTransmit = () => SelfRole.WalkToMap(pointInfo.getInt("tasking_map_id"),
                //    waitPosition),
                //    targetPosition = waitPosition
                //});
                int mapId = pointInfo.getInt("tasking_map_id");
                if (MapModel.getInstance().dicMappoint.ContainsKey(mapId))
                {
                    int mapPoint = MapModel.getInstance().dicMappoint[mapId];
                    if (GRMap.instance.m_nCurMapID != mapId && GRMap.instance.m_nCurMapID != mapPoint)
                    {
                        SelfRole.Transmit(mapPoint, () => SelfRole.WalkToMap(mapId, waitPosition, taskmove: true), taskTrans: true);
                    }
                    else
                    {
                        SelfRole.WalkToMap(mapId, waitPosition, taskmove: true);
                    }
                }
            } // endif wait given point
            else if (taskTargetType == TaskTargetType.KILL_MONSTER_GIVEN)
            {
                A3_TaskOpt.Instance.IsOnKillMon = true;
                Vector3 waitPosition = Vector3.zero;
                SXML    monInfo      = A3_TaskModel.getInstance().GetTaskXML().GetNode("Task", "id==" + taskData.taskId);

                if (monInfo != null)
                {
                    //A3_TaskOpt.Instance.IsOnKillMon = true;
                    A3_TaskOpt.Instance.LockStat = false;
                    PlayerModel.getInstance().task_monsterIdOnAttack.Add(taskData.taskId, monInfo.getInt("target_param2"));
                    A3_TaskOpt.Instance.killPosition = new Vector3(monInfo.getFloat("target_coordinate_x"), 0, monInfo.getFloat("target_coordinate_y"));
                    waitPosition = A3_TaskOpt.Instance.killPosition;
                }

                //InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                //{
                //    mapId = monInfo.getInt("tasking_map_id"),
                //    check_beforeShow = true,
                //    handle_customized_afterTransmit = () => SelfRole.WalkToMap(monInfo.getInt("tasking_map_id"),
                //    waitPosition),
                //    targetPosition = waitPosition
                //});
                int mapId = monInfo.getInt("tasking_map_id");
                if (MapModel.getInstance().dicMappoint.ContainsKey(mapId))
                {
                    int mapPoint = MapModel.getInstance().dicMappoint[mapId];
                    if (GRMap.instance.m_nCurMapID != mapId && GRMap.instance.m_nCurMapID != mapPoint)
                    {
                        SelfRole.Transmit(mapPoint, () => SelfRole.WalkToMap(mapId, waitPosition, taskmove: true), taskTrans: true);
                    }
                    else
                    {
                        SelfRole.WalkToMap(mapId, waitPosition, taskmove: true);
                    }
                }
            } // endif kill given monster
            else if (taskTargetType == TaskTargetType.GET_ITEM_GIVEN)
            {
                int holdNum = 0, needNum = 0;
                //A3_TaskOpt.Instance.IsOnTaskWait = true;
                Action      uiHandle        = null;
                NpcShopData npcShopData     = null;
                SXML        taskinfoGetItem = A3_TaskModel.getInstance().GetTaskXML().GetNode("Task", "id==" + taskData.taskId);

                A3_TaskOpt.Instance.taskItemId = taskinfoGetItem.getUint("target_param2");
                needNum     = taskData.completion - taskData.taskRate;//taskinfoGetItem.getInt("target_param1");
                holdNum     = a3_BagModel.getInstance().getItemNumByTpid(A3_TaskOpt.Instance.taskItemId);
                uiHandle    = () => A3_TaskOpt.Instance?.ShowSubmitItem();
                npcShopData = A3_NPCShopModel.getInstance().GetDataByItemId(A3_TaskOpt.Instance.taskItemId);
                if (holdNum >= needNum)
                {
                    int   npcId   = taskinfoGetItem.getInt("complete_npc_id");
                    int   mapId   = taskinfoGetItem.getInt("tasking_map_id");
                    SXML  npcInfo = XMLMgr.instance.GetSXML("npcs").GetNode("npc", "id==" + npcId);
                    float mapY    = npcInfo.getFloat("location_height");
                    if (mapY < 0)
                    {
                        mapY = 0;
                    }
                    Vector3 npcPos = new Vector3(npcInfo.getFloat("location_x") / GameConstant.GEZI_TRANS_UNITYPOS, mapY / GameConstant.GEZI_TRANS_UNITYPOS, npcInfo.getFloat("location_y") / GameConstant.GEZI_TRANS_UNITYPOS);
                    //InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                    //{
                    //    mapId = mapId,
                    //    check_beforeShow = true,
                    //    handle_customized_afterTransmit = () =>
                    //    {
                    //        SelfRole.WalkToMap(mapId, npcPos, handle: () => { A3_TaskOpt.Instance.ShowSubmitItem(); }, stopDis: 2f);
                    //    }
                    //});
                    if (MapModel.getInstance().dicMappoint.ContainsKey(mapId))
                    {
                        int mapPoint = MapModel.getInstance().dicMappoint[mapId];
                        if (GRMap.instance.m_nCurMapID != mapId && GRMap.instance.m_nCurMapID != mapPoint)
                        {
                            SelfRole.Transmit(mapPoint, () => SelfRole.WalkToMap(mapId, npcPos, () => { A3_TaskOpt.Instance.ShowSubmitItem(); }, 2f, taskmove: true), taskTrans: true);
                        }
                        else
                        {
                            SelfRole.WalkToMap(mapId, npcPos, () => { A3_TaskOpt.Instance.ShowSubmitItem(); }, 2f, taskmove: true);
                        }
                    }
                }
                else if (npcShopData != null)
                {
                    //InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                    //{
                    //    mapId = npcShopData.mapId,
                    //    check_beforeShow = true,
                    //    handle_customized_afterTransmit = () => SelfRole.moveToNPc(npcShopData.mapId, npcShopData.npc_id)
                    //});
                    int mapId = npcShopData.mapId;
                    if (!PlayerModel.getInstance().inFb&& mapId != GRMap.instance.m_nCurMapID && MapModel.getInstance().dicMappoint.ContainsKey(mapId) && MapModel.getInstance().dicMappoint[mapId] != GRMap.instance.m_nCurMapID)
                    {
                        SelfRole.Transmit(toid: MapModel.getInstance().dicMappoint[mapId], after: () => SelfRole.moveToNPc(mapId, npcShopData.npc_id, taskmove: true), taskTrans: true);
                    }
                    else
                    {
                        SelfRole.moveToNPc(mapId, npcShopData.npc_id, taskmove: true);
                    }
                }
                else
                {
                    if (checkItems)
                    {
                        ArrayList data = new ArrayList();
                        data.Add(a3_BagModel.getInstance().getItemDataById(A3_TaskOpt.Instance.taskItemId));
                        //data.Add(null);
                        InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_ITEMLACK, data);
                    }
                }
            } // endif get given item
            #endregion
        }
Exemplo n.º 17
0
        void onItemChange(Variant data)
        {
            debug.Log(data.dump() + ":::::::::::::::");
            //  Debug.LogError(a3_BagModel.getInstance().item_num[1540].num);
            if (data.ContainsKey("money") || data.ContainsKey("yb") || data.ContainsKey("bndyb"))
            {//金钱变化
                if (data.ContainsKey("money"))
                {
                    if (data["money"] > PlayerModel.getInstance().money)
                    {
                        //if(a3_insideui_fb.instance == null)
                        flytxt.instance.fly(ContMgr.getCont("BagProxy_money") + (data["money"] - PlayerModel.getInstance().money));

                        if (a3_insideui_fb.instance != null && data.Count == 1)
                        {
                            a3_insideui_fb.instance.SetInfMoney((int)(data["money"] - PlayerModel.getInstance().money));
                            //BaseRoomItem.instance.goldnum = (data["money"] - PlayerModel.getInstance().money);
                            //debug.Log("ssssssssssssssssssssssssddd+" + BaseRoomItem.instance.goldnum);
                        }
                    }
                    else
                    {
                        debug.Log("消耗金币" + (PlayerModel.getInstance().money - data["money"]));
                        skill_a3.upgold = (int)(PlayerModel.getInstance().money - data["money"]);
                    }
                    PlayerModel.getInstance().money = data["money"];
                }
                if (data.ContainsKey("yb"))//钻石
                {
                    uint lastgold = PlayerModel.getInstance().gold;
                    PlayerModel.getInstance().gold = data["yb"];
                    if (lastgold < data["yb"] && HttpAppMgr.instance != null && HttpAppMgr.instance.giftCard != null)
                    {
                        HttpAppMgr.instance.giftCard.getFirstRechangeCard();
                        HttpAppMgr.instance.giftCard.getRechangeCard();
                    }
                }
                if (data.ContainsKey("bndyb"))
                {
                    PlayerModel.getInstance().gift = data["bndyb"];
                }
                UIClient.instance.dispatchEvent(GameEvent.Create(UI_EVENT.ON_MONEY_CHANGE, this, data));
            }
            bool new_itm = true;

            if (data.ContainsKey("new_itm"))
            {
                new_itm = data["new_itm"];
            }
            if (data.ContainsKey("add"))
            {
                //a3_BagModel.getInstance().removetype();
                int     m    = 0;
                Variant info = data["add"];
                foreach (Variant item in info._arr)
                {
                    a3_BagItemData itemData = new a3_BagItemData();
                    itemData.id   = item["id"];
                    itemData.tpid = item["tpid"];
                    itemData.num  = item["cnt"];
                    itemData.bnd  = item["bnd"];

                    if (a3_BagModel.getInstance().Items.ContainsKey(item["id"]))
                    {
                        m = a3_BagModel.getInstance().Items[item["id"]].num;
                    }
                    if (item.ContainsKey("mark"))
                    {
                        itemData.ismark = item["mark"];
                    }
                    itemData.isEquip = false;
                    if (new_itm)
                    {
                        itemData.isNew = true;
                    }
                    else
                    {
                        itemData.isNew = false;
                    }
                    if (item.ContainsKey("stone_att"))
                    {
                        itemData.isrunestone = true;
                        foreach (Variant i in item["stone_att"]._arr)
                        {
                            itemData.runestonedata.runeston_att = new Dictionary <int, int>();
                            int att_type  = i["att_type"];
                            int att_value = i["att_value"];
                            itemData.runestonedata.runeston_att[att_type] = att_value;
                        }
                    }
                    else
                    {
                        itemData.isrunestone = false;
                    }
                    if (item.ContainsKey("intensify_lv"))
                    {
                        a3_EquipModel.getInstance().equipData_read(itemData, item);
                    }
                    if (item.ContainsKey("talent"))
                    {
                        itemData.isSummon = true;
                        itemData          = A3_SummonModel.getInstance().GetSummonData(itemData, item);
                    }
                    a3_BagModel.getInstance().addItem(itemData);

                    if (off_line_exp.instance != null)
                    {
                        if (off_line_exp.instance.offline == true)
                        {
                            off_line_exp.instance.offline_item.Add(itemData);
                            if (off_line_exp.instance.fenjie.isOn == false)
                            {
                                flytxt.instance.fly(ContMgr.getCont("BagProxy_getequip") + a3_BagModel.getInstance().getItemXml(item["tpid"]).getString("item_name"));
                            }
                            else
                            {
                                flytxt.instance.fly(ContMgr.getCont("BagProxy_geteitem") + a3_BagModel.getInstance().getItemXml(item["tpid"]).getString("item_name") + "x" + (item["cnt"] - m));
                            }
                        }
                    }
                    if (A3_SummonProxy.getInstance().getNewSum)
                    {
                        A3_SummonProxy.getInstance().getNewSum = false;
                        //dispatchEvent(GameEvent.Create(EVENT_GET_SUM, this, item));
                        if (a3_summon_tujian.instans != null)
                        {
                            a3_summon_tujian.instans.ongetsum(itemData);
                        }
                    }

                    //添加魔晶
                    //if (itemData.tpid == 1540)
                    //{
                    //    if (a3_expbar.instance != null) a3_expbar.instance.CheckNewSkill();
                    //}
                }
                //if (off_line_exp.instance?.offline == true)
                //{
                //    if (off_line_exp.instance.offline_item != null)
                //    {
                //        foreach (var v in off_line_exp.instance.offline_item)
                //        {
                //            a3_ItemData item = a3_BagModel.getInstance().getItemDataById((uint)v.tpid);
                //            GameObject go = IconImageMgr.getInstance().createA3ItemIconTip(itemid: (uint)v.tpid, num: v.num);
                //            flytxt.instance.fly(null, 6, showIcon: go);
                //        }
                //    }
                //    off_line_exp.instance.offline = false;
                //    off_line_exp.instance.offline_item.Clear();
                //}

                if (a3_role.instan != null)
                {
                    dispatchEvent(GameEvent.Create(EVENT_USE_DYE, this, data));
                }
            }
            if (data.ContainsKey("modcnts"))
            {
                int     m    = 0;
                Variant info = data["modcnts"];
                foreach (Variant item in info._arr)
                {
                    a3_BagItemData itemData = new a3_BagItemData();
                    itemData.id   = item["id"];
                    itemData.tpid = item["tpid"];
                    itemData.num  = item["cnt"];
                    //itemData.bnd = item["bnd"];
                    itemData.isEquip = false;
                    itemData.isNew   = false;
                    if (a3_BagModel.getInstance().Items.ContainsKey(item["id"]))
                    {
                        m = a3_BagModel.getInstance().Items[item["id"]].num;
                    }
                    // Debug.LogError(a3_BagModel.getInstance().Items[item["id"]].num + "sss" + a3_BagModel.getInstance().getItemNumByTpid(1540)+"ss"+ a3_BagModel.getInstance().getItems()[item["id"]].num);


                    if (item.ContainsKey("intensify_lv"))
                    {
                        a3_EquipModel.getInstance().equipData_read(itemData, item);
                    }
                    int n = 0;
                    if (a3_BagModel.getInstance().getItems().ContainsKey(itemData.id))
                    {
                        n = a3_BagModel.getInstance().getItems()[itemData.id].num;
                    }
                    a3_BagModel.getInstance().addItem(itemData);
                    if (item["tpid"] == 1540)
                    {
                        skill_a3.upmojing = a3_BagModel.getInstance().getItemNumByTpid(1540);//魔晶剩余总量
                    }

                    if (off_line_exp.instance != null)
                    {
                        if (off_line_exp.instance.offline == true)
                        {
                            off_line_exp.instance.offline_item.Add(itemData);

                            flytxt.instance.fly(ContMgr.getCont("BagProxy_geteitem") + a3_BagModel.getInstance().getItemXml(item["tpid"]).getString("item_name") + "x" + (item["cnt"] - m));
                        }
                    }

                    //修改魔晶
                    //if (itemData.tpid == 1540 && n < itemData.num)
                    //{
                    //    if (a3_expbar.instance != null) a3_expbar.instance.CheckNewSkill();
                    //}
                }
            }
            if (data.ContainsKey("rmvids"))
            {
                //a3_BagModel.getInstance().addtype();
                Variant info = data["rmvids"];
                foreach (uint id in info._arr)
                {
                    a3_BagModel.getInstance().removeItem(id);
                }
            }

            if (data.ContainsKey("rmvids") || data.ContainsKey("add") || data.ContainsKey("modcnts"))
            {
                dispatchEvent(GameEvent.Create(EVENT_ITEM_CHANGE, this, data));
                //if (a3_bag.indtans) { a3_bag.indtans.onItemChange(data); }
                if (isRanse)
                {
                    dispatchEvent(GameEvent.Create(EVENT_USE_DYE, this, data));
                    isRanse = false;
                }
            }

            if (data.ContainsKey("nobpt"))
            {//声望点
                if ((data["nobpt"] > PlayerModel.getInstance().nobpt))
                {
                    flytxt.instance.fly(ContMgr.getCont("BagProxy_nobpt") + (data["nobpt"] - PlayerModel.getInstance().nobpt));
                }
                PlayerModel.getInstance().nobpt = data["nobpt"];
            }
            if (data.ContainsKey("energy"))
            {//体力
                MapModel.getInstance().energy = data["energy"];
                //if (fb_3d.instance != null)
                //    fb_3d.instance.refreshEnergy();

                //if (fb_energy.instance != null)
                //    fb_energy.instance.refresh();
            }
        }
Exemplo n.º 18
0
        private bool Execute(TaskData taskData, bool checkNextStep, bool checkItems, bool clickAuto)
        {
            if (taskData.taskT == TaskType.CLAN && A3_LegionModel.getInstance().myLegion.id == 0)
            {
                flytxt.instance.fly(ContMgr.getCont("a3_task_auto_nocy"));
                return(false);
            }
            //这里将任务的自动改成只读配置表(待测试)
            bool forceMove = taskData.next_step;

            if (forceMove || clickAuto)
            {
                if (SelfRole.fsm.Autofighting)
                {
                    SelfRole.fsm.Stop();
                    StateInit.Instance.Origin = Vector3.zero;
                }
            }
            else
            {
                return(false);
            }

            int npcId = 0;
            int mapId = 0;
            int posX  = 0;
            int posY  = 0;


            SXML taskXml = XMLMgr.instance.GetSXML("task.Task", "id==" + taskData.taskId);

            if (taskXml == null)
            {
                debug.Log("任务Id错误::" + taskData.taskId);
                return(false);
            }
            if (taskData.isComplete && taskData.taskT != TaskType.DAILY)
            {
                if (taskXml.getInt("complete_way") == 3)
                {
                    A3_TaskProxy.getInstance().SendGetAward();
                    return(true);
                }
                npcId = taskXml.getInt("complete_npc_id");
                SXML npcsXml = XMLMgr.instance.GetSXML("npcs.npc", "id==" + npcId);
                if (npcsXml != null)
                {
                    mapId = npcsXml.getInt("map_id");
                }
                List <string> listDialog = new List <string>();

                string strDialog = taskXml.getString("complete_dialog");
                strDialog = GameFramework.StringUtils.formatText(strDialog);
                string[] listTempDia = strDialog.Split(';');
                listDialog = listTempDia.ToList <string>();

                tarNpcId = npcId;
                //if(forceMove)
                //InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                //{
                //    mapId = mapId,
                //    check_beforeShow = true,
                //    handle_customized_afterTransmit = () => SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc)
                //});
                if (!PlayerModel.getInstance().inFb&& mapId != GRMap.instance.m_nCurMapID && MapModel.getInstance().dicMappoint.ContainsKey(mapId) && MapModel.getInstance().dicMappoint[mapId] != GRMap.instance.m_nCurMapID)
                {
                    SelfRole.Transmit(toid: MapModel.getInstance().dicMappoint[mapId], after: () => SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc, taskmove: true), taskTrans: true);
                }
                else
                {
                    SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc, taskmove: true);
                }
            }
            else
            {
                mapId = taskXml.getInt("tasking_map_id");
                posX  = taskXml.getInt("target_coordinate_x");
                posY  = taskXml.getInt("target_coordinate_y");
                float mapY = taskXml.getFloat("map_y");
                mapY = (mapY == -1 ? 0 : mapY);
                Vector3 pos = new Vector3(posX, mapY, posY);
                switch (taskData.targetType)
                {
                case TaskTargetType.DODAILY:     /*页面切换到每日任务*/
                    ArrayList arr          = new ArrayList();
                    var       tasks        = A3_TaskModel.getInstance().GetDicTaskData();
                    bool      hasDailyTask = false;
                    int       i            = 0;
                    for (List <int> idx = new List <int>(tasks.Keys); i < tasks.Count; i++)
                    {
                        if (hasDailyTask = tasks[idx[i]].taskT == TaskType.DAILY)
                        {
                            break;
                        }
                    }
                    if (hasDailyTask /*tasks.Count(v => v.Value.taskT == TaskType.DAILY) > 0*/)
                    {
                        List <int> k = tasks.Keys.ToList();
                        for (i = 0; i < k.Count; i++)
                        {
                            if (tasks[k[i]].taskT == TaskType.DAILY)
                            {
                                arr.Add(tasks[k[i]].taskId);
                            }
                        }
                        InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_TASK, arr);
                        //MonsterMgr._inst.taskMonId = XMLMgr.instance.GetSXML("task.Task", "id==" + taskData.taskId)?.getInt("target_param2") ?? 0;
                    }
                    break;

                case TaskTargetType.FRIEND:     /*关闭当前页面,弹出好友页面*/
                    if (a3_liteMinimap.instance)
                    {
                        a3_liteMinimap.instance.ZidongTask = false;
                    }
                    arr = new ArrayList();
                    arr.Add(1 /* index of friend panel*/);
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SHEJIAO, arr);
                    break;

                case TaskTargetType.WING:     /*关闭当前页面,弹出飞翼页面*/
                    if (a3_liteMinimap.instance)
                    {
                        a3_liteMinimap.instance.ZidongTask = false;
                    }
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_WIBG_SKIN);
                    break;

                case TaskTargetType.GETEXP:    /*卡级任务、转生任务*/

                    debug.Log("当前是转生等级任务");
                    StateAutoMoveToPos.Instance.stopdistance = 0.3f;
                    int zs           = int.Parse(taskXml.getString("target_param2").Split(',')[0]);
                    int ls           = int.Parse(taskXml.getString("target_param2").Split(',')[1]);
                    int trriger_type = int.Parse(taskXml.getString("trigger"));
                    if (trriger_type == 1)
                    {
                        if (a3_liteMinimap.instance)
                        {
                            a3_liteMinimap.instance.ZidongTask = false;
                        }
                        InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_WANTLVUP);
                    }
                    else
                    {
                        bool b       = true;
                        int  pp      = PlayerModel.getInstance().profession;
                        uint pl      = PlayerModel.getInstance().lvl;
                        uint pz      = PlayerModel.getInstance().up_lvl;
                        uint exp     = PlayerModel.getInstance().exp;
                        uint needExp = ResetLvLModel.getInstance().getNeedExpByCurrentZhuan(pp, pz);
                        uint needLvL = ResetLvLModel.getInstance().getNeedLvLByCurrentZhuan(pp, pz);
                        if (pz >= 10)
                        {
                            break;              //10转之后无法再次转生
                        }
                        if (needLvL > pl)
                        {
                            b = false;
                        }
                        if (b)
                        {
                            npcId = XMLMgr.instance.GetSXML("task.zhuan_npc").getInt("id");
                            SXML npcsXml = XMLMgr.instance.GetSXML("npcs.npc", "id==" + npcId);
                            if (npcsXml != null)
                            {
                                mapId = npcsXml.getInt("map_id");
                            }

                            List <string> listDialog = new List <string>();

                            string strDialog = taskXml.getString("target_dialog");
                            strDialog = GameFramework.StringUtils.formatText(strDialog);
                            string[] listTempDia = strDialog.Split(';');
                            listDialog = listTempDia.ToList <string>();

                            //if (GRMap.instance != null)
                            //{
                            //    InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                            //    {
                            //        mapId = mapId,
                            //        check_beforeShow = true,
                            //        handle_customized_afterTransmit = () => SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc)
                            //    });
                            //}
                            if (!PlayerModel.getInstance().inFb&& mapId != GRMap.instance.m_nCurMapID && MapModel.getInstance().dicMappoint.ContainsKey(mapId) && MapModel.getInstance().dicMappoint[mapId] != GRMap.instance.m_nCurMapID)
                            {
                                SelfRole.Transmit(toid: MapModel.getInstance().dicMappoint[mapId], after: () => SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc, taskmove: true), taskTrans: true);
                            }
                            else
                            {
                                SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc, taskmove: true);
                            }
                            //InterfaceMgr.getInstance().open(InterfaceMgr.A3_RESETLVL);
                        }
                        else
                        {
                            if (a3_liteMinimap.instance)
                            {
                                a3_liteMinimap.instance.ZidongTask = false;
                            }
                            InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_WANTLVUP);
                        }
                    }
                    break;

                case TaskTargetType.VISIT:    /*访问(无条件)*/
                {
                    StateAutoMoveToPos.Instance.stopdistance = 2f;
                    npcId = taskXml.getInt("target_param2");
                    SXML npcsXml = XMLMgr.instance.GetSXML("npcs.npc", "id==" + npcId);
                    if (npcsXml != null)
                    {
                        mapId = npcsXml.getInt("map_id");
                    }

                    List <string> listDialog = new List <string>();
                    string        strDialog  = taskXml.getString("target_dialog");
                    strDialog = GameFramework.StringUtils.formatText(strDialog);
                    string[] listTempDia = strDialog.Split(';');
                    listDialog = listTempDia.ToList <string>();

                    tarNpcId = npcId;
                    if (GRMap.instance != null)
                    {
                        //InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                        //{
                        //    mapId = mapId,
                        //    check_beforeShow = true,
                        //    handle_customized_afterTransmit = () => SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc)
                        //});
                        if (!PlayerModel.getInstance().inFb&& mapId != GRMap.instance.m_nCurMapID && MapModel.getInstance().dicMappoint.ContainsKey(mapId) && MapModel.getInstance().dicMappoint[mapId] != GRMap.instance.m_nCurMapID)
                        {
                            SelfRole.Transmit(toid: MapModel.getInstance().dicMappoint[mapId], after: () => SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc, taskmove: true), taskTrans: true);
                        }
                        else
                        {
                            SelfRole.moveToNPc(mapId, npcId, listDialog, OnTalkWithNpc, taskmove: true);
                        }
                    }
                }
                break;

                case TaskTargetType.KILL:    /*杀怪类*/
                    //StateAutoMoveToPos.Instance.stopdistance = 2.0f;
                    SelfRole.UnderTaskAutoMove = true;
                    onTaskSearchMon            = taskData.taskT == TaskType.MAIN;
                    int _taskId;
                    if (PlayerModel.getInstance().task_monsterId.ContainsKey(taskData.taskId))
                    {
                        if (!PlayerModel.getInstance().task_monsterIdOnAttack.ContainsKey(taskData.taskId))
                        {
                            PlayerModel.getInstance().task_monsterIdOnAttack.Add(
                                key: taskData.taskId,
                                value: PlayerModel.getInstance().task_monsterId[taskData.taskId]
                                );
                        }
                        PlayerModel.getInstance().task_monsterId.Remove(taskData.taskId);
                        _taskId = taskData.taskId;
                    }
                    else
                    {
                        _taskId = A3_TaskModel.getInstance().GetTaskXML().GetNode("Task", "id==" + taskData.taskId).getInt("target_param2");
                        PlayerModel.getInstance().task_monsterIdOnAttack.Add(
                            key: taskData.taskId,
                            value: _taskId
                            );
                    }
                    SXML _taskXml = XMLMgr.instance.GetSXML("task.Task", "id==" + taskData.taskId);
                    //InterfaceMgr.getInstance().open(InterfaceMgr.TRANSMIT_PANEL, (ArrayList)new TransmitData
                    //{
                    //    mapId = mapId,
                    //    check_beforeShow = true,
                    //    handle_customized_afterTransmit = () =>
                    //    {
                    //        Vector3 fightOrigin = pos;
                    //        StateInit.Instance.Origin = fightOrigin;
                    //        SelfRole.moveto(mapId, pos, () =>
                    //        {
                    //            SelfRole.fsm.StartAutofight();
                    //            MonsterMgr._inst.taskMonId = _taskXml.getInt("target_param2");
                    //        }, stopDis: 2.0f);
                    //    }
                    //});
                    Action afterTransmit = () => {
                        Vector3 fightOrigin = pos;
                        StateInit.Instance.Origin = fightOrigin;
                        SelfRole.moveto(mapId, pos, () =>
                        {
                            SelfRole.fsm.StartAutofight();
                            MonsterMgr._inst.taskMonId = _taskXml.getInt("target_param2");
                        }, stopDis: 2.0f, taskmove: true);
                    };
                    if (!PlayerModel.getInstance().inFb&& mapId != GRMap.instance.m_nCurMapID && MapModel.getInstance().dicMappoint.ContainsKey(mapId) && MapModel.getInstance().dicMappoint[mapId] != GRMap.instance.m_nCurMapID)
                    {
                        SelfRole.Transmit(toid: MapModel.getInstance().dicMappoint[mapId], after: afterTransmit, taskTrans: true);
                    }
                    else
                    {
                        SelfRole.WalkToMap(mapId, pos, afterTransmit, taskmove: true);
                    }
                    break;

                case TaskTargetType.COLLECT:

                    //Action afterTransmit_collect = () =>
                    //{
                    //    StateAutoMoveToPos.Instance.stopdistance = 0.3f;
                    //    SelfRole.moveto(mapId, pos, () => SelfRole.fsm.StartAutoCollect());
                    //};
                    Action afterTransmit_collect = () => SelfRole.WalkToMap(mapId, pos, SelfRole.fsm.StartAutoCollect, taskmove: true);
                    if (!PlayerModel.getInstance().inFb&& mapId != GRMap.instance.m_nCurMapID && MapModel.getInstance().dicMappoint.ContainsKey(mapId) && MapModel.getInstance().dicMappoint[mapId] != GRMap.instance.m_nCurMapID)
                    {
                        SelfRole.Transmit(toid: MapModel.getInstance().dicMappoint[mapId], after: afterTransmit_collect, taskTrans: true);
                    }
                    else
                    {
                        afterTransmit_collect();
                    }
                    break;

                case TaskTargetType.FB:
                    if (a3_liteMinimap.instance)
                    {
                        a3_liteMinimap.instance.ZidongTask = false;
                    }
                    int fbid = taskXml.getInt("target_param2");
                    //StateAutoMoveToPos.Instance.stopdistance = 0.3f;
                    if (GRMap.instance.m_nCurMapID == mapId || GameRoomMgr.getInstance().curRoom is PlotRoom)
                    {
                        SelfRole.moveto(mapId, pos, () => SelfRole.fsm.StartAutofight(), stopDis: 2.0f, taskmove: true /* 副本中开始战斗的停止距离 */);
                    }
                    else
                    {
                        Variant sendData = new Variant();
                        sendData["npcid"]    = 0;
                        sendData["ltpid"]    = fbid;
                        sendData["diff_lvl"] = 1;
                        int  levelinfoid = taskXml.getInt("level_info");
                        var  tainf       = XMLMgr.instance.GetSXML("task.level_info", "id==" + levelinfoid);
                        bool guide       = (taskXml.getInt("guide") == 1);
                        int  type        = taskXml.getInt("level_yw");
                        if (type == 1)
                        {
                            MsgBoxMgr.getInstance().showTask_fb_confirm(tainf.getString("title"), tainf.getString("desc"),
                                                                        guide, a3_ygyiwuModel.getInstance().GetYiWu_God(a3_ygyiwuModel.getInstance().nowGod_id).need_zdl, () => LevelProxy.getInstance().sendCreate_lvl(sendData));
                        }
                        else
                        {
                            MsgBoxMgr.getInstance().showTask_fb_confirm(tainf.getString("title"), tainf.getString("desc"),
                                                                        guide, () => LevelProxy.getInstance().sendCreate_lvl(sendData));
                        }
                    }
                    break;

                case TaskTargetType.WAIT_POINT_GIVEN:   /*在指定区域读条*/
                case TaskTargetType.GET_ITEM_GIVEN:     /*收集指定道具*/
                case TaskTargetType.KILL_MONSTER_GIVEN: /*打指定怪物*/
                    DealByType(taskData, checkItems);
                    break;
                }
                SXML _taskXML = XMLMgr.instance.GetSXML("task.Task", "id==" + taskData.taskId);
                if (SelfRole.UnderTaskAutoMove = taskData.targetType == TaskTargetType.KILL)
                {
                    StateAutoMoveToPos.Instance.stopdistance = 2.0f;
                    Vector3 fightOrigin = new Vector3(
                        x: _taskXML.getInt("target_coordinate_x"),
                        y: 0,
                        z: _taskXML.getInt("target_coordinate_y")
                        );
                    StateInit.Instance.Origin = fightOrigin;
                }
                if (taskData.targetType == TaskTargetType.KILL || taskData.targetType == TaskTargetType.DODAILY)
                {
                    int monId = _taskXML.getInt("target_param2");
                    if (monId != -1)
                    {
                        MonsterMgr._inst.taskMonId = monId;
                    }
                }
            }
            return(true);
        }
Exemplo n.º 19
0
        private void onItemChange(Variant data)
        {
            debug.Log(data.dump() + ":::::::::::::::");
            bool flag = data.ContainsKey("money") || data.ContainsKey("yb") || data.ContainsKey("bndyb");

            if (flag)
            {
                bool flag2 = data.ContainsKey("money");
                if (flag2)
                {
                    bool flag3 = data["money"] > ModelBase <PlayerModel> .getInstance().money;

                    if (flag3)
                    {
                        flytxt.instance.fly("金币+ " + (data["money"] - ModelBase <PlayerModel> .getInstance().money), 0, default(Color), null);
                        bool flag4 = a3_insideui_fb.instance != null && data.Count == 1;
                        if (flag4)
                        {
                            a3_insideui_fb.instance.SetInfMoney((int)(data["money"] - ModelBase <PlayerModel> .getInstance().money));
                        }
                    }
                    else
                    {
                        debug.Log("消耗金币" + (ModelBase <PlayerModel> .getInstance().money - data["money"]));
                        skill_a3.upgold = (int)(ModelBase <PlayerModel> .getInstance().money - data["money"]);
                    }
                    ModelBase <PlayerModel> .getInstance().money = data["money"];
                }
                bool flag5 = data.ContainsKey("yb");
                if (flag5)
                {
                    uint gold = ModelBase <PlayerModel> .getInstance().gold;

                    ModelBase <PlayerModel> .getInstance().gold = data["yb"];

                    bool flag6 = gold < data["yb"] && HttpAppMgr.instance != null && HttpAppMgr.instance.giftCard != null;
                    if (flag6)
                    {
                        HttpAppMgr.instance.giftCard.getFirstRechangeCard();
                        HttpAppMgr.instance.giftCard.getRechangeCard();
                    }
                }
                bool flag7 = data.ContainsKey("bndyb");
                if (flag7)
                {
                    ModelBase <PlayerModel> .getInstance().gift = data["bndyb"];
                }
                UIClient.instance.dispatchEvent(GameEvent.Create(9005u, this, data, false));
            }
            bool flag8 = true;
            bool flag9 = data.ContainsKey("new_itm");

            if (flag9)
            {
                flag8 = data["new_itm"];
            }
            bool flag10 = data.ContainsKey("add");

            if (flag10)
            {
                int     num     = 0;
                Variant variant = data["add"];
                foreach (Variant current in variant._arr)
                {
                    a3_BagItemData a3_BagItemData = default(a3_BagItemData);
                    a3_BagItemData.id   = current["id"];
                    a3_BagItemData.tpid = current["tpid"];
                    a3_BagItemData.num  = current["cnt"];
                    a3_BagItemData.bnd  = current["bnd"];
                    bool flag11 = ModelBase <a3_BagModel> .getInstance().Items.ContainsKey(current["id"]);

                    if (flag11)
                    {
                        num = ModelBase <a3_BagModel> .getInstance().Items[current["id"]].num;
                    }
                    bool flag12 = current.ContainsKey("mark");
                    if (flag12)
                    {
                        a3_BagItemData.ismark = current["mark"];
                    }
                    a3_BagItemData.isEquip = false;
                    bool flag13 = flag8;
                    if (flag13)
                    {
                        a3_BagItemData.isNew = true;
                    }
                    else
                    {
                        a3_BagItemData.isNew = false;
                    }
                    bool flag14 = current.ContainsKey("stone_att");
                    if (flag14)
                    {
                        a3_BagItemData.isrunestone = true;
                        foreach (Variant current2 in current["stone_att"]._arr)
                        {
                            a3_BagItemData.runestonedata.runeston_att = new Dictionary <int, int>();
                            int key   = current2["att_type"];
                            int value = current2["att_value"];
                            a3_BagItemData.runestonedata.runeston_att[key] = value;
                        }
                    }
                    else
                    {
                        a3_BagItemData.isrunestone = false;
                    }
                    bool flag15 = current.ContainsKey("intensify_lv");
                    if (flag15)
                    {
                        a3_BagItemData = ModelBase <a3_EquipModel> .getInstance().equipData_read(a3_BagItemData, current);
                    }
                    a3_BagItemData = ModelBase <A3_SummonModel> .getInstance().GetSummonData(a3_BagItemData, current);

                    ModelBase <a3_BagModel> .getInstance().addItem(a3_BagItemData);

                    bool flag16 = off_line_exp.instance != null;
                    if (flag16)
                    {
                        bool offline = off_line_exp.instance.offline;
                        if (offline)
                        {
                            off_line_exp.instance.offline_item.Add(a3_BagItemData);
                            bool flag17 = !off_line_exp.instance.fenjie.isOn;
                            if (flag17)
                            {
                                flytxt.instance.fly("获得装备:" + ModelBase <a3_BagModel> .getInstance().getItemXml(current["tpid"]).getString("item_name"), 0, default(Color), null);
                            }
                            else
                            {
                                flytxt.instance.fly(string.Concat(new object[]
                                {
                                    "获得道具:",
                                    ModelBase <a3_BagModel> .getInstance().getItemXml(current["tpid"]).getString("item_name"),
                                    "x",
                                    current["cnt"] - num
                                }), 0, default(Color), null);
                            }
                        }
                    }
                }
                bool flag18 = a3_role.instan != null;
                if (flag18)
                {
                    base.dispatchEvent(GameEvent.Create(BagProxy.EVENT_USE_DYE, this, data, false));
                }
            }
            bool flag19 = data.ContainsKey("modcnts");

            if (flag19)
            {
                int     num2     = 0;
                Variant variant2 = data["modcnts"];
                foreach (Variant current3 in variant2._arr)
                {
                    a3_BagItemData a3_BagItemData2 = default(a3_BagItemData);
                    a3_BagItemData2.id      = current3["id"];
                    a3_BagItemData2.tpid    = current3["tpid"];
                    a3_BagItemData2.num     = current3["cnt"];
                    a3_BagItemData2.isEquip = false;
                    a3_BagItemData2.isNew   = false;
                    bool flag20 = ModelBase <a3_BagModel> .getInstance().Items.ContainsKey(current3["id"]);

                    if (flag20)
                    {
                        num2 = ModelBase <a3_BagModel> .getInstance().Items[current3["id"]].num;
                    }
                    bool flag21 = current3.ContainsKey("intensify_lv");
                    if (flag21)
                    {
                        a3_BagItemData2 = ModelBase <a3_EquipModel> .getInstance().equipData_read(a3_BagItemData2, current3);
                    }
                    bool flag22 = ModelBase <a3_BagModel> .getInstance().getItems(false).ContainsKey(a3_BagItemData2.id);

                    if (flag22)
                    {
                        int num3 = ModelBase <a3_BagModel> .getInstance().getItems(false)[a3_BagItemData2.id].num;
                    }
                    ModelBase <a3_BagModel> .getInstance().addItem(a3_BagItemData2);

                    bool flag23 = current3["tpid"] == 1540;
                    if (flag23)
                    {
                        skill_a3.upmojing = ModelBase <a3_BagModel> .getInstance().getItemNumByTpid(1540u);
                    }
                    bool flag24 = off_line_exp.instance != null;
                    if (flag24)
                    {
                        bool offline2 = off_line_exp.instance.offline;
                        if (offline2)
                        {
                            off_line_exp.instance.offline_item.Add(a3_BagItemData2);
                            flytxt.instance.fly(string.Concat(new object[]
                            {
                                "获得道具:",
                                ModelBase <a3_BagModel> .getInstance().getItemXml(current3["tpid"]).getString("item_name"),
                                "x",
                                current3["cnt"] - num2
                            }), 0, default(Color), null);
                        }
                    }
                }
            }
            bool flag25 = data.ContainsKey("rmvids");

            if (flag25)
            {
                Variant variant3 = data["rmvids"];
                using (List <Variant> .Enumerator enumerator4 = variant3._arr.GetEnumerator())
                {
                    while (enumerator4.MoveNext())
                    {
                        uint id = enumerator4.Current;
                        ModelBase <a3_BagModel> .getInstance().removeItem(id);
                    }
                }
            }
            bool flag26 = data.ContainsKey("rmvids") || data.ContainsKey("add") || data.ContainsKey("modcnts");

            if (flag26)
            {
                base.dispatchEvent(GameEvent.Create(BagProxy.EVENT_ITEM_CHANGE, this, data, false));
                bool flag27 = this.isRanse;
                if (flag27)
                {
                    base.dispatchEvent(GameEvent.Create(BagProxy.EVENT_USE_DYE, this, data, false));
                    this.isRanse = false;
                }
            }
            bool flag28 = data.ContainsKey("nobpt");

            if (flag28)
            {
                ModelBase <PlayerModel> .getInstance().nobpt = data["nobpt"];
            }
            bool flag29 = data.ContainsKey("energy");

            if (flag29)
            {
                MapModel.getInstance().energy = data["energy"];
            }
        }
Exemplo n.º 20
0
        private void refresh()
        {
            TaskData dailyTask = ModelBase <A3_TaskModel> .getInstance().GetDailyTask();

            bool flag = dailyTask != null;

            if (flag)
            {
                this.cs_rotine.text = string.Concat(new object[]
                {
                    "(",
                    ModelBase <A3_TaskModel> .getInstance().GetTaskMaxCount(dailyTask.taskId) - dailyTask.taskCount,
                    "/",
                    ModelBase <A3_TaskModel> .getInstance().GetTaskMaxCount(dailyTask.taskId),
                    ")"
                });
                base.transform.FindChild("cells/scroll/content/routine").gameObject.SetActive(true);
            }
            else
            {
                base.transform.FindChild("cells/scroll/content/routine").gameObject.SetActive(false);
            }
            Variant variant = SvrLevelConfig.instacne.get_level_data(102u);
            int     num     = variant["daily_cnt"];
            int     num2    = 0;
            bool    flag2   = MapModel.getInstance().dFbDta.ContainsKey(102);

            if (flag2)
            {
                num2 = Mathf.Min(MapModel.getInstance().dFbDta[102].cycleCount, num);
            }
            bool flag3 = FunctionOpenMgr.instance.Check(FunctionOpenMgr.GOLD_DUNGEON, false) && num != num2;

            if (flag3)
            {
                this.cs_goldfb.text = string.Concat(new object[]
                {
                    "(",
                    num - num2,
                    "/",
                    num,
                    ")"
                });
                base.transform.FindChild("cells/scroll/content/goldfb").gameObject.SetActive(true);
            }
            else
            {
                base.transform.FindChild("cells/scroll/content/goldfb").gameObject.SetActive(false);
            }
            bool flag4 = ModelBase <A3_VipModel> .getInstance().Level > 0;

            int num3;

            if (flag4)
            {
                num3 = ModelBase <A3_VipModel> .getInstance().vip_exchange_num(3);
            }
            else
            {
                num3 = 10;
            }
            ExchangeModel instance = ModelBase <ExchangeModel> .getInstance();

            bool flag5 = (long)num3 - (long)((ulong)instance.Count) > 0L;

            if (flag5)
            {
                this.cs_getMoney.text = string.Concat(new object[]
                {
                    "(",
                    (long)num3 - (long)((ulong)instance.Count),
                    "/",
                    num3,
                    ")"
                });
                base.transform.FindChild("cells/scroll/content/dianjin").gameObject.SetActive(true);
            }
            else
            {
                base.transform.FindChild("cells/scroll/content/dianjin").gameObject.SetActive(false);
            }
        }