| | |
| | |
|
| | | Dictionary<int, Achievement> achievements = new Dictionary<int, Achievement>();
|
| | | Dictionary<int, List<int>> achievementCategorys = new Dictionary<int, List<int>>();//客户端必须按group分类
|
| | | public Dictionary<int, int> groupToType = new Dictionary<int, int>();
|
| | | public Dictionary<int, List<int>> groupToType = new Dictionary<int, List<int>>();
|
| | | public Dictionary<int, List<int>> typeToGroup = new Dictionary<int, List<int>>(); //所有的类型对应组别
|
| | | public Dictionary<int, int> typeToGroupBP = new Dictionary<int, int>(); //战令的类型对应组别
|
| | |
|
| | |
| | | }
|
| | | foreach (var succGroup in SuccessBPArray)
|
| | | {
|
| | | UpdateSuccessBPRedpoint(0, groupToType[succGroup]);
|
| | | foreach (var type in groupToType[succGroup])
|
| | | { |
| | | UpdateSuccessBPRedpoint(0, type);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (Achievement.IsReach(_achievementId, _progress))
|
| | | {
|
| | | if (!reachSuccessIDs.Contains(_achievementId))
|
| | | reachSuccessIDs.Add(_achievementId);
|
| | | if (achievementAwardableEvent != null)
|
| | | {
|
| | | achievementAwardableEvent(_achievementId);
|
| | | }
|
| | | if (!reachSuccessIDs.Contains(_achievementId))
|
| | | reachSuccessIDs.Add(_achievementId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | SuccessBPArray = GeneralDefine.GetIntArray("PracticeSuccess");
|
| | | for (int i = 0; i < SuccessBPArray.Length; i++)
|
| | | {
|
| | | typeToGroupBP[groupToType[SuccessBPArray[i]]] = SuccessBPArray[i];
|
| | | foreach (var type in groupToType[SuccessBPArray[i]])
|
| | | { |
| | | typeToGroupBP[type] = SuccessBPArray[i];
|
| | | }
|
| | | }
|
| | | SortAchievementCategorys();
|
| | | }
|
| | |
|
| | | //对于表:一个类型可以分不同组别(功能),一个组有多个类型
|
| | | //对于功能:一个类型只有一个组别,一个组有多个类型
|
| | | void UpdateGroupType(SuccessConfig config)
|
| | | {
|
| | | groupToType[config.Group] = config.Type;
|
| | | if (!groupToType.ContainsKey(config.Group))
|
| | | {
|
| | | groupToType[config.Group] = new List<int>();
|
| | | }
|
| | | if (groupToType[config.Group].IndexOf(config.Type) == -1)
|
| | | {
|
| | | groupToType[config.Group].Add(config.Type);
|
| | | }
|
| | |
|
| | | if (!typeToGroup.ContainsKey(config.Type))
|
| | | {
|
| | | typeToGroup[config.Type] = new List<int>();
|