using System.Collections.Generic; using Snxxz.UI; public partial class JobSetupConfig : IConfigPostProcess { private static TreasureSkillModel m_TreasureSkillModel; static TreasureSkillModel treasureSkillModel { get { return m_TreasureSkillModel ?? (m_TreasureSkillModel = ModelCenter.Instance.GetModel()); } } private static Dictionary expertSkillEffect = new Dictionary(); public void OnConfigParseCompleted() { if (!string.IsNullOrEmpty(ExpertSkillEffect)) { var _json = LitJson.JsonMapper.ToObject(ExpertSkillEffect); foreach (var _expertSkillID in _json.Keys) { int _skillID = int.Parse(_expertSkillID); expertSkillEffect[_skillID] = (int)_json[_expertSkillID]; } } } public static int GetExpertSkillChangeEffect(int mainSkillID) { int _expertSkillID = 0; if (treasureSkillModel.TryGetExpertSkill(mainSkillID, out _expertSkillID)) { int _effectID = 0; if (expertSkillEffect.TryGetValue(_expertSkillID, out _effectID)) { return _effectID; } } return 0; } }