| | |
| | | |
| | | void Click(HeroInfo hero, int index) |
| | | { |
| | | //上阵 锁定 觉醒 的情况 |
| | | if (hero.awakeLevel > 0) |
| | | if (!HeroUIManager.Instance.SelectDeleteHero(hero)) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("HeroReborn1"); |
| | | return; |
| | | } |
| | | |
| | | if (hero.IsInAnyTeamJustOne()) |
| | | { |
| | | //阵容至少要有一个武将上阵 |
| | | SysNotifyMgr.Instance.ShowTip("HeroFunc3"); |
| | | return; |
| | | } |
| | | |
| | | if (hero.isLock) |
| | | { |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), |
| | | Language.Get("herocard66"), (bool isOK) => |
| | | { |
| | | if (isOK) |
| | | { |
| | | hero.ChangeLockState(); |
| | | } |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (hero.IsInAnyTeam()) |
| | | { |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), |
| | | Language.Get("herocard65"), (bool isOK) => |
| | | { |
| | | if (isOK) |
| | | { |
| | | hero.LeaveAllTeam(); |
| | | } |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (HeroUIManager.Instance.selectDeleteHeroList.Contains(hero.itemHero.guid)) |
| | | { |
| | | HeroUIManager.Instance.selectDeleteHeroList.Remove(hero.itemHero.guid); |
| | | } |
| | | else |
| | | { |
| | | HeroUIManager.Instance.selectDeleteHeroList.Add(hero.itemHero.guid); |
| | | } |
| | | |
| | | Display(index); |