| | |
| | | //使用方法:其他功能界面设置该值即可 |
| | | public KeyValuePair<string, long> lastFightPower = new KeyValuePair<string, long>(); |
| | | |
| | | public bool isCustonHeroFormation = false; |
| | | public List<TeamHero> custonTeamHeroes = new List<TeamHero>(); |
| | | |
| | | |
| | | public override void Init() |
| | | { |
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize; |
| | |
| | | GlobalTimeEvent.Instance.secondEvent += OnSecondEvent; |
| | | PackManager.Instance.RefreshItemEvent += RefreshItemEvent; |
| | | TeamManager.Instance.OnTeamChange += OnTeamChangeEvent; |
| | | QuickSetting.Instance.onQuickSettingUpdate += OnQuickSettingUpdate; |
| | | ParseConfig(); |
| | | InitHeroOnTeamRedpointList(); |
| | | InitHeroBookRedpointList(); |
| | |
| | | GlobalTimeEvent.Instance.secondEvent -= OnSecondEvent; |
| | | PackManager.Instance.RefreshItemEvent -= RefreshItemEvent; |
| | | TeamManager.Instance.OnTeamChange -= OnTeamChangeEvent; |
| | | QuickSetting.Instance.onQuickSettingUpdate -= OnQuickSettingUpdate; |
| | | } |
| | | |
| | | void ParseConfig() |
| | |
| | | |
| | | config = FuncConfigConfig.Get("HeroRedpoint"); |
| | | heroRedpointItemList = JsonMapper.ToObject<int[]>(config.Numerical1); |
| | | |
| | | config = FuncConfigConfig.Get("HeroOnTeam"); |
| | | lockHeroCountLimit = JsonMapper.ToObject<int[][]>(config.Numerical1); |
| | | teamSortByJob = JsonMapper.ToObject<int[]>(config.Numerical2); |
| | | onekeyGuideID = int.Parse(config.Numerical3); |
| | | onekeyGuideFirstPos = int.Parse(config.Numerical4); |
| | | |
| | | } |
| | | |
| | | public void OnBeforePlayerDataInitialize() |
| | |
| | | return hero.heroLevel >= GetMaxLV(hero.Quality); |
| | | |
| | | } |
| | | //突破限制的最高等级; 存在突破等级可能更多的情况,不一定提供等级上限 |
| | | //突破限制的最高等级; 如果存在突破等级后不能再升级是策划配置问题 |
| | | public int GetMaxLVByBreakLV(int quality, int breakLevel) |
| | | { |
| | | for (int i = breakLevel; i >= 0; i--) |
| | | { |
| | | var config = HeroQualityBreakConfig.GetQualityBreakConfig(quality, i); |
| | | if (config == null) |
| | | { |
| | | continue; |
| | | } |
| | | return config.LVMax; |
| | | } |
| | | return 0; |
| | | // for (int i = breakLevel; i >= 0; i--) |
| | | // { |
| | | // var config = HeroQualityBreakConfig.GetQualityBreakConfig(quality, i); |
| | | // if (config == null) |
| | | // { |
| | | // continue; |
| | | // } |
| | | // return config.LVMax; |
| | | // } |
| | | return HeroQualityBreakConfig.GetQualityBreakConfig(quality, breakLevel).LVMax; |
| | | } |
| | | |
| | | //是否达到因突破限制的最高级 |
| | | public bool IsLVMaxByBreakLevel(HeroInfo hero) |
| | | { |
| | | return hero.heroLevel == GetMaxLVByBreakLV(hero.Quality, hero.breakLevel); |
| | |
| | | { |
| | | return 3; |
| | | } |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | heroOnTeamRedpointList.Clear(); |
| | | for (int i = 0; i < TeamConst.MaxTeamHeroCount; i++) |
| | | { |
| | | { |
| | | heroOnTeamRedpointList.Add(new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + i)); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //武将卡的红点:只给上阵武将刷红点(含新标识),非上阵武将的新图标按图片处理不归类为红点 |
| | | void UpdateHeroCardRedpoint() |
| | |
| | | { |
| | | heroBookRedpointList.Clear(); |
| | | foreach (var key in HeroConfig.GetKeys()) |
| | | { |
| | | { |
| | | var config = HeroConfig.Get(key); |
| | | if (config.PlayerCanUse == 0) |
| | | continue; |
| | |
| | | { |
| | | None = 0, //无功能 |
| | | Break = 1, //突破 |
| | | Gift = 2, //天赋吞噬 |
| | | Gift = 2, //天赋吞噬 |
| | | Awake = 3, //觉醒 |
| | | } |
| | | #endregion |