コード例 #1
0
        private void onInPreFB()
        {
            if (PlayerModel.getInstance().up_lvl < a3_ygyiwuModel.getInstance().Allywlist_Pre[a3_ygyiwuModel.getInstance().nowPre_id].needuplvl)
            {
                flytxt.instance.fly(ContMgr.getCont("a3_ygyiwu_canont"));
                return;
            }
            if (PlayerModel.getInstance().up_lvl == a3_ygyiwuModel.getInstance().Allywlist_Pre[a3_ygyiwuModel.getInstance().nowPre_id].needuplvl)
            {
                if (PlayerModel.getInstance().lvl < a3_ygyiwuModel.getInstance().Allywlist_Pre[a3_ygyiwuModel.getInstance().nowPre_id].needlvl)
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_ygyiwu_canont"));
                    return;
                }
            }
            debug.Log("Enter");
            Variant sendData = new Variant();

            sendData["mapid"]    = 3334;
            sendData["npcid"]    = 0;
            sendData["ltpid"]    = a3_ygyiwuModel.getInstance().nowPreFB_id;
            sendData["diff_lvl"] = 1;
            LevelProxy.getInstance().sendCreate_lvl(sendData);
            if (skill_a3._instance)
            {
                skill_a3._instance.toshilian = false;
            }
        }
コード例 #2
0
        public override void onEnd()
        {
            base.onEnd();
            data.kmNum = 0;
            isOpen     = false;
            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.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);

            LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
            //InterfaceMgr.getInstance().open(InterfaceMgr.BROADCASTING);
        }
コード例 #3
0
        public override void onEnd()
        {
            base.onEnd();
            data.kmNum = 0;
            isOpen     = false;
            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.openByLua("herohead2");
            InterfaceMgr.doCommandByLua("a1_low_fightgame.show_heroih_cs", "ui/interfaces/low/a1_low_fightgame");

            if (tragethead.instance != null)
            {
                tragethead.instance.inFB = false;
            }
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
            LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
            a1_gamejoy.inst_skillbar.m_skillbar_hp_Add_btn.gameObject.SetActive(showHpBtn);

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

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

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

            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.showbtnIcon(true);
            }
        }
コード例 #4
0
 private void GoFb()
 {
     if (TeamProxy.getInstance().MyTeamData.itemTeamDataList.Count == 1)
     {
         Variant sendData = new Variant();
         sendData["npcid"]    = 0;
         sendData["ltpid"]    = levelId;
         sendData["diff_lvl"] = curSelectedDiff;
         a3_counterpart.lvl   = sendData["diff_lvl"];
         LevelProxy.getInstance().sendCreate_lvl(sendData);
     }
     else
     {
         TeamProxy.getInstance().SendReady(true, levelId, curSelectedDiff);
     }
 }
コード例 #5
0
        public override void onEnd()
        {
            base.onEnd();
            isOpen = false;

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

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

            if (a3_liteMinimap.instance)
            {
                a3_liteMinimap.instance.showbtnIcon(true);
            }
            if (a3_herohead.instance)
            {
                a3_herohead.instance.showbtnIcon(true);
            }
            if (a3_equipup.instance)
            {
                a3_equipup.instance.showbtnIcom(true);
            }
            if (a1_gamejoy.inst_joystick)
            {
                a1_gamejoy.inst_joystick.show_btnIcon(true);
            }
            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", true);
            InterfaceMgr.doCommandByLua("a1_high_fightgame.showbtnIcon", "ui/interfaces/high/a1_high_fightgame", true);
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_INSIDEUI_FB);
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_LITEMINIBASEMAP);
            LevelProxy.getInstance().sendGet_lvl_cnt_info(1);
        }
