Ejemplo n.º 1
0
        //选择功能按钮
        private void OnOptionBtnClick(GameObject go)
        {
            dialog.next();

            int taskId = 0;

            if (int.TryParse(go.name, out taskId))
            {
                List <string> ldesc = tkModel.GetDialogkDesc(taskId);
                tkModel.curTask = tkModel.GetTaskDataById(taskId);

                dialog.showTalk(ldesc, null, dialog.m_npc);

                //OnCompleteTalk();
            }
            else
            {
                string    opName = go.name;
                ArrayList lst    = new ArrayList();
                if (opName == "a3_npc_shop")
                {
                    lst.Add(npc_id);
                    // List<SXML> listNPCShop= XMLMgr.instance.GetSXMLList("npc_shop.npc_shop", "npc_id==" + npc_id);
                    //A3_NPCShopModel.getInstance().listNPCShop.Clear();
                    //A3_NPCShopModel.getInstance().listNPCShop = listNPCShop;
                    //A3_NPCShopProxy.getInstance().sendShowFloat((uint)listNPCShop[0].getInt("shop_id"));
                }
                if (opName == "a3_legi  on_dart")
                {
                    if (A3_LegionModel.getInstance().myLegion.id == 0)
                    {
                        flytxt.instance.fly(ContMgr.getCont("npctasktalk10"));
                        return;
                    }
                }
                if (opName == "a3_npc_shop")
                {
                    InterfaceMgr.getInstance().ui_async_open(opName, lst);
                }
                else
                {
                    InterfaceMgr.getInstance().ui_async_open(opName);
                }
                //List<string> ldesc = new List<string>() { "1:让我准备准备" };
                //dialog.showTalk(ldesc,
                //    () => InterfaceMgr.getInstance().open(opName),
                //    dialog.m_npc);
            }
        }