Exemple #1
0
    void Start()
    {
        //NPC创建时设置任务状态
        TaskManager.Single().ChangeNpcState(NPCID);
        NPCNode npcNode = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(NPCID);

        npcName        = npcNode.npcname;//npc名字
        quanEffect     = transform.Find("jiaodgq");
        taskCanAccept  = transform.Find("toudjstb");
        taskCanSucceed = transform.Find("toudwctb");
        selfplayer     = CharacterManager.player;

        for (int i = 0; i < npcNode.info.Length; i++)
        {
            if (string.IsNullOrEmpty(npcNode.info[i]))
            {
                continue;
            }
            contonts.Add(npcNode.info[i]);
        }
        if (contonts.Count > 0)
        {
            int index = UnityEngine.Random.Range(0, contonts.Count);
            strheadtip = contonts[index];
        }
    }
Exemple #2
0
    public void RefreshDialogueData()
    {
        Destroy(npcmodel);
        //闲聊显示跳过按钮
        //任务对话 如果是剧情任务 不显示跳过按钮 不是剧情任务显示跳过按钮
        if (TaskManager.Single().isSmalltalk)
        {
            CloseButton.gameObject.SetActive(true);
        }
        else if (!TaskManager.Single().isSmalltalk&& TaskManager.Single().isDialogueTask)
        {
            CloseButton.gameObject.SetActive(false);
        }
        else if (!TaskManager.Single().isSmalltalk&& !TaskManager.Single().isDialogueTask)
        {
            CloseButton.gameObject.SetActive(true);
        }
        HideTaskHidePanel();

        PlayChatAnimation();
        //playerName.transform.gameObject.SetActive(isPlayer ? true : false);
        //npcName.transform.gameObject.SetActive(isNpc ? true : false);
        if (isPlayer)//玩家
        {
            playerName.text = playerNameStr;
            CrearteNpcModel(GameLibrary.player, 2);
        }
        else if (isNpc)                                                                                             //npc
        {
            NPCNode npcNode = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(TaskManager.Single().npcid); //查找npc模型

            playerName.text = npcNode.npcname;
            //npcName.text = npcNode.npcname;
            CrearteNpcModel(npcNode.modelid, 1);
        }

        if (TaskManager.Single().CurrentShowDialogItem != null && TaskManager.Single().CurrentShowDialogItem.user[2] == 1 && !isSmalltalk)
        {
            acceptBtn.gameObject.SetActive(true);
            completeBtn.gameObject.SetActive(false);
            nextSprite.gameObject.SetActive(false);
        }
        else if (TaskManager.Single().CurrentShowDialogItem != null && TaskManager.Single().CurrentShowDialogItem.user[2] == 2 && !isSmalltalk)
        {
            completeBtn.gameObject.SetActive(true);
            acceptBtn.gameObject.SetActive(false);
            nextSprite.gameObject.SetActive(false);
        }
        else
        {
            acceptBtn.gameObject.SetActive(false);
            completeBtn.gameObject.SetActive(false);
            nextSprite.gameObject.SetActive(true);
        }
    }
Exemple #3
0
 void Clear()
 {
     npcNode           = null;
     mapInfoNode       = null;
     sEFIndexNode      = null;
     collectNode       = null;
     mapId             = 0;
     mapName           = "";
     fileName          = "";
     currentSceneName  = "";
     currentSceneMapid = 0;
     toSceneTransID    = 0;
 }
