Beispiel #1
0
        void onecompare(int type, uint tpid, int qua)
        {
            // Debug.LogError("我当前的位置是:" + type + "我的id是:" + tpid);
            Dictionary <int, hallowsData> dic_selfs = A3_HallowsModel.getInstance().now_hallows();


            if (dic_selfs != null)
            {
                if (dic_selfs.ContainsKey(type))
                {
                    if (dic_selfs[type].item_id == 0)
                    {
                        PutOrDown = true;
                        A3_HallowsProxy.getInstance().SendHallowsProxy(4, type, (int)tpid);
                        ischange = true;
                    }
                    else
                    {
                        if (dic_selfs[type].h_s_d.quality < qua)
                        {
                            PutOrDown = true;
                            A3_HallowsProxy.getInstance().SendHallowsProxy(4, type, (int)tpid);
                            ischange = true;
                        }
                    }
                }
            }
        }
Beispiel #2
0
        //btns
        void btnsOnClick(GameObject go)
        {
            switch (go.name)
            {
            case "close":    //主界面关闭
                InterfaceMgr.getInstance().close(InterfaceMgr.A3_HALLOWS);
                obj_h_bag.SetActive(false);
                break;

            case "openbag_btn":    //打开圣器宝箱
                ShoworHideModel(false);
                obj_h_bag.SetActive(true);
                showHaveHallows();
                composeallhallows();
                break;

            case "close_bag":    //关闭圣器宝箱
                ShoworHideModel(true);
                obj_h_bag.SetActive(false);
                closeHaveHallows();
                break;

            case "devour_btn":    //吞噬圣魂
                A3_HallowsProxy.getInstance().SendHallowsProxy(2, now_id);
                break;

            case "decompose_btn":    //分解多余圣器

                if (lst_bag.Count <= 0)
                {
                    return;
                }
                else
                {
                    AllCompose = true;
                    A3_HallowsProxy.getInstance().SendHallowsProxy(3, -1, -1, lst_bag);
                }
                break;

            case "attribute_btn":    //打开属性界面
                go.transform.FindChild("this").gameObject.SetActive(true);
                info_btn.transform.FindChild("this").gameObject.SetActive(false);
                obj_h_attribute.SetActive(true);
                obj_h_infos.SetActive(false);
                break;

            case "info_btn":    //打开信息界面
                go.transform.FindChild("this").gameObject.SetActive(true);
                attribute_btn.transform.FindChild("this").gameObject.SetActive(false);
                obj_h_attribute.SetActive(false);
                obj_h_infos.SetActive(true);
                break;

            case "toallwear_btn":
                toallwear();
                break;
            }
        }
 void onsell(GameObject go)
 {
     //圣器分解
     if (item_data.ishallows)
     {
         if ((int)uiData[2] == 2)
         {
             a3_hallows.instance.AllCompose = false;
             a3_hallows.instance.this_tpid  = item_data.tpid;
             List <Variant> lst = new List <Variant>();
             Variant        hcj = new Variant();
             hcj["item_id"]  = item_data.tpid;
             hcj["item_num"] = cur_num;
             lst.Add(hcj);
             A3_HallowsProxy.getInstance().SendHallowsProxy(3, -1, -1, lst);
             InterfaceMgr.getInstance().close(InterfaceMgr.A3_ITEMTIP);
             return;
         }
     }
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_ITEMTIP);
     BagProxy.getInstance().sendSellItems(curid, cur_num);
 }
 void onOut_chushou(GameObject go)
 {
     //圣器脱下
     if (item_data.ishallows)
     {
         if ((int)uiData[2] == 3)
         {
             int type = A3_HallowsModel.getInstance().GetTypeByItemid((int)item_data.tpid);//位置
             a3_hallows.instance.PutOrDown = false;
             A3_HallowsProxy.getInstance().SendHallowsProxy(4, type, 0);
             InterfaceMgr.getInstance().close(InterfaceMgr.A3_ITEMTIP);
             if (a3_hallows.instance)
             {
                 a3_hallows.instance.ShoworHideModel(true);
             }
             return;
         }
     }
     if (piliang_chushou.instance)
     {
         piliang_chushou.instance.outItem_chushou(curid, cur_num);
     }
     InterfaceMgr.getInstance().close(InterfaceMgr.A3_ITEMTIP);
 }
        void ondo(GameObject go)
        {
            if (item_data.confdata.use_type == 21)
            {
                if (!FunctionOpenMgr.instance.Check(FunctionOpenMgr.SUMMON_MONSTER))
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_itemtip_lock"));
                    return;
                }

                ArrayList v = new ArrayList();
                v.Add("tujian");
                v.Add(item_data.confdata.zhSummon);
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SUMMON_NEW, v);
                if (closeWin != null)
                {
                    InterfaceMgr.getInstance().close(closeWin);
                    closeWin = null;
                    togo     = true;
                }
            }
            else if (item_data.confdata.use_type == 23)
            {
                if (!FunctionOpenMgr.instance.Check(FunctionOpenMgr.SUMMON_MONSTER))
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_itemtip_lock"));
                    return;
                }
                if (A3_SummonModel.getInstance().GetSummons().Count <= 0)
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_summon_unllSummon"));
                    return;
                }
                ArrayList v = new ArrayList();
                v.Add("shuxing");
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SUMMON_NEW, v);
                if (closeWin != null)
                {
                    InterfaceMgr.getInstance().close(closeWin);
                    closeWin = null;
                    togo     = true;
                }
            }
            else if (item_data.confdata.use_type == 24)
            {
                if (!FunctionOpenMgr.instance.Check(FunctionOpenMgr.SUMMON_MONSTER))
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_itemtip_lock"));
                    return;
                }
                if (A3_SummonModel.getInstance().GetSummons().Count <= 0)
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_summon_unllSummon"));
                    return;
                }
                ArrayList v = new ArrayList();
                v.Add("xilian");
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SUMMON_NEW, v);
                if (closeWin != null)
                {
                    InterfaceMgr.getInstance().close(closeWin);
                    closeWin = null;
                    togo     = true;
                }
            }
            else if (item_data.confdata.use_type == 25)
            {
                if (!FunctionOpenMgr.instance.Check(FunctionOpenMgr.SUMMON_MONSTER))
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_itemtip_lock"));
                    return;
                }
                if (A3_SummonModel.getInstance().GetSummons().Count <= 0)
                {
                    flytxt.instance.fly(ContMgr.getCont("a3_summon_unllSummon"));
                    return;
                }
                ArrayList v = new ArrayList();
                v.Add("shouhun");
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_SUMMON_NEW, v);
                if (closeWin != null)
                {
                    InterfaceMgr.getInstance().close(closeWin);
                    closeWin = null;
                    togo     = true;
                }
            }
            else if (item_data.confdata.use_type == 28)
            {
                ArrayList v = new ArrayList();
                v.Add(1);       // type    1 表示 人物修改   2   表示军团修改
                v.Add(curid);   // 道具id
                v.Add(cur_num); //道具使用数量
                InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_CHANGE_NAME, v);
            }
            //圣器装备
            else if (item_data.ishallows)
            {
                if ((int)uiData[2] == 2)
                {
                    int type = A3_HallowsModel.getInstance().GetTypeByItemid((int)item_data.tpid);//位置
                    if (a3_hallows.instance)
                    {
                        a3_hallows.instance.OldType_tpid = a3_hallows.instance.haveOrnoHalllow(type) ? (uint)A3_HallowsModel.getInstance().now_hallows()[type].item_id : 0;
                    }
                    a3_hallows.instance.PutOrDown = true;
                    A3_HallowsProxy.getInstance().SendHallowsProxy(4, type, (int)item_data.tpid);
                }
                else
                {
                    InterfaceMgr.getInstance().close(InterfaceMgr.A3_ITEMTIP);
                    InterfaceMgr.getInstance().close(InterfaceMgr.A3_BAG);
                    InterfaceMgr.getInstance().ui_async_open(InterfaceMgr.A3_HALLOWS);
                    return;
                }
            }
            else
            {
                BagProxy.getInstance().sendUseItems(curid, cur_num);
            }
            InterfaceMgr.getInstance().close(InterfaceMgr.A3_ITEMTIP);
        }