Exemple #1
0
        public void SetNpcTaskState(NpcRole npc, NpcTaskState taskState)
        {
            bool flag = npc == null;

            if (!flag)
            {
                int id = npc.id;
                npc.refreshTaskIcon(taskState);
                bool flag2 = taskState > NpcTaskState.NONE;
                if (flag2)
                {
                    npc.listTaskId = this.dicNpcTaskState[npc.id].Keys.ToList <int>();
                }
                else
                {
                    npc.listTaskId = null;
                }
            }
        }
        //设置npc的任务状态
        public void SetNpcTaskState(NpcRole npc, NpcTaskState taskState)
        {
            if (npc == null)
            {
                return;
            }

            int npcId = npc.id;

            npc.refreshTaskIcon(taskState);

            if (taskState != NpcTaskState.NONE)
            {
                npc.listTaskId = dicNpcTaskState[npc.id].Keys.ToList <int>();
            }
            else
            {
                npc.listTaskId = null;
            }

            //   npc.OnRefreshTitle();
        }