| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | |
| | | |
| | | void Display() |
| | | { |
| | | shHero.Display(5, AddHero, ShowHeroTip, HappyXBModel.Instance.selectSHHeroWishID == 0 ? 0 : TreasureItemLibConfig.Get(HappyXBModel.Instance.selectSHHeroWishID).ItemID); |
| | | csHero.Display(4, AddHero, ShowHeroTip, HappyXBModel.Instance.selectCSHeroWishID == 0 ? 0 : TreasureItemLibConfig.Get(HappyXBModel.Instance.selectCSHeroWishID).ItemID); |
| | | int shHeroID = 0; |
| | | if (HappyXBModel.Instance.selectSHHeroWishID == -1) |
| | | { |
| | | shHeroID = -1; |
| | | } |
| | | else if (HappyXBModel.Instance.selectSHHeroWishID == 0) |
| | | { |
| | | shHeroID = 0; |
| | | } |
| | | else |
| | | { |
| | | shHeroID = TreasureItemLibConfig.Get(HappyXBModel.Instance.selectSHHeroWishID).ItemID; |
| | | } |
| | | |
| | | int csHeroID = 0; |
| | | if (HappyXBModel.Instance.selectCSHeroWishID == -1) |
| | | { |
| | | csHeroID = -1; |
| | | } |
| | | else if (HappyXBModel.Instance.selectCSHeroWishID == 0) |
| | | { |
| | | csHeroID = 0; |
| | | } |
| | | else |
| | | { |
| | | csHeroID = TreasureItemLibConfig.Get(HappyXBModel.Instance.selectCSHeroWishID).ItemID; |
| | | } |
| | | |
| | | shHero.Display(5, AddHero, ShowHeroTip, shHeroID); |
| | | csHero.Display(4, AddHero, ShowHeroTip, csHeroID); |
| | | |
| | | CreateScroller(); |
| | | |
| | |
| | | |
| | | void OnSelectWishHeroEvent() |
| | | { |
| | | shHero.Display(5, AddHero, ShowHeroTip, HappyXBModel.Instance.selectSHHeroWishID == 0 ? 0 : TreasureItemLibConfig.Get(HappyXBModel.Instance.selectSHHeroWishID).ItemID); |
| | | csHero.Display(4, AddHero, ShowHeroTip, HappyXBModel.Instance.selectCSHeroWishID == 0 ? 0 : TreasureItemLibConfig.Get(HappyXBModel.Instance.selectCSHeroWishID).ItemID); |
| | | int shHeroID = 0; |
| | | if (HappyXBModel.Instance.selectSHHeroWishID == -1) |
| | | { |
| | | shHeroID = -1; |
| | | } |
| | | else if (HappyXBModel.Instance.selectSHHeroWishID == 0) |
| | | { |
| | | shHeroID = 0; |
| | | } |
| | | else |
| | | { |
| | | shHeroID = TreasureItemLibConfig.Get(HappyXBModel.Instance.selectSHHeroWishID).ItemID; |
| | | } |
| | | |
| | | int csHeroID = 0; |
| | | if (HappyXBModel.Instance.selectCSHeroWishID == -1) |
| | | { |
| | | csHeroID = -1; |
| | | } |
| | | else if (HappyXBModel.Instance.selectCSHeroWishID == 0) |
| | | { |
| | | csHeroID = 0; |
| | | } |
| | | else |
| | | { |
| | | csHeroID = TreasureItemLibConfig.Get(HappyXBModel.Instance.selectCSHeroWishID).ItemID; |
| | | } |
| | | |
| | | shHero.Display(5, AddHero, ShowHeroTip, shHeroID); |
| | | csHero.Display(4, AddHero, ShowHeroTip, csHeroID); |
| | | scroller.m_Scorller.RefreshActiveCellViews(); |
| | | } |
| | | |
| | |
| | | var pack = new CA569_tagCSTreasureWishSelect(); |
| | | pack.TreasureType = (int)HappXBTitle.HeroCallAdvanced; |
| | | |
| | | pack.WishIDList = new uint[] { (uint)HappyXBModel.Instance.selectSHHeroWishID, (uint)HappyXBModel.Instance.selectCSHeroWishID }; |
| | | |
| | | pack.WishIDList = new uint[] { (uint)Math.Max(0, HappyXBModel.Instance.selectSHHeroWishID), (uint)Math.Max(0, HappyXBModel.Instance.selectCSHeroWishID) }; |
| | | pack.WishCnt = 2; |
| | | GameNetSystem.Instance.SendInfo(pack); |
| | | CloseWindow(); |