public void Init(FollowerDetailView followerDetailView) { this.m_currentFollowerDetailView = followerDetailView; FollowerInventoryListItem[] componentsInChildren = this.m_armamentListContent.GetComponentsInChildren <FollowerInventoryListItem>(true); FollowerInventoryListItem[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { FollowerInventoryListItem followerInventoryListItem = array[i]; Object.DestroyImmediate(followerInventoryListItem.get_gameObject()); } bool active = true; IEnumerator enumerator = PersistentArmamentData.armamentDictionary.get_Values().GetEnumerator(); try { while (enumerator.MoveNext()) { MobileFollowerArmament item = (MobileFollowerArmament)enumerator.get_Current(); FollowerInventoryListItem followerInventoryListItem2 = Object.Instantiate <FollowerInventoryListItem>(this.m_armamentListItemPrefab); followerInventoryListItem2.get_transform().SetParent(this.m_armamentListContent.get_transform(), false); followerInventoryListItem2.SetArmament(item, followerDetailView); active = false; } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } this.m_emptyMessage.get_gameObject().SetActive(active); }
public void SetArmament(MobileFollowerArmament item, FollowerDetailView followerDetailView) { this.m_armamentItem = item; this.m_followerDetailView = followerDetailView; ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID); this.m_equipmentName.set_text(GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID) + record.Display + "</color>"); SpellTooltipRec record2 = StaticDB.spellTooltipDB.GetRecord(item.SpellID); if (record2 != null) { this.m_equipmentDescription.set_text(record2.Description); } else { this.m_equipmentDescription.set_text(string.Concat(new object[] { "ERROR. Unknown Spell ID: ", item.SpellID, " Item ID:", item.ItemID })); } this.m_equipmentDescription.set_text(WowTextParser.parser.Parse(this.m_equipmentDescription.get_text(), item.SpellID)); this.m_equipmentDescription.set_supportRichText(WowTextParser.parser.IsRichText()); if (this.m_iconErrorText != null) { this.m_iconErrorText.get_gameObject().SetActive(false); } Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID); if (sprite != null) { this.m_equipmentIcon.set_sprite(sprite); } else if (this.m_iconErrorText != null) { this.m_iconErrorText.get_gameObject().SetActive(true); this.m_iconErrorText.set_text(string.Empty + record.IconFileDataID); } this.m_equipmentQuantity.set_text((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity)); JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary.get_Item(this.m_followerDetailView.GetCurrentFollower()); if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0) { this.m_useItemButtonLabel.set_text(StaticDB.GetString("ON_MISSION", null)); this.m_useItemButtonLabel.set_color(new Color(0.5f, 0.5f, 0.5f, 1f)); this.m_useItemButton.set_interactable(false); } else if (jamGarrisonFollower != null && (jamGarrisonFollower.ItemLevelArmor + jamGarrisonFollower.ItemLevelWeapon) / 2 >= 850) { this.m_useItemButtonLabel.set_text(FollowerInventoryListItem.m_maxiLevelString); this.m_useItemButtonLabel.set_color(new Color(0.5f, 0.5f, 0.5f, 1f)); this.m_useItemButton.set_interactable(false); } else { this.m_useItemButtonLabel.set_text(StaticDB.GetString("USE_ITEM", null)); } }
public void Init(FollowerDetailView followerDetailView) { this.m_currentFollowerDetailView = followerDetailView; FollowerInventoryListItem[] componentsInChildren = this.m_armamentListContent.GetComponentsInChildren <FollowerInventoryListItem>(true); foreach (FollowerInventoryListItem followerInventoryListItem in componentsInChildren) { Object.DestroyImmediate(followerInventoryListItem.gameObject); } bool active = true; IEnumerator enumerator = PersistentArmamentData.armamentDictionary.Values.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; MobileFollowerArmamentExt item = (MobileFollowerArmamentExt)obj; FollowerInventoryListItem followerInventoryListItem2 = Object.Instantiate <FollowerInventoryListItem>(this.m_armamentListItemPrefab); followerInventoryListItem2.transform.SetParent(this.m_armamentListContent.transform, false); followerInventoryListItem2.SetArmament(item, followerDetailView); active = false; } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } this.m_emptyMessage.gameObject.SetActive(active); }
public void ShowEquipmentDialog(int garrAbilityID, FollowerDetailView followerDetailView, bool show) { if (show) { this.m_equipmentDialog.SetAbility(garrAbilityID, followerDetailView); } this.m_equipmentDialog.get_gameObject().SetActive(show); }
public void ShowArmamentDialog(FollowerDetailView followerDetailView, bool show) { if (show) { this.m_armamentDialog.Init(followerDetailView); } this.m_armamentDialog.get_gameObject().SetActive(show); }
private void OnDisable() { Main.instance.m_backButtonManager.PopBackAction(); Main.instance.m_canvasBlurManager.RemoveBlurRef_MainCanvas(); Main expr_24 = Main.instance; expr_24.ArmamentInventoryChangedAction = (Action)Delegate.Remove(expr_24.ArmamentInventoryChangedAction, new Action(this.HandleArmamentsChanged)); this.m_currentFollowerDetailView = null; }
private void OnDisable() { Main.instance.m_canvasBlurManager.RemoveBlurRef_MainCanvas(); Main.instance.m_backButtonManager.PopBackAction(); Main expr_24 = Main.instance; expr_24.EquipmentInventoryChangedAction = (Action)Delegate.Remove(expr_24.EquipmentInventoryChangedAction, new Action(this.UpdateDisplayCB)); this.m_garrAbilityID = 0; this.m_followerDetailView = null; }
public void Show(FollowerDetailView followerDetailView) { base.get_gameObject().SetActive(true); this.m_followerDetailView = followerDetailView; this.m_areYouSureLabel.set_text(StaticDB.GetString("ARE_YOU_SURE", null)); this.m_reactivationCostLabel.set_text(StaticDB.GetString("CHAMPION_REACTIVATION_COST", null)); this.m_cancelButtonLabel.set_text(StaticDB.GetString("NO", null)); this.m_okButtonLabel.set_text(StaticDB.GetString("YES_DEACTIVATE", null)); this.m_reactivationCostText.set_text(string.Empty + GarrisonStatus.GetFollowerActivationGoldCost()); }
public void SetAbility(int garrAbilityID, FollowerDetailView followerDetailView) { GarrAbilityRec record = StaticDB.garrAbilityDB.GetRecord(garrAbilityID); if (record == null) { Debug.LogWarning("Invalid garrAbilityID " + garrAbilityID); return; } this.m_abilityNameText.set_text(record.Name); this.m_abilityDescription.set_text(WowTextParser.parser.Parse(record.Description, 0)); this.m_abilityDescription.set_supportRichText(WowTextParser.parser.IsRichText()); this.m_abilityDisplay.SetAbility(garrAbilityID, true, true, null); FollowerInventoryListItem[] componentsInChildren = this.m_equipmentListContent.GetComponentsInChildren <FollowerInventoryListItem>(true); FollowerInventoryListItem[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { FollowerInventoryListItem followerInventoryListItem = array[i]; Object.DestroyImmediate(followerInventoryListItem.get_gameObject()); } bool active = true; IEnumerator enumerator = PersistentEquipmentData.equipmentDictionary.get_Values().GetEnumerator(); try { while (enumerator.MoveNext()) { MobileFollowerEquipment mobileFollowerEquipment = (MobileFollowerEquipment)enumerator.get_Current(); GarrAbilityRec record2 = StaticDB.garrAbilityDB.GetRecord(mobileFollowerEquipment.GarrAbilityID); if (record2 != null) { if ((record2.Flags & 64u) == 0u) { FollowerInventoryListItem followerInventoryListItem2 = Object.Instantiate <FollowerInventoryListItem>(this.m_equipmentListItemPrefab); followerInventoryListItem2.get_transform().SetParent(this.m_equipmentListContent.get_transform(), false); followerInventoryListItem2.SetEquipment(mobileFollowerEquipment, followerDetailView, garrAbilityID); active = false; } } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } this.m_noEquipmentMessage.get_gameObject().SetActive(active); }
public void SetAbility(int garrAbilityID, FollowerDetailView followerDetailView) { GarrAbilityRec record = StaticDB.garrAbilityDB.GetRecord(garrAbilityID); if (record == null) { Debug.LogWarning("Invalid garrAbilityID " + garrAbilityID); return; } this.m_garrAbilityID = garrAbilityID; this.m_followerDetailView = followerDetailView; this.m_abilityNameText.set_text(record.Name); this.m_abilityDescription.set_text(WowTextParser.parser.Parse(record.Description, 0)); this.m_abilityDescription.set_supportRichText(WowTextParser.parser.IsRichText()); this.m_abilityDisplay.SetAbility(garrAbilityID, true, true, null); this.UpdateEquipmentDisplay(garrAbilityID, followerDetailView); }
public void Show(FollowerDetailView followerDetailView) { base.gameObject.SetActive(true); this.m_followerDetailView = followerDetailView; this.m_areYouSureLabel.text = StaticDB.GetString("ARE_YOU_SURE", null); this.m_activationsRemainingLabel.text = StaticDB.GetString("ACTIVATIONS_LEFT_TODAY", null); this.m_activationCostLabel.text = StaticDB.GetString("CHAMPION_ACTIVATION_COST", null); this.m_cancelButtonLabel.text = StaticDB.GetString("NO", null); this.m_okButtonLabel.text = StaticDB.GetString("YES_ACTIVATE", null); if (GarrisonStatus.Gold() < 250) { this.m_okButtonLabel.text = StaticDB.GetString("CANT_AFFORD", null); this.m_okButton.interactable = false; } else { this.m_okButton.interactable = true; } this.m_activationsRemainingText.text = string.Empty + GarrisonStatus.GetRemainingFollowerActivations(); this.m_activationCostText.text = string.Empty + GarrisonStatus.GetFollowerActivationGoldCost(); }
private void UpdateEquipmentDisplay(int garrAbilityID, FollowerDetailView followerDetailView) { FollowerInventoryListItem[] componentsInChildren = this.m_equipmentListContent.GetComponentsInChildren <FollowerInventoryListItem>(true); FollowerInventoryListItem[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { FollowerInventoryListItem followerInventoryListItem = array[i]; Object.DestroyImmediate(followerInventoryListItem.get_gameObject()); } bool active = true; IEnumerator enumerator = PersistentEquipmentData.equipmentDictionary.get_Values().GetEnumerator(); try { while (enumerator.MoveNext()) { MobileFollowerEquipment mobileFollowerEquipment = (MobileFollowerEquipment)enumerator.get_Current(); GarrAbilityRec record = StaticDB.garrAbilityDB.GetRecord(mobileFollowerEquipment.GarrAbilityID); if (record != null) { if ((record.Flags & 64u) == 0u) { FollowerInventoryListItem followerInventoryListItem2 = Object.Instantiate <FollowerInventoryListItem>(this.m_equipmentListItemPrefab); followerInventoryListItem2.get_transform().SetParent(this.m_equipmentListContent.get_transform(), false); followerInventoryListItem2.SetEquipment(mobileFollowerEquipment, followerDetailView, garrAbilityID); active = false; } } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } this.m_noEquipmentMessage.get_gameObject().SetActive(active); }
private void UpdateEquipmentDisplay(int garrAbilityID, FollowerDetailView followerDetailView) { FollowerInventoryListItem[] componentsInChildren = this.m_equipmentListContent.GetComponentsInChildren <FollowerInventoryListItem>(true); foreach (FollowerInventoryListItem followerInventoryListItem in componentsInChildren) { Object.DestroyImmediate(followerInventoryListItem.gameObject); } bool active = true; IEnumerator enumerator = PersistentEquipmentData.equipmentDictionary.Values.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; MobileFollowerEquipment mobileFollowerEquipment = (MobileFollowerEquipment)obj; GarrAbilityRec record = StaticDB.garrAbilityDB.GetRecord(mobileFollowerEquipment.GarrAbilityID); if (record != null) { if ((record.Flags & 64u) == 0u) { FollowerInventoryListItem followerInventoryListItem2 = Object.Instantiate <FollowerInventoryListItem>(this.m_equipmentListItemPrefab); followerInventoryListItem2.transform.SetParent(this.m_equipmentListContent.transform, false); followerInventoryListItem2.SetEquipment(mobileFollowerEquipment, followerDetailView, garrAbilityID); active = false; } } } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } this.m_noEquipmentMessage.gameObject.SetActive(active); }
public void Init(FollowerDetailView followerDetailView, int abilityToReplace) { this.m_followerDetailView = followerDetailView; this.m_abilityToReplace = abilityToReplace; FollowerInventoryListItem[] componentsInChildren = this.m_equipmentInventoryContent.GetComponentsInChildren <FollowerInventoryListItem>(true); foreach (FollowerInventoryListItem followerInventoryListItem in componentsInChildren) { Object.DestroyImmediate(followerInventoryListItem.gameObject); } int num = 0; IEnumerator enumerator = PersistentEquipmentData.equipmentDictionary.Values.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; MobileFollowerEquipment item = (MobileFollowerEquipment)obj; if (num == 0) { GameObject gameObject = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject.transform.SetParent(this.m_equipmentInventoryContent.transform, false); FollowerInventoryListItem component = gameObject.GetComponent <FollowerInventoryListItem>(); component.SetHeaderText("Equipment"); } GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_followerInventoryListItemPrefab); gameObject2.transform.SetParent(this.m_equipmentInventoryContent.transform, false); FollowerInventoryListItem component2 = gameObject2.GetComponent <FollowerInventoryListItem>(); component2.SetEquipment(item, followerDetailView, abilityToReplace); num++; } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } if (num == 0) { GameObject gameObject3 = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject3.transform.SetParent(this.m_equipmentInventoryContent.transform, false); FollowerInventoryListItem component3 = gameObject3.GetComponent <FollowerInventoryListItem>(); component3.SetHeaderText(StaticDB.GetString("NO_EQUIPMENT", null)); } int num2 = 0; IEnumerator enumerator2 = PersistentArmamentData.armamentDictionary.Values.GetEnumerator(); try { while (enumerator2.MoveNext()) { object obj2 = enumerator2.Current; MobileFollowerArmamentExt item2 = (MobileFollowerArmamentExt)obj2; if (num2 == 0) { GameObject gameObject4 = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject4.transform.SetParent(this.m_equipmentInventoryContent.transform, false); FollowerInventoryListItem component4 = gameObject4.GetComponent <FollowerInventoryListItem>(); component4.SetHeaderText("Armaments"); } GameObject gameObject5 = Object.Instantiate <GameObject>(this.m_followerInventoryListItemPrefab); gameObject5.transform.SetParent(this.m_equipmentInventoryContent.transform, false); FollowerInventoryListItem component5 = gameObject5.GetComponent <FollowerInventoryListItem>(); component5.SetArmament(item2, followerDetailView); num2++; } } finally { IDisposable disposable2; if ((disposable2 = (enumerator2 as IDisposable)) != null) { disposable2.Dispose(); } } if (num == 0) { GameObject gameObject6 = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject6.transform.SetParent(this.m_equipmentInventoryContent.transform, false); FollowerInventoryListItem component6 = gameObject6.GetComponent <FollowerInventoryListItem>(); component6.SetHeaderText(StaticDB.GetString("NO_ARMAMENTS", null)); } }
public void Init(FollowerDetailView followerDetailView, int abilityToReplace) { this.m_followerDetailView = followerDetailView; this.m_abilityToReplace = abilityToReplace; FollowerInventoryListItem[] componentsInChildren = this.m_equipmentInventoryContent.GetComponentsInChildren <FollowerInventoryListItem>(true); FollowerInventoryListItem[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { FollowerInventoryListItem followerInventoryListItem = array[i]; Object.DestroyImmediate(followerInventoryListItem.get_gameObject()); } int num = 0; IEnumerator enumerator = PersistentEquipmentData.equipmentDictionary.get_Values().GetEnumerator(); try { while (enumerator.MoveNext()) { MobileFollowerEquipment item = (MobileFollowerEquipment)enumerator.get_Current(); if (num == 0) { GameObject gameObject = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject.get_transform().SetParent(this.m_equipmentInventoryContent.get_transform(), false); FollowerInventoryListItem component = gameObject.GetComponent <FollowerInventoryListItem>(); component.SetHeaderText("Equipment"); } GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_followerInventoryListItemPrefab); gameObject2.get_transform().SetParent(this.m_equipmentInventoryContent.get_transform(), false); FollowerInventoryListItem component2 = gameObject2.GetComponent <FollowerInventoryListItem>(); component2.SetEquipment(item, followerDetailView, abilityToReplace); num++; } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } if (num == 0) { GameObject gameObject3 = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject3.get_transform().SetParent(this.m_equipmentInventoryContent.get_transform(), false); FollowerInventoryListItem component3 = gameObject3.GetComponent <FollowerInventoryListItem>(); component3.SetHeaderText(StaticDB.GetString("NO_EQUIPMENT", null)); } int num2 = 0; IEnumerator enumerator2 = PersistentArmamentData.armamentDictionary.get_Values().GetEnumerator(); try { while (enumerator2.MoveNext()) { MobileFollowerArmament item2 = (MobileFollowerArmament)enumerator2.get_Current(); if (num2 == 0) { GameObject gameObject4 = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject4.get_transform().SetParent(this.m_equipmentInventoryContent.get_transform(), false); FollowerInventoryListItem component4 = gameObject4.GetComponent <FollowerInventoryListItem>(); component4.SetHeaderText("Armaments"); } GameObject gameObject5 = Object.Instantiate <GameObject>(this.m_followerInventoryListItemPrefab); gameObject5.get_transform().SetParent(this.m_equipmentInventoryContent.get_transform(), false); FollowerInventoryListItem component5 = gameObject5.GetComponent <FollowerInventoryListItem>(); component5.SetArmament(item2, followerDetailView); num2++; } } finally { IDisposable disposable2 = enumerator2 as IDisposable; if (disposable2 != null) { disposable2.Dispose(); } } if (num == 0) { GameObject gameObject6 = Object.Instantiate <GameObject>(this.m_headerPrefab); gameObject6.get_transform().SetParent(this.m_equipmentInventoryContent.get_transform(), false); FollowerInventoryListItem component6 = gameObject6.GetComponent <FollowerInventoryListItem>(); component6.SetHeaderText(StaticDB.GetString("NO_ARMAMENTS", null)); } }
public void ShowChampionDeactivationConfirmationDialog(FollowerDetailView followerDetailView) { this.m_championDeactivationConfirmationDialog.Show(followerDetailView); }
public void SetCurrentFollowerDetailView(FollowerDetailView followerDetailView) { this.m_currentFollowerDetailView = followerDetailView; }
public void SetAbility(int garrAbilityID, bool hideCounterInfo = false, bool hideName = false, FollowerDetailView followerDetailView = null) { this.m_followerDetailView = followerDetailView; if (this.m_iconErrorText != null) { this.m_iconErrorText.gameObject.SetActive(false); } this.m_garrAbilityID = garrAbilityID; GarrAbilityRec record = StaticDB.garrAbilityDB.GetRecord(this.m_garrAbilityID); if (record == null) { Debug.LogWarning("Invalid garrAbilityID " + this.m_garrAbilityID); return; } this.m_abilityNameText.text = record.Name; if (record.IconFileDataID > 0) { Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID); if (sprite != null) { this.m_abilityIcon.sprite = sprite; if (this.m_grayscaleShader != null) { Material material = new Material(this.m_grayscaleShader); this.m_abilityIcon.material = material; } } else if (this.m_iconErrorText != null) { this.m_iconErrorText.gameObject.SetActive(true); this.m_iconErrorText.text = string.Empty + record.IconFileDataID; } this.m_abilityIcon.enabled = true; } else { this.m_abilityIcon.enabled = false; } this.m_garrAbilityID = record.ID; GarrAbilityCategoryRec record2 = StaticDB.garrAbilityCategoryDB.GetRecord((int)record.GarrAbilityCategoryID); if (record2 != null) { this.m_counteredMechanicName.text = record2.Name; } if (this.m_counteredMechanicGroup != null) { if (hideCounterInfo) { this.m_counteredMechanicGroup.SetActive(false); } else { this.m_counteredGarrMechanicTypeID = 0; StaticDB.garrAbilityEffectDB.EnumRecordsByParentID(record.ID, delegate(GarrAbilityEffectRec garrAbilityEffectRec) { if (garrAbilityEffectRec.GarrMechanicTypeID == 0u) { return(true); } if (garrAbilityEffectRec.AbilityAction != 0u) { return(true); } GarrMechanicTypeRec record3 = StaticDB.garrMechanicTypeDB.GetRecord((int)garrAbilityEffectRec.GarrMechanicTypeID); if (record3 == null) { return(true); } Sprite sprite2 = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record3.IconFileDataID); if (sprite2 != null) { this.m_counteredMechanicIcon.sprite = sprite2; } else { this.m_counteredMechanicName.text = "ERR " + record3.IconFileDataID; } this.m_counteredGarrMechanicTypeID = record3.ID; return(false); }); } } this.SetCountered(false, true); if (this.m_counteredMechanicGroup != null) { this.m_counteredMechanicGroup.SetActive(this.m_counteredGarrMechanicTypeID > 0); } this.m_abilityNameText.gameObject.SetActive(!hideName); }
public void SetEquipment(MobileFollowerEquipment item, FollowerDetailView followerDetailView, int abilityToReplace) { this.m_abilityToReplace = abilityToReplace; this.m_equipmentItem = item; this.m_followerDetailView = followerDetailView; ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID); this.m_equipmentName.text = GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID) + record.Display + "</color>"; GarrAbilityRec record2 = StaticDB.garrAbilityDB.GetRecord(item.GarrAbilityID); if (record2 != null) { this.m_equipmentDescription.text = record2.Description; } else { SpellTooltipRec record3 = StaticDB.spellTooltipDB.GetRecord(item.SpellID); if (record3 != null) { this.m_equipmentDescription.text = record3.Description; } else { this.m_equipmentDescription.text = string.Concat(new object[] { "ERROR. Ability ID:", item.GarrAbilityID, " Spell ID: ", item.SpellID, " Item ID:", item.ItemID }); } } this.m_equipmentDescription.text = GeneralHelpers.LimitZhLineLength(WowTextParser.parser.Parse(this.m_equipmentDescription.text, 0), 18); this.m_equipmentDescription.supportRichText = WowTextParser.parser.IsRichText(); if (this.m_iconErrorText != null) { this.m_iconErrorText.gameObject.SetActive(false); } Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID); if (sprite != null) { this.m_equipmentIcon.sprite = sprite; } else if (this.m_iconErrorText != null) { this.m_iconErrorText.gameObject.SetActive(true); this.m_iconErrorText.text = string.Empty + record.IconFileDataID; } this.m_equipmentQuantity.text = ((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity)); JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary[this.m_followerDetailView.GetCurrentFollower()]; if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0) { this.m_useItemButtonLabel.text = StaticDB.GetString("ON_MISSION", null); this.m_useItemButtonLabel.color = new Color(0.5f, 0.5f, 0.5f, 1f); this.m_useItemButton.interactable = false; } else { this.m_useItemButtonLabel.text = StaticDB.GetString("USE_ITEM", null); } }
public void SetArmament(MobileFollowerArmamentExt item, FollowerDetailView followerDetailView) { this.m_armamentItem = item; this.m_followerDetailView = followerDetailView; ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID); if (record != null) { this.m_equipmentName.text = GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID) + record.Display + "</color>"; } else { this.m_equipmentName.text = "Unknown Item " + item.ItemID; } SpellTooltipRec record2 = StaticDB.spellTooltipDB.GetRecord(item.SpellID); if (record2 != null) { this.m_equipmentDescription.text = record2.Description; } else { this.m_equipmentDescription.text = string.Concat(new object[] { "ERROR. Unknown Spell ID: ", item.SpellID, " Item ID:", item.ItemID }); } this.m_equipmentDescription.text = WowTextParser.parser.Parse(this.m_equipmentDescription.text, item.SpellID); this.m_equipmentDescription.supportRichText = WowTextParser.parser.IsRichText(); if (this.m_iconErrorText != null) { this.m_iconErrorText.gameObject.SetActive(false); } if (record != null) { Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID); if (sprite != null) { this.m_equipmentIcon.sprite = sprite; } else if (this.m_iconErrorText != null) { this.m_iconErrorText.gameObject.SetActive(true); this.m_iconErrorText.text = string.Empty + record.IconFileDataID; } } this.m_equipmentQuantity.text = ((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity)); JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary[this.m_followerDetailView.GetCurrentFollower()]; bool flag = false; if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0) { GarrMissionRec record3 = StaticDB.garrMissionDB.GetRecord(jamGarrisonFollower.CurrentMissionID); if (record3 != null && (record3.Flags & 16u) != 0u) { flag = true; } } int num = (jamGarrisonFollower.ItemLevelArmor + jamGarrisonFollower.ItemLevelWeapon) / 2; bool flag2 = num >= item.MinItemLevel && num < item.MaxItemLevel; if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0 && !flag) { this.m_useItemButtonLabel.text = StaticDB.GetString("ON_MISSION", null); this.m_useItemButtonLabel.color = new Color(0.5f, 0.5f, 0.5f, 1f); this.m_useItemButton.interactable = false; } else if (!flag2 || (long)num >= (long)((ulong)GeneralHelpers.GetMaxFollowerItemLevel())) { this.m_useItemButtonLabel.text = FollowerInventoryListItem.m_maxiLevelString; this.m_useItemButtonLabel.color = new Color(0.5f, 0.5f, 0.5f, 1f); this.m_useItemButton.interactable = false; } else { this.m_useItemButtonLabel.text = StaticDB.GetString("USE_ITEM", null); } }