コード例 #6
0
        public override void onStart(Variant svr)
        {
            base.onStart(svr);
            a3_insideui_fb.room = this;
            isOpen = true;
            data   = MapModel.getInstance().getMapDta(105);
            if (data == null)
            {
                data = new MapData();
            }
            MapModel.getInstance().AddMapDta(105, data);
            data.OnKillNumChange = (int i) => {
                if (a3_insideui_fb.instance != null)
                {
                    a3_insideui_fb.instance.SetKillNum(i);
                }
            };
            startExp = PlayerModel.getInstance().exp;
            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.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.ZHSLY);

            LevelProxy.getInstance().getAwd_zhs(1);
            if (data != null)
            {
                data.cycleCount++;
            }
        }
コード例 #7
0
        public override void init()
        {
            haveCon = this.transform.FindChild("have").gameObject;
            nullCon = this.transform.FindChild("null").gameObject;

            new BaseButton(this.transform.FindChild("have/do")).onClick = (GameObject go) => {
                a3_BagModel.getInstance().useItemByTpid(1528, 1);
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_DOUBLEEXP);
            };

            new BaseButton(this.transform.FindChild("null/do")).onClick = (GameObject go) => {
                LevelProxy.getInstance().buyAnduseExp();
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_DOUBLEEXP);
            };

            new BaseButton(transform.FindChild("null/close")).onClick     =
                new BaseButton(transform.FindChild("have/close")).onClick = (GameObject go) => {
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_DOUBLEEXP);
            };
            inText();
        }
コード例 #8
0
        private void onInGodFB()
        {
            int needExp = a3_ygyiwuModel.getInstance().GetYiWu_God(a3_ygyiwuModel.getInstance().nowGod_id).needexp;

            if (PlayerModel.getInstance().accent_exp >= needExp)
            {
                debug.Log("Enter");
                Variant sendData = new Variant();
                sendData["mapid"]    = 3334;
                sendData["npcid"]    = 0;
                sendData["ltpid"]    = a3_ygyiwuModel.getInstance().nowGodFB_id;
                sendData["diff_lvl"] = 1;
                LevelProxy.getInstance().sendCreate_lvl(sendData);
                if (skill_a3._instance)
                {
                    skill_a3._instance.toshilian = false;
                }
            }
            else
            {
                flytxt.instance.fly(ContMgr.getCont("a3_ygyiwu_canont"));
            }
        }
コード例 #9
0
        public override void onClosed()
        {
            //  InterfaceMgr.getInstance().floatUI.localScale = Vector3.one;
            destorycontain();
            openWindow();
            disposeAvatar();

            room     = null;
            _NewOne  = false;
            instance = null;
            clearAwd();
            if (closefb_way == true)
            {
                LevelProxy.getInstance().sendLeave_lvl();
            }
            if (GameObject.Find("GAME_CAMERA/myCamera"))
            {
                GameObject cameraOBJ = GameObject.Find("GAME_CAMERA/myCamera");
                if (cameraOBJ.GetComponent <DeathShader>())
                {
                    cameraOBJ.GetComponent <DeathShader>().enabled = false;
                }
            }
        }
コード例 #10
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);
        }
