private void OnUnitSelect(long uniqueID) { if (!Object.op_Inequality((Object)this.mUnitListWindow, (Object)null) || !this.mUnitListWindow.IsEnabled()) { return; } UnitListRootWindow rootWindow = this.mUnitListWindow.rootWindow; if (rootWindow == null || rootWindow.GetEditType() != UnitListWindow.EditType.DEFAULT) { return; } UnitListRootWindow.ListData listData = rootWindow.GetListData("unitlist"); if (listData != null) { this.mCurrentTab = rootWindow.GetCurrentTab(); this.mCurrentTabAnchorePos = rootWindow.GetCurrentTabAnchore(); this.mCurrentUnit = uniqueID; this.mUEMain.UnitList = listData.GetUniqs(); } else { List <long> longList = new List <long>(); List <UnitData> units = MonoSingleton <GameManager> .Instance.Player.Units; for (int index = 0; index < units.Count; ++index) { longList.Add(units[index].UniqueID); } this.mUEMain.UnitList = longList; } this.mUEMain.Refresh(uniqueID, 0L, false); this.mUEMain.OnUserClose = new UnitEnhanceV3.CloseEvent(this.OnUEWindowClosedByUser); ButtonEvent.Invoke("UNITLIST_BTN_CLOSE", (object)null); this.mUnitListWindow.Enabled(false); }
private void OnUnitSelect(long uniqueID) { if (Object.op_Equality((Object)this.mUnitListWindow, (Object)null) || !this.mUnitListWindow.IsEnabled()) { return; } UnitListRootWindow rootWindow = this.mUnitListWindow.rootWindow; if (rootWindow == null || rootWindow.GetEditType() != UnitListWindow.EditType.DEFAULT) { return; } this.StartCoroutine(this.InitUnitInventoryWindow(rootWindow, uniqueID)); }