public void LoadInitTaskID()
        {
            ConfServiceConfig config = ConfServiceConfig.Get(36);

            if (config == null)
            {
                return;
            }
            taskID = GetTaskIDArrayFromString(config.fieldValue);

            ConfServiceConfig fingerConfig = ConfServiceConfig.Get(38);

            if (fingerConfig == null)
            {
                return;
            }
            fingerTips_TaskID = GetTaskIDArrayFromString(fingerConfig.fieldValue);

            ConfServiceConfig arrowConfig = ConfServiceConfig.Get(40);

            if (arrowConfig == null)
            {
                return;
            }
            arrowTipData = GetArrowTipData(arrowConfig.fieldValue);

            ConfServiceConfig propUseConfig = ConfServiceConfig.Get(44);

            if (propUseConfig == null)
            {
                return;
            }
            m_propHintDatas = new List <PropUseGuidData>();
            //m_propHintDatas = new PropUseGuidDatas();
            //m_propHintDatas.datas = new List<PropUseGuidData>();
            m_propHintDatas.Add(new PropUseGuidData()
            {
                propIDs = new List <long>()
                {
                    3
                },
                taskID = 10003
            });
            m_propHintDatas.Add(new PropUseGuidData()
            {
                propIDs = new List <long>()
                {
                    2
                },
                taskID = 10016
            });
            //m_propHintDatas = Utf8Json.JsonSerializer.Deserialize<PropUseGuidDatas>(propUseConfig.fieldValue);
            //int kk = 0;
        }
Beispiel #2
0
        public ChapterSystem(PlayerInfo playerInfo)
        {
            this.m_playerInfo       = playerInfo;
            this.m_openChapterCount = int.Parse(ConfServiceConfig.Get(22).fieldValue);

            MessageHandler.RegisterMessageHandler(MessageDefine.SCChapterListResponse, OnSyncPlayerChapterList);
            MessageHandler.RegisterMessageHandler(MessageDefine.SCChapterDetailResponse, OnSyncChapterDetailInfo);
            MessageHandler.RegisterMessageHandler(MessageDefine.SCChapterStatusChangeNotice, OnChapterStatusChaged);

            GameEvents.TaskEvents.OnAcceptNewTask += (taskID) =>
            {
                SyncCurrentChapterDetail();
            };

            //GM跳章节
#if UNITY_DEBUG
            GMModule.GMCommandWrapList.FirstOrDefault(cmd => cmd.MessageType == typeof(GmFinishTask)).GMCommandInjector = GMjumpTask;
#endif
        }