public DO_Mission[] GetAllTitleMission()
        {
            string jsonFile = File.ReadAllText("Data/D_Title.json");

            m_titleDatas = JsonMapper.ToObject(jsonFile);
            int count = m_titleDatas.Count;

            DO_Mission[] res = new DO_Mission[count];
            for (int i = 0; i < count; i++)
            {
                JsonData tempData = m_titleDatas[i];
                res[i].m_id = short.Parse(tempData["TitleID"].ToString());
                res[i].m_missionOccupation    = (OccupationType)Enum.Parse(typeof(OccupationType), tempData["Occupation"].ToString());
                res[i].m_levelInNeed          = short.Parse(tempData["LevelInNeed"].ToString());
                res[i].m_missionTargetArr     = new ValueTuple <MissionTargetType, short> [tempData["TitleTarget"].Count];
                res[i].m_acceptingNPCID       = -1;
                res[i].m_deliveringNPCID      = -1;
                res[i].m_bonusItemIdAndNumArr = new ValueTuple <short, short> [0];
                res[i].m_fatherMissionIdArr   = new short[0];
                res[i].m_childrenMissionArr   = new short[0];
                for (int durex = 0; durex < tempData["TitleTarget"].Count; durex++)
                {
                    res[i].m_missionTargetArr[durex].Item1 = (MissionTargetType)Enum.Parse(typeof(MissionTargetType), tempData["TitleTarget"][durex][0].ToString());
                    res[i].m_missionTargetArr[durex].Item2 = short.Parse(tempData["TitleTarget"][durex][1].ToString());
                }
            }
            return(res);
        }
        private DO_Mission getMissionDatas(short ID)
        {
            DO_Mission mission = new DO_Mission();

            mission.m_id = short.Parse(m_missionDatas[ID]["MissionID"].ToString());
            mission.m_missionOccupation = (OccupationType)Enum.Parse(typeof(OccupationType), m_missionDatas[ID]["MissionOccupation"].ToString());
            JsonData tempData;

            mission.m_acceptingNPCID  = int.Parse(m_missionDatas[ID]["AcceptingNPCID"].ToString());
            mission.m_deliveringNPCID = int.Parse(m_missionDatas[ID]["DeliveringNPCID"].ToString());
            tempData = m_missionDatas[ID]["ConversationsWhenAccepting"];

            /**mission.m_conversationsWhenAccepting = new String[tempData.Count];
             * //for (int i = 0; i < tempData.Count; i++)
             * {
             *  mission.m_conversationsWhenAccepting[i] = tempData[i].ToString();
             * }
             * tempData = m_missionDatas[ID]["ConversationsWhenDelivering"];
             * mission.m_conversationWhenDelivering = new String[tempData.Count];
             * for (int i = 0; i < tempData.Count; i++)
             * {
             *  mission.m_conversationWhenDelivering[i] = tempData[i].ToString();
             * }**/
            mission.m_bonusMoney      = long.Parse(m_missionDatas[ID]["BonusMoney"].ToString());
            mission.m_bonusExperience = int.Parse(m_missionDatas[ID]["BonusExperience"].ToString());
            mission.m_levelInNeed     = short.Parse(m_missionDatas[ID]["LevelInNeed"].ToString());
            tempData = m_missionDatas[ID]["FatherMissionList"];
            mission.m_fatherMissionIdArr = new short[tempData.Count];

            for (int i = 0; i < tempData.Count; i++)
            {
                mission.m_fatherMissionIdArr[i] = (short.Parse(tempData[i].ToString()));
            }
            tempData = m_missionDatas[ID]["ChildrenMissionList"];
            mission.m_childrenMissionArr = new short[tempData.Count];

            for (int i = 0; i < tempData.Count; i++)
            {
                mission.m_childrenMissionArr[i] = (short.Parse(tempData[i].ToString()));
            }
            tempData = m_missionDatas[ID]["MissionTarget"];
            mission.m_missionTargetArr = new ValueTuple <MissionTargetType, short> [tempData.Count];
            for (int i = 0; i < tempData.Count; i++)
            {
                String            tempstr1   = tempData[i][0].ToString();
                MissionTargetType mt         = (MissionTargetType)Enum.Parse(typeof(MissionTargetType), tempstr1);
                short             parameter1 = short.Parse(tempData[i][1].ToString());

                mission.m_missionTargetArr[i] = new ValueTuple <MissionTargetType, short> (mt, parameter1);
            }
            tempData = m_missionDatas[ID]["BonusItems"];
            mission.m_bonusItemIdAndNumArr = new ValueTuple <short, short> [tempData.Count];

            for (int i = 0; i < tempData.Count; i++)
            {
                mission.m_bonusItemIdAndNumArr[i] = (short.Parse(tempData[i].ToString().Split(' ') [0]), short.Parse(tempData[i].ToString().Split(' ') [1]));
            }
            return(mission);
        }
        public DO_Mission[] GetAllMission()
        {
            string jsonFile = File.ReadAllText("Data/D_Mission.json");

            m_missionDatas = JsonMapper.ToObject(jsonFile);

            DO_Mission[] missionStructs = new DO_Mission[m_missionDatas.Count];
            for (int i = 0; i < m_missionDatas.Count; i++)
            {
                missionStructs[i] = getMissionDatas((short)i);
            }
            return(missionStructs);
        }