using System.Collections.Generic; public class PhantasmPavilionModelHandler : IPhantasmPavilionHandler { public bool HasTableKey(int id) { return ModelConfig.HasKey(id); } public List GetKeyList() { List allKeys = ModelConfig.GetKeys(); List validKeys = new List(); for (int i = 0; i < allKeys.Count; i++) { int id = allKeys[i]; var modelCfg = ModelConfig.Get(id); // 过滤未达到开服天数的武将和皮肤形象 if (PhantasmPavilionManager.Instance.IsFaceOrModelVisible(modelCfg.UnlockWay, modelCfg.UnlockValue)) { validKeys.Add(id); } } return validKeys; } public int GetResourceType(int id) { return 0; } public string GetResourceValue(int id) { return string.Empty; } public string GetName(int id) { return ModelConfig.Get(id).Name; } public int GetExpireMinutes(int id) { return ModelConfig.Get(id).ExpireMinutes; } public int GetUnlockWay(int id) { return ModelConfig.Get(id).UnlockWay; } public int GetUnlockValue(int id) { return ModelConfig.Get(id).UnlockValue; } public int GetUnlockNeedCnt(int id) { return ModelConfig.Get(id).UnlockNeedCnt; } public int GetUpNeedCnt(int id) { return ModelConfig.Get(id).UpNeedCnt; } public int GetStarMax(int id) { return ModelConfig.Get(id).StarMax; } public int[] GetAttrIDList(int id) { return ModelConfig.Get(id).AttrIDList; } public int[] GetInitAttrValueList(int id) { return ModelConfig.Get(id).InitAttrValueList; } public int[] GetAttrPerStarAddList(int id) { return ModelConfig.Get(id).AttrPerStarAddList; } public string GetGetWayString(int id) { return ModelConfig.Get(id).GetWayString; } public int GetSortIndex(int id) { return ModelConfig.Get(id).SortIndex; } }