コード例 #11
0
        public void itempic()
        {
            destorycontain();
            if (LevelProxy.getInstance().is_open == false)
            {
                if (LevelProxy.getInstance().reward != null)
                {
                    for (int i = 0; i < LevelProxy.getInstance().reward.Count; i++)
                    {
                        GameObject objClone = GameObject.Instantiate(reward) as GameObject;
                        objClone.SetActive(true);
                        objClone.transform.SetParent(contain.transform, false);
                        itempicc = objClone.transform.FindChild("pic").gameObject;



                        int cc = LevelProxy.getInstance().reward[i].tpid;
                        // int d= LevelProxy.getInstance().reward[i].confdata.equip_level;


                        a3_ItemData item  = a3_BagModel.getInstance().getItemDataById((uint)cc);
                        int         color = item.quality;
                        if (item.equip_type != -1)
                        {
                            objClone.transform.FindChild("pic/bg").gameObject.SetActive(false);
                            objClone.transform.FindChild("pic/num").gameObject.SetActive(false);
                        }
                        else
                        {
                            objClone.transform.FindChild("pic/num").GetComponent <Text>().text = LevelProxy.getInstance().reward[i].cnt.ToString();
                        }
                        objClone.transform.FindChild("quality_bg/" + color).gameObject.SetActive(true);
                        itempicc.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite(item.file);
                    }
                }
            }
            if (LevelProxy.getInstance().is_open == true)
            {
                Dictionary <int, Rewards> rewardlist = new Dictionary <int, Rewards>();
                if (LevelProxy.getInstance().reward != null)
                {
                    foreach (Rewards it in LevelProxy.getInstance().reward)
                    {
                        if (rewardlist.ContainsKey(it.tpid))
                        {
                            rewardlist[it.tpid].cnt += it.cnt;
                        }
                        else
                        {
                            rewardlist[it.tpid] = it;
                        }
                    }
                    LevelProxy.getInstance().reward.Clear();
                }
                if (LevelProxy.getInstance().fbDrogward != null)
                {
                    foreach (Rewards it in LevelProxy.getInstance().fbDrogward)
                    {
                        if (rewardlist.ContainsKey(it.tpid))
                        {
                            rewardlist[it.tpid].cnt += it.cnt;
                        }
                        else
                        {
                            rewardlist[it.tpid] = it;
                        }
                    }
                    LevelProxy.getInstance().fbDrogward.Clear();
                }
                //if (BaseRoomItem.instance.list2.Count != 0)
                //{
                //    foreach (DropItemdta it in BaseRoomItem.instance.list2) {
                //        if (rewardlist.ContainsKey(it.tpid))
                //        {
                //            rewardlist[it.tpid].cnt += it.num;
                //        }
                //        else {
                //            Rewards ra = new Rewards();
                //            ra.tpid = it.tpid;
                //            ra.cnt = it.num;
                //            rewardlist[ra.tpid] = ra;
                //        }
                //    }
                //    BaseRoomItem.instance.list2.Clear();
                //}

                foreach (int id in rewardlist.Keys)
                {
                    GameObject objClone = GameObject.Instantiate(reward) as GameObject;
                    objClone.SetActive(true);
                    objClone.transform.SetParent(contain.transform, false);
                    itempicc = objClone.transform.FindChild("pic").gameObject;
                    itempicc.transform.FindChild("num").gameObject.SetActive(true);
                    itempicc.transform.FindChild("num").gameObject.GetComponent <Text>().text = rewardlist[id].cnt.ToString();
                    a3_ItemData item = a3_BagModel.getInstance().getItemDataById((uint)id);
                    if (item.equip_type != -1)
                    {
                        objClone.transform.FindChild("pic/bg").gameObject.SetActive(false);
                        objClone.transform.FindChild("pic/num").gameObject.SetActive(false);
                    }
                    objClone.transform.FindChild("quality_bg/" + item.quality).gameObject.SetActive(true);
                    itempicc.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite(item.file);
                }

                LevelProxy.getInstance().is_open = false;
            }
        }
