Пример #1
0
        ///<summary>コモンイベントを読込</summary>
        private CommonEventManager CommonEventRead()
        {
            CommonEventManager commonEventManager = null;

            // 定義ファイルの存在チェック
            if (Utils.File.CheckFileExist(Config.CommonEventPath, $"コモンイベントの定義ファイル"))
            {
                var commonEventDatReader = new CommonEventDatReader();
                commonEventManager = commonEventDatReader.ReadFile(Config.CommonEventPath);
            }

            // 読込結果判定処理
            CheckReadResult(commonEventManager, WoditerInfoCategory.CEv);

            return(commonEventManager);
        }
Пример #2
0
        private List <CommonEventStr> SetCEventStrs(CommonEventManager commonEventManager)
        {
            List <CommonEventStr> cEventStrs = new List <CommonEventStr>();

            for (int cEvID = 0; cEvID < commonEventManager.NumCommonEvent; cEvID++)
            {
                CommonEvent commonEvent = commonEventManager.CommonEvents[cEvID];

                // コマンド数2未満、あるいはコモン名の入力がないもの、コメントアウトのものは除外
                string commonName = Utils.String.Trim(commonEvent.CommonEventName);
                if (commonEvent.NumEventCommand < 2 || commonName == "" || commonName.IndexOf(config.CommentOut) == 0)
                {
                    continue;
                }

                cEventStrs.Add(new CommonEventStr(commonEvent, cEvID, Source));
            }

            return(cEventStrs);
        }