public static bool GetConfig(string fieldName, object fieldValue, out ConfServiceConfig config) { DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_ServiceConfig", fieldName, fieldValue); if (sqReader != null) { try { sqReader.Read(); if (sqReader.HasRows) { config = GetConfByDic(sqReader); } else { config = null; return(false); } return(true); } catch (Exception ex) { SqliteDriver.SQLiteHelper.OnError(string.Format("ServiceConfig 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex)); } config = null; return(false); } config = null; return(false); }
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; }
private static void GetArrrayList() { if (cacheArray.Count <= 0) { DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_ServiceConfig"); if (sqReader != null) { while (sqReader.Read()) { ConfServiceConfig _conf = GetConfByDic(sqReader); cacheArray.Add(_conf); dic[_conf.id] = _conf; } resLoaded = true; } } }
public static bool GetConfig(long id, out ConfServiceConfig config) { if (dic.TryGetValue(id, out config)) { return(config != null); } if (cacheLoaded) { config = null; return(false); } DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_ServiceConfig", id); if (sqReader != null) { try { sqReader.Read(); if (sqReader.HasRows) { config = GetConfByDic(sqReader); } else { dic[id] = null; config = null; return(false); } dic[id] = config; return(true); } catch (Exception ex) { SqliteDriver.SQLiteHelper.OnError(string.Format("ServiceConfig 表找不到SN={0} 的数据\n{1}", id, ex)); } config = null; return(false); } else { config = null; return(false); } }
private static ConfServiceConfig GetConfByDic(DataTable reader) { long id = reader.GetInt64(0); string editLog = reader.GetString(1); string filedValuePre = reader.GetString(2); string filedComment = reader.GetString(3); string fieldValue = reader.GetString(4); string fieldName = reader.GetString(5); ConfServiceConfig new_obj_ConfServiceConfig = new ConfServiceConfig(id, editLog, filedValuePre, filedComment, fieldValue, fieldName ); return(new_obj_ConfServiceConfig); }
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 }
public static void Register() { ConfAchievement.Init(); ConfActiveDrop.Init(); ConfActivityBase.Init(); ConfAssetManifest.Init(); Confbranchtask.Init(); ConfBuilding.Init(); ConfCartoonScene.Init(); ConfChapter.Init(); ConfCharge.Init(); ConfChat.Init(); ConfChatItem.Init(); ConfCheckIn.Init(); ConfCombineFormula.Init(); ConfDemoScene.Init(); ConfDropOut.Init(); ConfPropGiftItem0.Init(); ConfPropGiftItem1.Init(); ConfPropGiftItem2.Init(); ConfDropOut2.Init(); Confetl.Init(); ConfEvent.Init(); ConfEventAttribute.Init(); ConfEventPhase.Init(); Confexhibit.Init(); ConfExpToLevel.Init(); Conffailtips.Init(); ConfFeedback.Init(); ConfFind.Init(); ConfFindClue.Init(); ConfFindTypeIcon.Init(); ConfGMCMD.Init(); ConfGuid.Init(); ConfGuidArt.Init(); ConfGuidNew.Init(); ConfGuidNewFunction.Init(); Confinapppurchase.Init(); ConfJigsawScene.Init(); ConfKeyWords.Init(); ConfLanguage.Init(); ConfMsgCode.Init(); ConfNode.Init(); ConfNpc.Init(); ConfOfficer.Init(); ConfPath.Init(); ConfPoliceRankIcon.Init(); ConfProp.Init(); ConfPropGift.Init(); ConfPropGiftItem0.Init(); ConfPropGiftItem1.Init(); ConfPropGiftItem2.Init(); ConfPush.Init(); ConfReasoning.Init(); ConfScene.Init(); ConfSceneDifficulty.Init(); ConfSceneSpecial.Init(); ConfServiceConfig.Init(); ConfSkill.Init(); ConfSkyEye.Init(); ConfSound.Init(); ConfTask.Init(); ConfTitle.Init(); }