| | |
| | | |
| | | void OnBeforePlayerDataInitialize() |
| | | { |
| | | |
| | | |
| | | heroInfoDict.Clear(); |
| | | } |
| | | |
| | |
| | | heroInfoDict.TryGetValue(guid, out heroInfo); |
| | | |
| | | heroInfoDict.Remove(guid); |
| | | |
| | | |
| | | if (null != heroInfo) |
| | | onHeroDeleteEvent?.Invoke(heroInfo); |
| | | } |
| | |
| | | { |
| | | if (job == 0 && country == 0) |
| | | return heroInfoDict.Keys.ToList(); |
| | | |
| | | return heroInfoDict.Keys.Where((x) => |
| | | |
| | | |
| | | List<string> retGuidList = new List<string>(); |
| | | foreach (string guid in heroInfoDict.Keys) |
| | | { |
| | | HeroInfo heroInfo = heroInfoDict[x]; |
| | | return heroInfo.heroConfig.Class == job && heroInfo.heroConfig.Country == country; |
| | | }).ToList(); |
| | | HeroInfo heroInfo = heroInfoDict[guid]; |
| | | //0代表全部 |
| | | if (job == 0 || country == 0) |
| | | { |
| | | if (job != 0 && job == heroInfo.heroConfig.Class) |
| | | retGuidList.Add(guid); |
| | | if (country != 0 && country == heroInfo.heroConfig.Country) |
| | | retGuidList.Add(guid); |
| | | } |
| | | else |
| | | { |
| | | if (job == heroInfo.heroConfig.Class && country == heroInfo.heroConfig.Country) |
| | | retGuidList.Add(guid); |
| | | } |
| | | } |
| | | return retGuidList; |
| | | } |
| | | |
| | | public List<HeroInfo> GetPowerfulHeroList() |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | public int GetHeroCount() |
| | | { |
| | | return heroInfoDict.Count; |
| | | } |
| | | |
| | | |
| | | } |