Exemple #4
0
    public void CreateNpc()
    {
        if (mCurActiveSceneName == GameLibrary.UI_Major)
        {
            for (int i = 0; i < npclist.Length; i++)
            {
                int     npcid   = npclist[i];
                NPCNode npcNode = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(npcid);

                ModelNode modelNode = FSDataNodeTable <ModelNode> .GetSingleton().FindDataByType(npcNode.modelid);

                string     respath = modelNode.respath;
                GameObject go      = Instantiate(Resources.Load(respath)) as GameObject;
                go.transform.parent   = npcControl;
                go.transform.position = vec[i];
                go.transform.rotation = npcNode.rota;
                go.AddComponent <TaskNPC>();
                go.GetComponent <TaskNPC>().NPCID = npcid;
                NPCManager.GetSingle().CreateNpcModel(npcid, go);


                string     footEffctpath = "Effect/Prefabs/UI/jiaodgq";
                GameObject footgo        = Instantiate(Resources.Load(footEffctpath)) as GameObject;
                footgo.transform.parent     = go.transform;
                footgo.transform.position   = vec[i];
                footgo.transform.localScale = Vector3.one;
                footgo.name = "jiaodgq";
                footgo.SetActive(false);

                string     toudjstbpath = "Effect/Prefabs/UI/toudjstb";
                GameObject toudjstb     = Instantiate(Resources.Load(toudjstbpath)) as GameObject;
                toudjstb.transform.parent     = go.transform;
                toudjstb.transform.position   = vec[i];// 位置设在头顶
                toudjstb.transform.localScale = Vector3.one;
                toudjstb.name = "toudjstb";
                toudjstb.SetActive(false);

                string     toudwctbpath = "Effect/Prefabs/UI/toudwctb";
                GameObject toudwctb     = Instantiate(Resources.Load(toudwctbpath)) as GameObject;
                toudwctb.transform.parent     = go.transform;
                toudwctb.transform.position   = vec[i];// 位置设在头顶
                toudwctb.transform.localScale = Vector3.one;
                toudwctb.name = "toudwctb";
                toudwctb.SetActive(false);
            }
        }
    }
Exemple #5
0
    //闲时对话
    private void Smalltalk(long npcid)
    {
        //UIDialogue.instance.SetData(true,false);//是闲聊 不是对话任务

        //NPCNode npcNode = FSDataNodeTable<NPCNode>.GetSingleton().FindDataByType(npcid);
        //if (npcNode !=null)
        //{
        //    int desindex = Random.Range(0, npcNode.info.Length);
        //    UIDialogue.contonts.Add(npcNode.info[desindex]);
        //}

        ////for (int i = 0; i < npcNode.info.Length; i++)
        ////{
        ////    if (string.IsNullOrEmpty(npcNode.info[i]))
        ////    {
        ////        continue;
        ////    }
        ////    UIDialogue.contonts.Add(npcNode.info[i]);
        ////}
        ////if (npcid == 103&&SceneManager.GetActiveScene().name == GameLibrary.UI_Major)
        ////{

        ////    UIPromptBox.Instance.ShowLabel("想去野外吗?来吧!");
        ////    Control.ShowGUI(GameLibrary.UIPromptBox);

        ////}
        //UIDialogue.npcid = npcid;
        //Control.ShowGUI(GameLibrary.UI_Dialogue);
        //UIDialogue.OnChatFinishEvent = null;

        TaskManager.Single().contonts.Clear();
        NPCNode npcNode = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(npcid);

        if (npcNode != null)
        {
            int desindex = Random.Range(0, npcNode.info.Length);
            TaskManager.Single().isSmalltalk    = true;
            TaskManager.Single().isDialogueTask = false;
            TaskManager.Single().npcid          = npcid;
            TaskManager.Single().contonts.Add(npcNode.info[desindex]);
            //object[] temObj = new object[] { true, false, npcid, npcNode.info[desindex]};
            //Control.HideGUI(true);//需要在打开之前关闭所有的界面
            Control.ShowGUI(UIPanleID.UIDialogue, EnumOpenUIType.DefaultUIOrSecond);
        }
        UIDialogue.OnChatFinishEvent = null;
    }
Exemple #6
0
    private IEnumerator initiate_npc_node(NPCNode node)
    {
        dialoguePanel.SetActive(true);
        int node_id = 0;

        while (node_id != -1)   //
        {
            display_node(node.DialogueNodes[node_id]);
            selected_option = -2;

            while (selected_option == -2)   //
            {
                yield return(new WaitForSeconds(0.25f));
            }//
            node_id = selected_option;
        }
        dialoguePanel.SetActive(false);
        unSelectedNPC();
    }
Exemple #7
0
    protected override void Init()
    {
        instance          = this;
        sureBtn.onClick   = OnSureBtn;
        randomBtn.onClick = OnRandomClick;
        EventDelegate.Add(nicknameInput.GetComponent <UIInput>().onChange, OnChange);

        NPCNode npc = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(109);

        ModelNode model = FSDataNodeTable <ModelNode> .GetSingleton().FindDataByType(npc.modelid);

        nameLabel.text = npc.npcname;
        GameObject npcGo = HeroPosEmbattle.instance.CreatModelByModelID(model.id, PosType.NpcPos, null, MountAndPet.Null, -200);

        UnityUtil.AddComponetIfNull <NPCMotion>(npcGo);

        NPCNode npcProm = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(138);

        promptLabel.text = npcProm.ana;

        //if (string.IsNullOrEmpty(npcProm.voice[0]))
        //    AudioController.Instance.PlayUISound(GameLibrary.Resource_GuideSound + npcProm.voice[0], true);
    }
