public static bool GetConfig(string fieldName, object fieldValue, out ConfSceneSpecial config) { DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_SceneSpecial", 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("SceneSpecial 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex)); } config = null; return(false); } config = null; return(false); }
void CreateSceneBySpecial(long tsk_scene_id_) { this.m_scene_id = tsk_scene_id_; m_s_info = ConfScene.Get(m_scene_id); int cur_difficult = m_group_data.m_lvl; int play_mode = m_s_info.playMode; //场景特殊表 ConfSceneSpecial special_scene = ConfSceneSpecial.array.Find((item) => item.playMode == play_mode && item.difficulty == cur_difficult); m_special_scene_id = special_scene.id; m_time_cost_value = special_scene.secondGain; m_vit_cost_value = special_scene.vitConsume; }
private static void GetArrrayList() { if (cacheArray.Count <= 0) { DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_SceneSpecial"); if (sqReader != null) { while (sqReader.Read()) { ConfSceneSpecial _conf = GetConfByDic(sqReader); cacheArray.Add(_conf); dic[_conf.id] = _conf; } resLoaded = true; } } }
public static bool GetConfig(long id, out ConfSceneSpecial config) { if (dic.TryGetValue(id, out config)) { return(config != null); } if (cacheLoaded) { config = null; return(false); } DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_SceneSpecial", 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("SceneSpecial 表找不到SN={0} 的数据\n{1}", id, ex)); } config = null; return(false); } else { config = null; return(false); } }
private static ConfSceneSpecial GetConfByDic(DataTable reader) { long id = reader.GetInt64(0); int vitConsume = reader.GetInt32(1); int clickCount = reader.GetInt32(2); int secondGain = reader.GetInt32(3); int exhibitTotal = reader.GetInt32(4); int exhibitTask = reader.GetInt32(5); int difficulty = reader.GetInt32(6); int playMode = reader.GetInt32(7); ConfSceneSpecial new_obj_ConfSceneSpecial = new ConfSceneSpecial(id, vitConsume, clickCount, secondGain, exhibitTotal, exhibitTask, difficulty, playMode ); return(new_obj_ConfSceneSpecial); }
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(); }