| | |
| | | public event Action<int> achievementAwardableEvent;
|
| | |
|
| | | Dictionary<int, Achievement> achievements = new Dictionary<int, Achievement>();
|
| | | Dictionary<int, List<int>> achievementCategorys = new Dictionary<int, List<int>>();
|
| | | Dictionary<int, List<int>> achievementCategorys = new Dictionary<int, List<int>>();//客户端必须按group分类
|
| | |
|
| | | VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } }
|
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public List<int> GetAchievementsByCategory(int _type)
|
| | | //按配表group分组
|
| | | public List<int> GetAchievementsByCategory(int group)
|
| | | {
|
| | | if (achievementCategorys.ContainsKey((int)_type))
|
| | | if (achievementCategorys.ContainsKey(group))
|
| | | {
|
| | | return new List<int>(achievementCategorys[(int)_type]);
|
| | | return new List<int>(achievementCategorys[group]);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | this.achievements[config.ID] = new Achievement(config);
|
| | |
|
| | | List<int> achievements;
|
| | | if (achievementCategorys.ContainsKey(config.Type))
|
| | | if (achievementCategorys.ContainsKey(config.Group))
|
| | | {
|
| | | achievements = achievementCategorys[config.Type];
|
| | | achievements = achievementCategorys[config.Group];
|
| | | }
|
| | | else
|
| | | {
|
| | | achievementCategorys[config.Type] = achievements = new List<int>();
|
| | | achievementCategorys[config.Group] = achievements = new List<int>();
|
| | | }
|
| | | achievements.Add(config.ID);
|
| | |
|