コード例 #12
0
        public override void onShowed()
        {
            if (room is MLZDRoom)
            {
                //打开活动界面
                ismlzd = true;
            }

            InterfaceMgr.getInstance().closeAllWin();
            a3_insideui_fb.instance?.enter_pic2.SetActive(false);
            jjc.SetActive(false);
            jdzc.SetActive(false);
            cityWAr.SetActive(false);
            ar_result.SetActive(false);
            getGameObjectByPath("win/success").SetActive(false);
            getGameObjectByPath("state_successed").SetActive(false);
            transform.FindChild("state_successed/bg/goldNum").gameObject.SetActive(false);
            transform.FindChild("state_successed/bg/getNum").gameObject.SetActive(false);
            tip_text.SetActive(true);
            bgdefet.SetActive(false);
            bgwin.SetActive(false);
            yiwufb_defet.SetActive(false);
            //  closefb_way = false;
            transform.FindChild("btn_close/closeTime").gameObject.SetActive(false);
            //createAvatar();
            closetime  = 0;
            close_time = 0;
            Variant data = (Variant)uiData[0];

            if (data.ContainsKey("ltpid"))
            {
                ltpid = data["ltpid"];
            }
            if (data.ContainsKey("score"))
            {
                score = data["score"];
            }
            else
            {
                score = 0;
            }

            if (data.ContainsKey("close_tm"))
            {
                double ct = data["close_tm"];
                closetime = ct;
            }
            if (data.ContainsKey("win"))
            {
                int ct = data["win"];

                Transform wint = getTransformByPath("win");
                wint.gameObject.SetActive(true);
                if (ct > 0 && wint != null)
                {
                    wint.FindChild("success").gameObject.SetActive(true);
                    wint.FindChild("fail").gameObject.SetActive(false);
                }
                else if (wint != null)
                {
                    closeWindow();
                    // InterfaceMgr.getInstance().floatUI.localScale = Vector3.zero;
                    if (GameObject.Find("GAME_CAMERA/myCamera"))
                    {
                        GameObject cameraOBJ = GameObject.Find("GAME_CAMERA/myCamera");
                        if (!cameraOBJ.GetComponent <DeathShader>())
                        {
                            cameraOBJ.AddComponent <DeathShader>();
                        }
                        else
                        {
                            cameraOBJ.GetComponent <DeathShader>().enabled = true;
                        }
                    }
                    wint.FindChild("success").gameObject.SetActive(false);
                    wint.FindChild("fail").gameObject.SetActive(true);


                    getGameObjectByPath("state_successed").SetActive(false);
                }
                if (data.ContainsKey("item_drop"))
                {
                    ct = data["item_drop"]._arr.Count;
                }
                else
                {
                    ct = 0;
                }
                if (ct >= 0)
                {
                    getGameObjectByPath("state_successed").SetActive(true);
                    //getGameObjectByPath("state_failed").SetActive(false);

                    finishTiem = getComponentByPath <Text>("state_successed/bg/fnTime/time");
                    kmNum      = getComponentByPath <Text>("state_successed/bg/kmNum/num");
                    getNum     = getComponentByPath <Text>("state_successed/bg/getNum/num");
                    goldNum    = getComponentByPath <Text>("state_successed/bg/goldNum/num");
                }
                else
                {
                    getGameObjectByPath("state_successed").SetActive(false);
                    //getGameObjectByPath("state_failed").SetActive(true);
                    //finishTiem = getComponentByPath<Text>("state_failed/bg/fnTime/time");
                    //kmNum = getComponentByPath<Text>("state_failed/bg/kmNum/num");
                    //getNum = getComponentByPath<Text>("state_failed/bg/getNum/num");
                    //goldNum = getComponentByPath<Text>("state_failed/bg/goldNum/num");
                }
            }

            finishtime = 0;
            if (uiData.Count > 1)
            {
                finishtime = (double)uiData[1];
            }
            //TimeSpan ts = new TimeSpan(0, 0, (int)finishtime);

            float tss = 0;
            uint  tkn = 0, ten = 0, tgn = 0;
            int   ach = 0, mon = 0;

            DOTween.To(() => tss, (float s) =>
            {
                TimeSpan ts     = new TimeSpan(0, 0, (int)s);
                finishTiem.text = (int)ts.TotalHours + ":" + (int)ts.Minutes + ":" + (int)ts.Seconds;
            }, (float)finishtime, 1f);

            evaluation(score);

            kmnum = 0;
            if (uiData.Count > 2)
            {
                kmnum = (int)uiData[2];
            }
            DOTween.To(() => (int)tkn, (int s) =>
            {
                tkn        = (uint)s;
                kmNum.text = tkn.ToString();
            }, kmnum, 1f);


            if (room is MoneyRoom)
            {
                if (room != null)
                {
                    transform.FindChild("state_successed/bg/goldNum").gameObject.SetActive(true);
                }
            }


            if (room is ExpRoom)
            {
                if (room != null)
                {
                    transform.FindChild("state_successed/bg/getNum").gameObject.SetActive(true);
                }
            }
            //if (room != null)
            //{
            //    goldnum = room.goldnum;
            //}
            //DOTween.To(() => tgn, (uint s) =>
            //{
            //    tgn = s;
            //    goldNum.text = tgn.ToString();
            //}, goldnum, 1f);

            //}


            if (room is PVPRoom)
            {
                if (room != null)
                {
                    getach = room.getach;
                }
                DOTween.To(() => ach, (int s) =>
                {
                    ach         = s;
                    getNum.text = ach.ToString();
                }, getach, 1f);

                if (room != null)
                {
                    getmoney = room.getExp;
                }
                DOTween.To(() => mon, (int s) =>
                {
                    mon          = s;
                    goldNum.text = mon.ToString();
                }, getmoney, 1f);

                MapProxy.getInstance().Win_uiData = "sports_jjc";
                MapProxy.getInstance().openWin    = InterfaceMgr.A3_SPORTS;
            }
            else
            {
                if (room != null)
                {
                    getnum = room.expnum;
                }
                DOTween.To(() => ten, (uint s) =>
                {
                    ten         = s;
                    getNum.text = ten.ToString();
                }, getnum, 1f);
                if (room != null)
                {
                    //goldnum = room.goldnum;
                    goldnum = a3_insideui_fb.AllMoneynum;
                }
                DOTween.To(() => tgn, (uint s) =>
                {
                    tgn          = s;
                    goldNum.text = tgn.ToString();
                }, goldnum, 1f);
            }
            //if (data.ContainsKey("ltpid")) {
            //    int tid = data["ltpid"];
            //    if (tid == 101) {
            //        getNum.text = "获得经验量:" + getnum;
            //    }
            //    else if (tid == 102) {
            //        getNum.text = "获得金币量:" + getnum;
            //    }
            //}
            _NewOne     = true;
            instance    = this;
            room.getExp = 0;
            room.getach = 0;

            Variant d = SvrLevelConfig.instacne.get_level_data(ltpid);

            if (data["win"] == 0 || room is PVPRoom || d.ContainsKey("shengwu") || room is PlotRoom || room is ExpRoom || room is MoneyRoom || room is FSWZRoom || room is MLZDRoom || room is JDZCRoom || room is CityWarRoom)
            {
                a3_liteMinimap.instance?.taskinfo?.SetActive(true);
                a3_insideui_fb.instance?.enter_pic2?.SetActive(false);

                LevelProxy.getInstance().open_pic = false;
                closefb_way = true;
                //InterfaceMgr.getInstance().close(InterfaceMgr.TARGET_HEAD);
            }
            else
            {
                closefb_way = false;
            }


            if (closefb_way == true)
            {
                close_time = 0;
                transform.FindChild("btn_close/closeTime").gameObject.SetActive(true);
            }
            if (closefb_way == false)
            {
                close_time = (double)closetime - (double)muNetCleint.instance.CurServerTimeStamp - 3;
                transform.FindChild("btn_close/closeTime").gameObject.SetActive(false);
            }

            if (d.ContainsKey("shengwu") && d.ContainsKey("icon"))
            {
                shengwu = d["shengwu"];
                icon    = d["icon"];
                if (data["win"] == 0)
                {
                    jjc.SetActive(false);
                    jdzc.SetActive(false);
                    cityWAr.SetActive(false);
                    ar_result.SetActive(false);
                    getGameObjectByPath("win").SetActive(false);
                    getGameObjectByPath("win/success").SetActive(false);
                    getGameObjectByPath("state_successed").SetActive(false);
                    transform.FindChild("state_successed/bg/goldNum").gameObject.SetActive(false);
                    bgdefet.SetActive(false);
                    bgwin.SetActive(false);
                    yiwufb_defet.SetActive(true);
                    return;
                }
            }
            else
            {
                shengwu = 0;
            }
            if (data["win"] == 1 && d.ContainsKey("shengwu") && d.ContainsKey("des"))
            {
                icon1 = d["des"];
                string[] codess = icon1.Split(',');
                // SXML xml = XMLMgr.instance.GetSXML("accent_relic.relic", "type=="+codess[0].ToString());
                //mid = xml.getUint("obj");
                List <SXML> listSxml = null;
                if (listSxml == null)
                {
                    listSxml = XMLMgr.instance.GetSXMLList("accent_relic.relic");
                    //List<SXML> xml2 = XMLMgr.instance.GetSXMLList("accent_relic.relic", "carr=="+ PlayerModel.getInstance().profession);     , "carr==" + PlayerModel.getInstance().profession
                    for (int i = 0; i < listSxml.Count; i++)
                    {
                        if (listSxml[i].getInt("carr") == PlayerModel.getInstance().profession&& listSxml[i].getString("type") == codess[0].ToString())
                        {
                            List <SXML> god_id = listSxml[i].GetNodeList("relic_god", "id==" + codess[1].ToString());
                            {
                                foreach (SXML x in god_id)
                                {
                                    text1.text = x.getString("des1");
                                    text2.text = x.getString("des2");
                                }
                            }
                        }
                    }
                }



                //foreach (SXML x in xml)
                //{
                //    if (x.getString("id") == codess[1])
                //    {
                //        text1.text = x.getString("des1");
                //        text2.text = x.getString("des2");
                //    }
                // }


                //    if (xml.getInt("carr") == PlayerModel.getInstance().profession)
                //{

                //    text1.text = xml.getString("des1");
                //    text2.text = xml.getString("des2");

                //}
            }



            if (shengwu == 1)
            {
                ar_result.SetActive(true);
                string[] codes = icon.Split(',');
                if (PlayerModel.getInstance().profession == 2)
                {
                    pic_icon.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_ar_" + codes[0]);
                }
                if (PlayerModel.getInstance().profession == 3)
                {
                    pic_icon.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_ar_" + codes[1]);
                }
                if (PlayerModel.getInstance().profession == 5)
                {
                    pic_icon.transform.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_ar_" + codes[2]);
                }

                bgwin.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("win/success").SetActive(false);
                transform.FindChild("state_successed").gameObject.SetActive(false);
                jjc.SetActive(false);
                jdzc.SetActive(false);
                cityWAr.SetActive(false);
            }
            jjc.SetActive(false);
            jdzc.SetActive(false);
            cityWAr.SetActive(false);
            if (room is PVPRoom)
            {
                jjc.SetActive(false);
                ar_result.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("state_successed").SetActive(false);
                bgdefet.SetActive(false);
                bgwin.SetActive(false);
                if (data.ContainsKey("win"))
                {
                    int cct = data["win"];
                    if (cct == 0)
                    {
                        jjc.SetActive(true);
                        jjc.transform.FindChild("vector").gameObject.SetActive(false);
                        jjc.transform.FindChild("defet").gameObject.SetActive(true);
                    }
                    else
                    {
                        jjc.SetActive(true);
                        jjc.transform.FindChild("vector").gameObject.SetActive(true);
                        jjc.transform.FindChild("defet").gameObject.SetActive(false);
                    }
                    int aa = a3_sportsModel.getInstance().grade;
                    if (aa < 10)
                    {
                        icon_star.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_00" + aa);
                    }
                    else
                    {
                        icon_star.GetComponent <Image>().sprite = GAMEAPI.ABUI_LoadSprite("icon_rank_0" + aa);
                    }
                    if (a3_sportsModel.getInstance().grade <= 0)
                    {
                        return;
                    }
                    SXML Xml        = XMLMgr.instance.GetSXML("jjc.reward", "grade==" + a3_sportsModel.getInstance().grade);
                    int  pointCount = Xml.getInt("star");
                    if (pointCount <= 0)
                    {
                        return;
                    }
                    Transform star = this.transform.FindChild("jjc/star");
                    for (int i = 0; i < star.childCount; i++)
                    {
                        star.GetChild(i).FindChild("this").gameObject.SetActive(false);
                        star.GetChild(i).gameObject.SetActive(false);
                    }
                    for (int m = pointCount; m > 0; m--)
                    {
                        star.GetChild(m - 1).gameObject.SetActive(true);
                    }
                    for (int j = 0; j < a3_sportsModel.getInstance().score; j++)
                    {
                        star.GetChild(j).FindChild("this").gameObject.SetActive(true);
                    }
                }
            }

            if (room is JDZCRoom)
            {
                jjc.SetActive(false);
                ar_result.SetActive(false);
                jdzc.SetActive(false);
                cityWAr.SetActive(false);
                tip_text.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("state_successed").SetActive(false);
                bgdefet.SetActive(false);
                bgwin.SetActive(false);
                if (data.ContainsKey("win"))
                {
                    int cct = data["win"];
                    jdzc.SetActive(true);

                    if (cct == 0)
                    {
                        GameObject item = jdzc.transform.FindChild("fail/gift/reward").gameObject;
                        Transform  con  = jdzc.transform.FindChild("fail/gift/contain");
                        jdzc.transform.FindChild("win").gameObject.SetActive(false);
                        jdzc.transform.FindChild("fail").gameObject.SetActive(true);
                        SXML        Xml_lose = XMLMgr.instance.GetSXML("pointarena.lose_reward");
                        List <SXML> rew      = Xml_lose.GetNodeList("RewardItem");
                        foreach (SXML one in rew)
                        {
                            GameObject clon = Instantiate(item) as GameObject;
                            clon.SetActive(true);
                            clon.transform.SetParent(con, false);
                            uint       id   = (uint)one.getInt("item_id");
                            int        num  = one.getInt("value");
                            GameObject icon = IconImageMgr.getInstance().createA3ItemIcon(id);
                            icon.transform.SetParent(clon.transform.FindChild("pic/icon"), false);
                            clon.transform.FindChild("pic/num").GetComponent <Text>().text = num.ToString();
                        }
                    }
                    else
                    {
                        GameObject item = jdzc.transform.FindChild("win/gift/reward").gameObject;
                        Transform  con  = jdzc.transform.FindChild("win/gift/contain");
                        jdzc.transform.FindChild("win").gameObject.SetActive(true);
                        jdzc.transform.FindChild("fail").gameObject.SetActive(false);
                        SXML        Xml_win = XMLMgr.instance.GetSXML("pointarena.win_reward");
                        List <SXML> rew     = Xml_win.GetNodeList("RewardItem");
                        foreach (SXML one in rew)
                        {
                            GameObject clon = Instantiate(item) as GameObject;
                            clon.SetActive(true);
                            clon.transform.SetParent(con, false);
                            uint       id   = (uint)one.getInt("item_id");
                            int        num  = one.getInt("value");
                            GameObject icon = IconImageMgr.getInstance().createA3ItemIcon(id);
                            icon.transform.SetParent(clon.transform.FindChild("pic/icon"), false);
                            clon.transform.FindChild("pic/num").GetComponent <Text>().text = num.ToString();
                        }
                    }
                }
            }

            if (room is CityWarRoom)
            {
                jjc.SetActive(false);
                ar_result.SetActive(false);
                jdzc.SetActive(false);
                tip_text.SetActive(false);
                cityWAr.SetActive(false);
                getGameObjectByPath("win").SetActive(false);
                getGameObjectByPath("state_successed").SetActive(false);
                bgdefet.SetActive(false);
                bgwin.SetActive(false);
                cityWAr.transform.FindChild("win/warinfo").gameObject.SetActive(false);
                if (data.ContainsKey("win"))
                {
                    int cct = data["win"];

                    cityWAr.SetActive(true);
                    if (cct == 0)
                    {
                        GameObject item = cityWAr.transform.FindChild("fail/gift/reward").gameObject;
                        Transform  con  = cityWAr.transform.FindChild("fail/gift/contain");
                        cityWAr.transform.FindChild("win").gameObject.SetActive(false);
                        cityWAr.transform.FindChild("fail").gameObject.SetActive(true);
                        if (PlayerModel.getInstance().lvlsideid == 1)
                        {//攻城
                            SXML        Xml_win   = XMLMgr.instance.GetSXML("clanwar.atk_awd", "min==" + 0);
                            List <SXML> rew       = Xml_win.GetNodeList("RewardItem");
                            List <SXML> awds_coin = Xml_win.GetNodeList("RewardValue");
                            setAwd(con, item, rew, awds_coin);
                        }
                        else
                        {
                            //守城
                            SXML        Xml_win   = XMLMgr.instance.GetSXML("clanwar.def_awd", "min==" + 0);
                            List <SXML> rew       = Xml_win.GetNodeList("RewardItem");
                            List <SXML> awds_coin = Xml_win.GetNodeList("RewardValue");
                            setAwd(con, item, rew, awds_coin);
                        }
                    }

                    else
                    {
                        GameObject item = cityWAr.transform.FindChild("win/gift/reward").gameObject;
                        Transform  con  = cityWAr.transform.FindChild("win/gift/contain");
                        cityWAr.transform.FindChild("win").gameObject.SetActive(true);
                        cityWAr.transform.FindChild("fail").gameObject.SetActive(false);
                        if (PlayerModel.getInstance().lvlsideid == 1)
                        {//攻城
                            int i = data["rank"];
                            if (data["win_clanid"])
                            {
                                cityWAr.transform.FindChild("win/warinfo").gameObject.SetActive(true);
                                if (A3_LegionModel.getInstance().myLegion != null && A3_LegionModel.getInstance().myLegion.id == data["win_clanid"])
                                {
                                    cityWAr.transform.FindChild("win/warinfo").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_11");
                                }
                                else
                                {
                                    cityWAr.transform.FindChild("win/warinfo").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_12");
                                }
                            }
                            cityWAr.transform.FindChild("win/info").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_9", new List <string> {
                                i.ToString()
                            });
                            SXML        Xml_win = XMLMgr.instance.GetSXML("clanwar");
                            List <SXML> awd     = Xml_win.GetNodeList("atk_awd");
                            foreach (SXML s in awd)
                            {
                                if (s.getInt("min") <= i && s.getInt("max") >= i)
                                {
                                    List <SXML> rew       = Xml_win.GetNodeList("RewardItem");
                                    List <SXML> awds_coin = Xml_win.GetNodeList("RewardValue");
                                    setAwd(con, item, rew, awds_coin);
                                    break;
                                }
                            }
                        }
                        else
                        {
                            //守城
                            int i = data["hpper"];
                            cityWAr.transform.FindChild("win/info").GetComponent <Text>().text = ContMgr.getCont("uilayer_a3_fb_finish_10", new List <string> {
                                i.ToString()
                            });
                            SXML        Xml_win = XMLMgr.instance.GetSXML("clanwar");
                            List <SXML> awd     = Xml_win.GetNodeList("def_awd");
                            foreach (SXML s in awd)
                            {
                                if (s.getInt("min") <= i && s.getInt("max") >= i)
                                {
                                    List <SXML> rew       = s.GetNodeList("RewardItem");
                                    List <SXML> awds_coin = s.GetNodeList("RewardValue");
                                    setAwd(con, item, rew, awds_coin);
                                    break;
                                }
                            }
                        }
                    }
                }
            }
        }