Exemple #8
0
    public void CreateCollect()
    {
        int     npcid   = npclist[1];
        NPCNode npcNode = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(npcid);

        if (FSDataNodeTable <ModelNode> .GetSingleton().DataNodeList.ContainsKey(npcNode.modelid))
        {
            ModelNode modelNode = FSDataNodeTable <ModelNode> .GetSingleton().DataNodeList[npcNode.modelid];

            if (modelNode != null)
            {
                string respath = modelNode.respath;
                respath = "Prefab/Renwu/xuelhuazy";//雪莲花
                GameObject go = Instantiate(Resources.Load(respath)) as GameObject;
                go.transform.parent   = npcControl;
                go.transform.position = new Vector3(-7.0f, 11.56f, -0.8f);
                //go.transform.rotation = npcNode.rota;
                go.AddComponent <TaskCollectPoint>();
                go.GetComponent <TaskCollectPoint>().collectID = 4294718000;
                //NPCManager.GetSingle().CreateNpcModel(npcid, go);
            }
        }
    }
Exemple #9
0
    long toSceneTransID     = 0;  //当前场景到目的场景的传送id
    #endregion

    /// <summary>
    /// 任务移动接口
    /// </summary>
    /// <param name="id">npcID 或 怪物id 或采集点id 或传送门id</param>
    /// <param name="moveType"></param>
    /// <param name="mapID"></param>
    public void MoveToTargetPosition(long id, TaskMoveTarget moveType, int mapID = 0)
    {
        Clear();
        TaskManager.Single().taskAutoTraceID = id;
        TaskManager.Single().taskMoveType    = moveType;
        TaskManager.Single().maiID           = mapID;
        //通过这个id,查表 一步一步找到目标位置
        if (moveType == TaskMoveTarget.MoveToNpc) //npc
        {
            //先跳转到npc场景,然后在寻找npc位置,然后移动到npc位置
            if (FSDataNodeTable <NPCNode> .GetSingleton().DataNodeList.ContainsKey(id))
            {
                npcID   = id;
                npcNode = FSDataNodeTable <NPCNode> .GetSingleton().DataNodeList[id];

                mapId = npcNode.mapid;
                if (FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList.ContainsKey(mapId))
                {
                    mapInfoNode = FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList[mapId];//场景属性表

                    mapName = mapInfoNode.MapName;

                    mapInfo = mapInfoNode.map_info;
                    if (FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList.ContainsKey(mapInfo))
                    {
                        sEFIndexNode = FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList[mapInfo];//场景元素索引表

                        fileName = sEFIndexNode.filename;
                    }
                    //直接遍历场景元素表 去找位置了
                    TaskManager.Single().posList.Clear();
                    if (fileName == "")
                    {
                        return;
                    }
                    foreach (SceneMapNode mapNode in FSDataNodeTable <SceneMapNode> .GetSingleton().DataNodeLists[fileName].Values)
                    {
                        if (mapNode.type_id == (long)id)
                        {
                            TaskManager.Single().posList.Add(mapNode.pos);
                        }
                    }
                    FindTargetPosition();
                }
            }
        }
        else if (moveType == TaskMoveTarget.MoveToCollectPos)//采集点
        {
            //先跳转到采集物所在场景,然后在再寻找采集物位置,然后移动到采集物位置
            if (FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList.ContainsKey(id))
            {
                collectNode = FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[id];

                mapId = collectNode.mapid;
                if (FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList.ContainsKey(mapId))
                {
                    mapInfoNode = FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList[mapId];//场景属性表

                    mapName = mapInfoNode.MapName;

                    mapInfo = mapInfoNode.map_info;
                    if (FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList.ContainsKey(mapInfo))
                    {
                        sEFIndexNode = FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList[mapInfo];//场景元素索引表

                        fileName = sEFIndexNode.filename;
                    }
                    //直接遍历场景元素表 去找位置了
                    TaskManager.Single().posList.Clear();
                    if (fileName == "")
                    {
                        return;
                    }
                    foreach (SceneMapNode mapNode in FSDataNodeTable <SceneMapNode> .GetSingleton().DataNodeLists[fileName].Values)
                    {
                        if (mapNode.type_id == (long)id)
                        {
                            TaskManager.Single().posList.Add(mapNode.pos);
                        }
                    }
                    FindTargetPosition();
                }
            }
        }
        else if (moveType == TaskMoveTarget.MoveToMonsterDropPis)
        {
            //怪物掉落物 传过来的采采集表的id,然后通过采集表找到怪物id 和 mapId ---确定怪物的位置
            //先跳转到怪物掉落物地点,然后在寻找怪物掉落点位置,然后移动到该位置
            if (FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList.ContainsKey(id))
            {
                collectNode = FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[id];

                long monsterID = collectNode.monsterid;
                mapId = collectNode.mapid;
                if (FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList.ContainsKey(mapId))
                {
                    mapInfoNode = FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList[mapId];//场景属性表

                    mapName = mapInfoNode.MapName;

                    mapInfo = mapInfoNode.map_info;
                    if (FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList.ContainsKey(mapInfo))
                    {
                        sEFIndexNode = FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList[mapInfo];//场景元素索引表

                        fileName = sEFIndexNode.filename;
                    }
                    //直接遍历场景元素表 去找位置了
                    TaskManager.Single().posList.Clear();
                    if (fileName == "")
                    {
                        return;
                    }
                    foreach (SceneMapNode mapNode in FSDataNodeTable <SceneMapNode> .GetSingleton().DataNodeLists[fileName].Values)
                    {
                        if (mapNode.type_id == monsterID)//怪物掉落物 传进来的id是采集表id,通过采集表id在采集表中得到怪物id,然后通过怪物id在相应的元素表中找到怪物位置
                        {
                            TaskManager.Single().posList.Add(mapNode.pos);
                        }
                    }
                    FindTargetPosition();
                }
            }
        }
        else if (moveType == TaskMoveTarget.MoveToMonsterPos)
        {
            //先跳转到怪物地点,然后在寻找怪物位置,然后移动到该位置
            long monsterID = id;
            mapId = mapID;// 去野外杀怪  告诉我野外mapid
            if (FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList.ContainsKey(mapId))
            {
                mapInfoNode = FSDataNodeTable <MapInfoNode> .GetSingleton().DataNodeList[mapId];//场景属性表

                mapName = mapInfoNode.MapName;

                mapInfo = mapInfoNode.map_info;
                if (FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList.ContainsKey(mapInfo))
                {
                    sEFIndexNode = FSDataNodeTable <ScenceElementFileIndexTableNode> .GetSingleton().DataNodeList[mapInfo];//场景元素索引表

                    fileName = sEFIndexNode.filename;
                }
                //直接遍历场景元素表 去找位置了
                TaskManager.Single().posList.Clear();
                if (fileName == "")
                {
                    return;
                }
                foreach (SceneMapNode mapNode in FSDataNodeTable <SceneMapNode> .GetSingleton().DataNodeLists[fileName].Values)
                {
                    if (mapNode.type_id == monsterID)//怪物掉落物 传进来的id是采集表id,通过采集表id在采集表中得到怪物id,然后通过怪物id在相应的元素表中找到怪物位置
                    {
                        TaskManager.Single().posList.Add(mapNode.pos);
                    }
                }
                FindTargetPosition();
            }
        }

        StartMove();
    }
