| | |
| | | } |
| | | } |
| | | |
| | | #region 洗炼 |
| | | public string selectWashHeroGUID; //被洗练武将GUID |
| | | public Action changeLockEvent; |
| | | |
| | | #endregion |
| | | |
| | | public List<string> heroEatList = new List<string>(); |
| | | |
| | |
| | | //根据天赋锁状态获取消耗的材料数量 |
| | | public int GetTalentLockUseWashCount(HeroInfo hero) |
| | | { |
| | | return washByLockUseCounts[hero.GetTalentLockCount()]; |
| | | int heroTalentLockCount = hero.GetTalentLockCount(); |
| | | //不够取最后一个 |
| | | if (heroTalentLockCount >= washByLockUseCounts.Length) |
| | | { |
| | | heroTalentLockCount = washByLockUseCounts.Length - 1; |
| | | } |
| | | return washByLockUseCounts[heroTalentLockCount]; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | //beforeGiftIDList用于对比变化的天赋格子 |
| | | public void RefreshGiftCell(GiftBaseCell[] giftBaseCells, HeroInfo hero, List<int> beforeGiftIDList= null, List<int> beforeGiftLevelList= null) |
| | | public void RefreshGiftCell(GiftBaseCell[] giftBaseCells, HeroInfo hero, List<int> beforeGiftIDList = null, List<int> beforeGiftLevelList = null) |
| | | { |
| | | int showCount = GetGiftGirdMaxCount(hero.heroId); |
| | | for (int i = 0; i < giftBaseCells.Length; i++) |
| | |
| | | int state = 0; //0:不显示 1:新增 2:提升 |
| | | |
| | | if (!beforeGiftIDList.IsNullOrEmpty()) |
| | | { |
| | | { |
| | | if (i >= beforeGiftIDList.Count) |
| | | { |
| | | state = 1; |
| | |
| | | |
| | | |
| | | public void ShowStarImg(int starCount, Image[] starImages, bool noStarShow = true) |
| | | { |
| | | { |
| | | int imgCount = starImages.Length; |
| | | for (int i = 0; i < imgCount; i++) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // public ushort ItemIndex; //武将物品所在武将背包位置索引 |
| | | // public byte LockCnt; |
| | | // public byte[] LockTalentIndexs; //锁定天赋索引列表 |
| | | // public byte OPType; // 操作类型:0-执行洗炼;1-替换原天赋;2-保留原天赋 |
| | | public void SendWash(HeroInfo hero, byte opType) |
| | | { |
| | | var pack = new CB235_tagCSHeroWash(); |
| | | pack.ItemIndex = (ushort)hero.itemHero.gridIndex; |
| | | pack.LockCnt = (byte)hero.talentLockList.Count; |
| | | pack.LockTalentIndexs = new byte[pack.LockCnt]; |
| | | for (int i = 0; i < pack.LockCnt; i++) |
| | | { |
| | | pack.LockTalentIndexs[i] = (byte)hero.talentLockList[i]; |
| | | } |
| | | pack.OPType = opType; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | } |
| | | } |
| | | |