Exemple #10
0
    protected override void ShowHandler()
    {
        Control.HideGUI(UIPanleID.UIMoney);
        Control.HideGUI(UIPanleID.UIRole);
        Control.HideGUI(UIPanleID.UISetting);
        Control.HideGUI(UIPanleID.UITaskTracker);
        Control.HideGUI(UIPanleID.UIChat);
        //Control.HideGUI(GameLibrary.UIMail);
        GameObject.Destroy(npcmodel);
        //当前NPC身上所带任务列表
        //List<TaskItem> tasklist = TaskManager.Single().GetNPCTaskList(npcid);
        NPCNode npcNode = FSDataNodeTable <NPCNode> .GetSingleton().FindDataByType(npcid);

        ArrayList showTaskList = new ArrayList();

        //功能按钮
        for (int i = 0; i < TaskManager.Single().CurrentShowDialogItem.opt.Length; i++)
        {
            //是空就跳转 最后一个是关闭按钮
            if (string.IsNullOrEmpty(TaskManager.Single().CurrentShowDialogItem.opt[i]))
            {
                continue;//这个应该是return, 不然的话 下面 i+1就乱了
            }
            string[] functionbtn = new string[4];
            //任务索引要告诉后端选择的是哪个任务
            functionbtn[0] = (i + 1) + "";
            //任务名称
            functionbtn[1] = TaskManager.Single().CurrentShowDialogItem.opt[i];
            //区分完成状态
            functionbtn[2] = TaskManager.Single().CurrentShowDialogItem.user[1].ToString();//user2
            //区分主线支线
            functionbtn[3] = "1";
            showTaskList.Add(functionbtn);
        }

        ////关闭按钮
        //string[] strclose = new string[4];
        //strclose[0] = "-1";
        //strclose[1] = "路过而已";
        //strclose[2] = "1";
        //strclose[3] = "1";
        //showTaskList.Add(strclose);

        //multList.InSize(showTaskList.Count, 2);
        //multList.Info(showTaskList.ToArray());
        currentindex = int.Parse(((string[])showTaskList[0])[0]);
        if (TaskManager.Single().CurrentShowDialogItem != null)
        {
            List <ItemData> itemlist = TaskManager.Single().GetItemList(TaskManager.Single().CurrentShowDialogItem.msId);
            goodsScrollView.ResetPosition();
            goodsMultList.InSize(itemlist.Count, itemlist.Count);
            goodsMultList.Info(itemlist.ToArray());
        }
        if (FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList.ContainsKey(TaskManager.Single().CurrentShowDialogItem.msId))
        {
            tasknode = FSDataNodeTable <TaskDataNode> .GetSingleton().DataNodeList[TaskManager.Single().CurrentShowDialogItem.msId];

            taskName.text    = tasknode.Taskname;
            taskContent.text = tasknode.Require.Replace("c1", GameLibrary.C1)
                               .Replace("c2", GameLibrary.C2)
                               .Replace("c3", GameLibrary.C3)
                               .Replace("c4", GameLibrary.C4)
                               .Replace("c5", GameLibrary.C5)
                               .Replace("c6", GameLibrary.C6);
            if (tasknode.Requiretype == 3)//采集数量显示
            {
                long collectID1 = 0;
                long collectID2 = 0;
                if (TaskManager.Single().TaskToCaijiDic.ContainsKey(TaskManager.Single().CurrentShowDialogItem.msId))
                {
                    collectID1 = TaskManager.Single().TaskToCaijiDic[TaskManager.Single().CurrentShowDialogItem.msId].opt4;
                    collectID2 = TaskManager.Single().TaskToCaijiDic[TaskManager.Single().CurrentShowDialogItem.msId].opt6;
                    //if (TaskManager.Single().TaskItemCountsDic.ContainsKey(collectID))
                    //{
                    //    if (TaskManager.Single().TaskItemCountsDic[collectID] < TaskManager.Single().TaskToCaijiDic[_taskItem.missionid].opt5)
                    //    {
                    //        caijiCount = TaskManager.Single().TaskItemCountsDic[collectID];
                    //    }
                    //    else
                    //    {
                    //        caijiCount = (int)TaskManager.Single().TaskToCaijiDic[_taskItem.missionid].opt5;
                    //    }
                    //}
                    //else
                    //{
                    //    caijiCount = 0;
                    //}
                }
                else//后端给我的信息是在 接收任务之后。这就导致未接的时候找不到ID,没法替换追踪显示中的数量。这时候我自己去读表
                {
                    if (tasknode.Opt5.Length > 0)
                    {
                        long trackingIndex = tasknode.Opt5[0];
                        if (FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList.ContainsKey(trackingIndex))
                        {
                            collectID1 = FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[trackingIndex].collectid[0, 0];
                        }
                    }
                    if (tasknode.Opt5.Length > 1)
                    {
                        long trackingIndex = tasknode.Opt5[1];
                        if (FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList.ContainsKey(trackingIndex))
                        {
                            collectID2 = FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[trackingIndex].collectid[0, 0];
                        }
                    }
                }
                taskContent.text = tasknode.Require.Replace("c1", GameLibrary.C1)
                                   .Replace("c2", GameLibrary.C2)
                                   .Replace("c3", GameLibrary.C3)
                                   .Replace("c4", GameLibrary.C4)
                                   .Replace("c5", GameLibrary.C5)
                                   .Replace("c6", GameLibrary.C6)
                                   .Replace("%d" + collectID1, "0")
                                   .Replace("%d" + collectID2, "0");
            }
            else if (tasknode.Requiretype == 6)//杀怪数量显示
            {
                long monsterId1 = 0;
                long monsterId2 = 0;
                if (TaskManager.Single().TaskToSkillMonsterDic.ContainsKey(TaskManager.Single().CurrentShowDialogItem.msId))
                {
                    //暂时杀怪是两种 最多三种
                    monsterId1 = TaskManager.Single().TaskToSkillMonsterDic[TaskManager.Single().CurrentShowDialogItem.msId].opt4;
                    monsterId2 = TaskManager.Single().TaskToSkillMonsterDic[TaskManager.Single().CurrentShowDialogItem.msId].opt6;
                    //if (TaskManager.Single().TaskSkillMonsterCountsDic.ContainsKey(monsterId1))
                    //{
                    //    if (TaskManager.Single().TaskSkillMonsterCountsDic[monsterId1] < TaskManager.Single().TaskToSkillMonsterDic[_taskItem.missionid].opt5)
                    //    {
                    //        monster1Count = TaskManager.Single().TaskSkillMonsterCountsDic[monsterId1];
                    //    }
                    //    else
                    //    {
                    //        monster1Count = (int)TaskManager.Single().TaskToSkillMonsterDic[_taskItem.missionid].opt5;
                    //    }
                    //}
                    //if (TaskManager.Single().TaskSkillMonsterCountsDic.ContainsKey(monsterId2))
                    //{
                    //    if (TaskManager.Single().TaskSkillMonsterCountsDic[monsterId2] < TaskManager.Single().TaskToSkillMonsterDic[_taskItem.missionid].opt7)
                    //    {
                    //        monster2Count = TaskManager.Single().TaskSkillMonsterCountsDic[monsterId2];
                    //    }
                    //    else
                    //    {
                    //        monster2Count = (int)TaskManager.Single().TaskToSkillMonsterDic[_taskItem.missionid].opt7;
                    //    }
                    //}
                }
                else
                {
                    Dictionary <long, int> idAndcountDic = tasknode.IdAndcountDic;
                    List <long>            idArr         = new List <long>();
                    foreach (long id in idAndcountDic.Keys)
                    {
                        idArr.Add(id);
                    }
                    if (idArr.Count >= 2)
                    {
                        monsterId1 = idArr[0];
                        monsterId2 = idArr[1];
                    }
                    else if (idArr.Count == 1)
                    {
                        monsterId1 = idArr[0];
                    }
                }
                taskContent.text = tasknode.Require.Replace("c1", GameLibrary.C1)
                                   .Replace("c2", GameLibrary.C2)
                                   .Replace("c3", GameLibrary.C3)
                                   .Replace("c4", GameLibrary.C4)
                                   .Replace("c5", GameLibrary.C5)
                                   .Replace("c6", GameLibrary.C6)
                                   .Replace("%d" + monsterId1, "0")
                                   .Replace("%d" + monsterId2, "0");
            }
            else if (tasknode.Requiretype == 7)//杀怪掉落物显示
            {
                long itemId1 = 0;
                long itemId2 = 0;
                if (TaskManager.Single().TaskToSMGoodsDic.ContainsKey(TaskManager.Single().CurrentShowDialogItem.msId))
                {
                    itemId1 = TaskManager.Single().TaskToSMGoodsDic[TaskManager.Single().CurrentShowDialogItem.msId].opt4;
                    itemId2 = TaskManager.Single().TaskToSMGoodsDic[TaskManager.Single().CurrentShowDialogItem.msId].opt6;
                }

                long trackingIndex = tasknode.Opt2;
                if (FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList.ContainsKey(trackingIndex))
                {
                    if (FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[trackingIndex].collectid.GetLength(0) >= 2)
                    {
                        itemId1 = FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[trackingIndex].collectid[0, 0];

                        itemId2 = FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[trackingIndex].collectid[1, 0];
                    }
                    else if (FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[trackingIndex].collectid.GetLength(0) == 1)
                    {
                        itemId1 = FSDataNodeTable <CollectNode> .GetSingleton().DataNodeList[trackingIndex].collectid[0, 0];
                    }
                }

                taskContent.text = tasknode.Require.Replace("c1", GameLibrary.C1)
                                   .Replace("c2", GameLibrary.C2)
                                   .Replace("c3", GameLibrary.C3)
                                   .Replace("c4", GameLibrary.C4)
                                   .Replace("c5", GameLibrary.C5)
                                   .Replace("c6", GameLibrary.C6)
                                   .Replace("%d" + itemId1, "0")
                                   .Replace("%d" + itemId2, "0");
                //long smonsterId1 = 0;
                //long itemId = 0;//任务详情表中是掉落物的id,但是后端告诉我的是 物品掉落的怪物id
                //if (TaskManager.Single().TaskToSMGoodsDic.ContainsKey(clickTaskItem.missionid))
                //{
                //    smonsterId1 = TaskManager.Single().TaskToSMGoodsDic[clickTaskItem.missionid].opt6;
                //    //杀怪掉落物 后端没有告诉我 需要去获得几个  只告诉我已经获得的数量
                //    //if (TaskManager.Single().TaskSMGoodsCountDic.ContainsKey(smonsterId1))
                //    //{
                //    //    smGoodsCount = TaskManager.Single().TaskSMGoodsCountDic[smonsterId1];
                //    //}
                //}

                //long trackingIndex = clickTaskItem.tasknode.Opt2;
                //if (FSDataNodeTable<CollectNode>.GetSingleton().DataNodeList.ContainsKey(trackingIndex))
                //{
                //    itemId = FSDataNodeTable<CollectNode>.GetSingleton().DataNodeList[trackingIndex].collectid[0, 0];
                //}

                //tasktargetlab1.text = clickTaskItem.tasknode.Require.Replace("c1", GameLibrary.C1)
                //                                             .Replace("c2", GameLibrary.C2)
                //                                             .Replace("c3", GameLibrary.C3)
                //                                             .Replace("c4", GameLibrary.C4)
                //                                             .Replace("c5", GameLibrary.C5)
                //                                             .Replace("c6", GameLibrary.C6)
                //                                             .Replace("%d" + itemId, GetTaskGoodsCount(clickTaskItem.tasknode.Requiretype, itemId, clickTaskItem).ToString());
            }
            else if (tasknode.Requiretype == 8)//背包物品数量显示
            {
                long itemId1 = 0;
                long itemId2 = 0;

                Dictionary <long, int> idAndcountDic = tasknode.IdAndcountDic;
                List <long>            idArr         = new List <long>();
                foreach (long id in idAndcountDic.Keys)
                {
                    idArr.Add(id);
                }
                if (idArr.Count >= 1)
                {
                    itemId1 = idArr[0];
                }
                if (idArr.Count >= 2)
                {
                    itemId1 = idArr[0];
                    itemId2 = idArr[1];
                }
                taskContent.text = tasknode.Require.Replace("c1", GameLibrary.C1)
                                   .Replace("c2", GameLibrary.C2)
                                   .Replace("c3", GameLibrary.C3)
                                   .Replace("c4", GameLibrary.C4)
                                   .Replace("c5", GameLibrary.C5)
                                   .Replace("c6", GameLibrary.C6)
                                   .Replace("c6", GameLibrary.C6)
                                   .Replace("%d" + itemId1, "0")
                                   .Replace("%d" + itemId2, "0");
            }
        }

        //根据NPC 查找内容与名称
        npcname.text = npcNode.npcname;
        //contont.text = TaskManager.Single().CurrentShowDialogItem.disc;
        if (FSDataNodeTable <ModelNode> .GetSingleton().DataNodeList.ContainsKey(npcNode.modelid))
        {
            //CrearteNpcModel(FSDataNodeTable<ModelNode>.GetSingleton().DataNodeList[npcNode.modelid].respath);
            heroObj = HeroPosEmbattle.instance.CreatModelByModelID((int)npcNode.modelid, PosType.NpcPos, transform.Find("HeroTexture").GetComponent <SpinWithMouse>(), MountAndPet.Null, 160);
        }
    }