public BossCasterAiBehaviour(CharacterInstance character) { base.Character = character; this.m_parameters = ParseParameters(character.Character.BossAiParameters); this.m_targetingBehaviour = new MonsterTargetingAiBehaviour(character); switch (character.Character.CoreAiBehaviour) { case AiBehaviourType.MonsterRanged: this.m_attackBehaviour = new PursuitAndRangedAttackAiBehaviour(character); break; case AiBehaviourType.MonsterRangedToMelee: this.m_attackBehaviour = new PursuitAndRangedMeleeAttackAiBehaviour(character); break; case AiBehaviourType.MonsterPuffer: this.m_attackBehaviour = new StationarySkillUseAiBehaviour(character, SkillType.PoisonPuff); break; default: this.m_attackBehaviour = new PursuitAndMeleeAttackAiBehaviour(character); break; } for (int i = 0; i < this.m_parameters.PerkTypes.Count; i++) { PerkType perkType = this.m_parameters.PerkTypes[i]; PerkInstance item = new PerkInstance(); item.Type = perkType; item.Modifier = ConfigPerks.GetBestModifier(perkType); character.BossPerks.PerkInstances.Add(item); } this.m_skillTimer.set(ConfigSkills.SHARED_DATA[this.m_parameters.SkillType].BossFirstCastDelay); }
public void initialize(string upgradeId, RunestoneMilestone upgradeMilestone, int levelRequirement, bool stripedRow, bool isUnlocked) { this.UpgradeMilestone = upgradeMilestone; this.LevelReq.text = "Rank " + levelRequirement; this.Icon.enabled = true; if (this.UpgradeMilestone.Perk != null) { PerkInstance perk = this.UpgradeMilestone.Perk; PerkType perkType = perk.Type; ConfigPerks.SharedData data = ConfigPerks.SHARED_DATA[perkType]; this.Icon.sprite = PlayerView.Binder.SpriteResources.getSprite("Menu", data.SmallSprite); this.Description.text = MenuHelpers.GetFormattedPerkDescription(perkType, perk.Modifier, data.DurationSeconds, data.Threshold, 0f, true); } else { this.Icon.sprite = null; this.Description.text = "CHANGE ME"; } this.Background.color = !stripedRow ? ConfigUi.LIST_CELL_REGULAR_COLOR : ConfigUi.LIST_CELL_STRIPED_COLOR; if (isUnlocked) { this.CanvasGroup.alpha = 1f; this.Icon.material = null; } else { this.CanvasGroup.alpha = 0.5f; this.Icon.material = PlayerView.Binder.DisabledUiMaterial; } }
public void attachSupportPerk(PerkType perkType) { PetInstance instance = base.Character.OwningPlayer.Pets.getPetInstance(base.Character.Character); if ((instance != null) && instance.Character.FixedPerks.hasUnlockedPerkOfType(instance.Level, perkType)) { PerkInstance item = new PerkInstance(); item.Type = perkType; item.Modifier = ConfigPerks.GetBestModifier(perkType); base.Character.SupportPerks.PerkInstances.Add(item); } }
public SupportAiBehaviour(CharacterInstance character, [Optional, DefaultParameterValue(null)] List <PerkType> perkTypes) { base.Character = character; if (perkTypes != null) { for (int i = 0; i < perkTypes.Count; i++) { PerkType perkType = perkTypes[i]; PerkInstance item = new PerkInstance(); item.Type = perkType; item.Modifier = ConfigPerks.GetBestModifier(perkType); character.SupportPerks.PerkInstances.Add(item); } } this.attachSupportPerk(PerkType.AllyHeal); this.m_targetingAiBehaviour = new HeroTargetingAiBehaviour(character); this.m_movementBehaviour = new PursuitAiBehaviour(character); this.m_seekTacticalPositionTime = Time.fixedTime; this.m_nextPossibleHealSkillExecutionTime = Time.fixedTime; }
public static string GetFormattedPlayerUpgradePerkDescription(PerkInstance pi, float evolveBonus, bool colors) { ConfigPerks.SharedData data = ConfigPerks.SHARED_DATA[pi.Type]; string input = _.L(data.Description, null, false); Match match = Regex.Match(input, @"(\$.*\$)"); if ((match.Groups.Count <= 1) || !match.Groups[1].Success) { return(input); } string baseString = match.Groups[1].ToString(); string newValue = GetFormattedPerkString(pi.Type, baseString, pi.Modifier, data.DurationSeconds, data.Threshold, evolveBonus, false, true, false); if (colors) { string[] textArray1 = new string[] { "<color=#", ConfigUi.PERK_DESCRIPTION_VARIABLE_TEXT_COLOR_HEX, ">", newValue, "</color>" }; newValue = string.Concat(textArray1); } return(input.Replace(baseString, newValue)); }
public static string GetFormattedItemPerkDescription(ItemInstance ii, PerkInstance pi) { ConfigPerks.SharedData data = ConfigPerks.SHARED_DATA[pi.Type]; string input = _.L(data.Description, null, false); Match match = Regex.Match(input, @"(\$.*\$)"); if ((match.Groups.Count <= 1) || !match.Groups[1].Success) { return("CHANGE ME"); } int evolveRank = ii.EvolveRank; string baseString = match.Groups[1].ToString(); string str3 = GetFormattedPerkString(pi.Type, baseString, pi.Modifier, data.DurationSeconds, data.Threshold, ii.getEvolveBonusForPerk(pi.Type, 1), false, false, false); string str4 = GetFormattedPerkString(pi.Type, baseString, pi.Modifier, data.DurationSeconds, data.Threshold, ii.getEvolveBonusForPerk(pi.Type, evolveRank), false, true, false); if (1 < evolveRank) { string[] textArray1 = new string[] { "<color=#", ConfigUi.PERK_DESCRIPTION_VARIABLE_TEXT_COLOR_HEX, ">", str3, "</color>", "+", "<color=#", ConfigUi.PERK_DESCRIPTION_BONUS_VARIABLE_TEXT_COLOR_HEX, ">", str4, "</color>" }; return(input.Replace(baseString, string.Concat(textArray1))); } string[] textArray2 = new string[] { "<color=#", ConfigUi.PERK_DESCRIPTION_VARIABLE_TEXT_COLOR_HEX, ">", str4, "</color>" }; return(input.Replace(baseString, string.Concat(textArray2))); }
static ConfigRunestones() { Dictionary <int, int> dictionary = new Dictionary <int, int>(); dictionary.Add(0, 0); dictionary.Add(1, 3); dictionary.Add(2, 7); dictionary.Add(3, 20); RUNESTONE_UPDATE_V3_RARITY_TO_V4_GEM_REWARD = dictionary; SharedData[] dataArray1 = new SharedData[0x18]; SharedData data = new SharedData(); data.UnlockRank = 3; data.Id = "Runestone001"; data.Rarity = 1; SpriteAtlasEntry entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_whirlwind_1"; data.Sprite = entry; PerkInstance instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeWhirlwind2; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeWhirlwind2); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Whirlwind; dataArray1[0] = data; data = new SharedData(); data.UnlockRank = 4; data.Id = "Runestone003"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_whirlwind_2"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeWhirlwind3; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeWhirlwind3); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Whirlwind; dataArray1[1] = data; data = new SharedData(); data.UnlockRank = 14; data.Id = "Runestone002"; data.Rarity = 2; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_whirlwind_3"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeWhirlwind1; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeWhirlwind1); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Whirlwind; dataArray1[2] = data; data = new SharedData(); data.UnlockRank = 0x18; data.Id = "Runestone019"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_whirlwind_4"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeWhirlwind4; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeWhirlwind4); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Whirlwind; dataArray1[3] = data; data = new SharedData(); data.UnlockRank = 5; data.Id = "Runestone004"; data.Rarity = 1; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_leap_1"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeLeap1; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeLeap1); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Leap; dataArray1[4] = data; data = new SharedData(); data.UnlockRank = 6; data.Id = "Runestone005"; data.Rarity = 2; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_leap_2"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeLeap2; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeLeap2); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Leap; dataArray1[5] = data; data = new SharedData(); data.UnlockRank = 0x16; data.Id = "Runestone006"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_leap_3"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeLeap3; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeLeap3); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Leap; dataArray1[6] = data; data = new SharedData(); data.UnlockRank = 0x21; data.Id = "Runestone020"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_leap_4"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeLeap4; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeLeap4); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Leap; dataArray1[7] = data; data = new SharedData(); data.UnlockRank = 8; data.Id = "Runestone008"; data.Rarity = 2; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_clone_2"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeClone2; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeClone2); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Clone; dataArray1[8] = data; data = new SharedData(); data.UnlockRank = 0x10; data.Id = "Runestone007"; data.Rarity = 1; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_clone_1"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeClone1; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeClone1); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Clone; dataArray1[9] = data; data = new SharedData(); data.UnlockRank = 0x1f; data.Id = "Runestone009"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_clone_3"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeClone3; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeClone3); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Clone; dataArray1[10] = data; data = new SharedData(); data.UnlockRank = 0x29; data.Id = "Runestone021"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_clone_4"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeClone4; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeClone4); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Clone; dataArray1[11] = data; data = new SharedData(); data.UnlockRank = 11; data.Id = "Runestone010"; data.Rarity = 1; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_slam_1"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeSlam1; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeSlam1); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Slam; dataArray1[12] = data; data = new SharedData(); data.UnlockRank = 12; data.Id = "Runestone022"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_slam_4"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeSlam4; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeSlam4); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Slam; dataArray1[13] = data; data = new SharedData(); data.UnlockRank = 0x19; data.Id = "Runestone011"; data.Rarity = 2; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_slam_2"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeSlam2; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeSlam2); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Slam; dataArray1[14] = data; data = new SharedData(); data.UnlockRank = 0x23; data.Id = "Runestone012"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_slam_3"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeSlam3; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeSlam3); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Slam; dataArray1[15] = data; data = new SharedData(); data.UnlockRank = 0x13; data.Id = "Runestone013"; data.Rarity = 1; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_omnislash_3"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeOmnislash3; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeOmnislash3); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Omnislash; dataArray1[0x10] = data; data = new SharedData(); data.UnlockRank = 20; data.Id = "Runestone014"; data.Rarity = 2; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_omnislash_1"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeOmnislash1; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeOmnislash1); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Omnislash; dataArray1[0x11] = data; data = new SharedData(); data.UnlockRank = 0x26; data.Id = "Runestone015"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_omnislash_2"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeOmnislash2; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeOmnislash2); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Omnislash; dataArray1[0x12] = data; data = new SharedData(); data.UnlockRank = 0x2f; data.Id = "Runestone023"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_omnislash_4"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeOmnislash4; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeOmnislash4); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Omnislash; dataArray1[0x13] = data; data = new SharedData(); data.UnlockRank = 0x1c; data.Id = "Runestone016"; data.Rarity = 1; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_implosion_1"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeImplosion2; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeImplosion2); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Implosion; dataArray1[20] = data; data = new SharedData(); data.UnlockRank = 0x1d; data.Id = "Runestone017"; data.Rarity = 2; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_implosion_2"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeImplosion1; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeImplosion1); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Implosion; dataArray1[0x15] = data; data = new SharedData(); data.UnlockRank = 0x2c; data.Id = "Runestone018"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_implosion_3"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeImplosion4; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeImplosion4); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Implosion; dataArray1[0x16] = data; data = new SharedData(); data.UnlockRank = 50; data.Id = "Runestone024"; data.Rarity = 3; entry = new SpriteAtlasEntry(); entry.AtlasId = "Menu"; entry.SpriteId = "icon_rune_implosion_4"; data.Sprite = entry; instance = new PerkInstance(); instance.Type = PerkType.SkillUpgradeImplosion3; instance.Modifier = ConfigPerks.GetBestModifier(PerkType.SkillUpgradeImplosion3); data.PerkInstance = instance; data.LinkedToSkill = SkillType.Implosion; dataArray1[0x17] = data; RUNESTONES = dataArray1; Dictionary <SkillType, SpriteAtlasEntry> dictionary2 = new Dictionary <SkillType, SpriteAtlasEntry>(new SkillTypeBoxAvoidanceComparer()); dictionary2.Add(SkillType.Whirlwind, new SpriteAtlasEntry("Menu", "icon_rune_whirlwind_0")); dictionary2.Add(SkillType.Leap, new SpriteAtlasEntry("Menu", "icon_rune_leap_0")); dictionary2.Add(SkillType.Clone, new SpriteAtlasEntry("Menu", "icon_rune_clone_0")); dictionary2.Add(SkillType.Slam, new SpriteAtlasEntry("Menu", "icon_rune_slam_0")); dictionary2.Add(SkillType.Omnislash, new SpriteAtlasEntry("Menu", "icon_rune_omnislash_0")); dictionary2.Add(SkillType.Implosion, new SpriteAtlasEntry("Menu", "icon_rune_implosion_0")); BASIC_RUNESTONE_SPRITES = dictionary2; sm_tempList = new List <SharedData>(0x20); sm_unlockRankComparer = new SharedData.UnlockRankComparer(); }
protected override void onRefresh() { Player player = GameLogic.Binder.GameState.Player; CharacterInstance activeCharacter = player.ActiveCharacter; GameLogic.Item item = this.getReferenceItem(); if (this.ItemInstance != null) { int num; this.PowerText.text = MenuHelpers.BigValueToString(App.Binder.ConfigMeta.ItemPowerCurve(this.ItemInstance.Item.Type, player.getRiggedItemLevel(this.ItemInstance), this.ItemInstance.Rank)); int num2 = activeCharacter.getItemInstantUpgradeCount(this.ItemInstance, out num); if (num2 > ConfigMeta.ITEM_INSTANT_UPGRADE_LEVEL_THRESHOLD) { this.SpecialOfferPanel.SetActive(true); this.InstantUpgradeText.text = _.L(ConfigLoca.ITEMINFO_INSTANT_UPGRADE_DESCIPTION, new < > __AnonType8 <int>(num), false); this.InstantUpgradeButton.ButtonScript.interactable = num2 > 0; this.InstantUpgradeButton.ButtonImage.material = !this.InstantUpgradeButton.ButtonScript.interactable ? PlayerView.Binder.DisabledUiMaterial : null; this.InstantUpgradeButton.ButtonIcon.material = this.InstantUpgradeButton.ButtonImage.material; } else { this.SpecialOfferPanel.SetActive(false); } if (player.canEvolveItem(this.ItemInstance)) { this.EquipButton.enabled = true; this.EquipButtonImage.material = null; this.EquipButtonText.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_UPGRADE, null, false)); this.EquipButtonPulse.enabled = true; } else if (activeCharacter.isItemInstanceEquipped(this.ItemInstance)) { this.EquipButton.enabled = false; this.EquipButtonImage.material = PlayerView.Binder.DisabledUiMaterial; this.EquipButtonText.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_EQUIPPED, null, false)); this.EquipButtonPulse.enabled = false; this.IconSelectedBorder.enabled = true; } else if (!activeCharacter.hasReachedUnlockFloorForItem(this.ItemInstance)) { this.EquipButton.enabled = false; this.EquipButtonImage.material = PlayerView.Binder.DisabledUiMaterial; this.EquipButtonText.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_FLOOR_X, new < > __AnonType15 <int>(this.ItemInstance.UnlockFloor), false)); this.EquipButtonPulse.enabled = false; this.IconSelectedBorder.enabled = false; } else if (!this.ItemInstance.Unlocked) { this.EquipButton.enabled = false; this.EquipButtonImage.material = PlayerView.Binder.DisabledUiMaterial; this.EquipButtonText.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_LOCKED, null, false)); this.EquipButtonPulse.enabled = false; this.IconSelectedBorder.enabled = false; } else { this.EquipButton.enabled = true; this.EquipButtonImage.material = null; this.EquipButtonText.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.UI_PROMPT_EQUIP, null, false)); this.EquipButtonPulse.enabled = false; this.IconSelectedBorder.enabled = false; } this.LevelText.text = (player.getRiggedItemLevel(this.ItemInstance) + this.ItemInstance.Rank).ToString(); } else { this.PowerText.text = "0"; this.LevelText.text = "1"; this.SpecialOfferPanel.SetActive(false); } if ((this.ItemInstance != null) && (this.ItemInstance.Perks.count() > 0)) { this.RerollButton.interactable = true; this.RerollCost.text = App.Binder.ConfigMeta.ItemRerollDiamondCostCurve(this.ItemInstance.Rarity, this.ItemInstance.RerollCount).ToString(); } else { this.RerollButton.interactable = false; this.RerollCost.text = "-"; } this.RerollButtonImage.material = !this.RerollButton.interactable ? PlayerView.Binder.DisabledUiMaterial : null; int num3 = item.FixedPerks.count(); if (num3 > 0) { IconWithText text = this.Perks[0]; PerkInstance instance2 = item.FixedPerks.PerkInstances[0]; ConfigPerks.SharedData data = ConfigPerks.SHARED_DATA[instance2.Type]; text.gameObject.SetActive(true); text.Text.text = MenuHelpers.GetFormattedPerkDescription(instance2.Type, instance2.Modifier, data.DurationSeconds, data.Threshold, 0f, false); } else { this.Perks[0].gameObject.SetActive(false); } int count = this.ItemInstance.Perks.PerkInstances.Count; for (int i = 1; i < this.Perks.Count; i++) { IconWithText text2 = this.Perks[i]; PerkInstance instance3 = null; if ((this.ItemInstance != null) && ((i - 1) < count)) { instance3 = this.ItemInstance.Perks.PerkInstances[i - 1]; } if (instance3 != null) { ConfigPerks.SharedData data2 = ConfigPerks.SHARED_DATA[instance3.Type]; text2.gameObject.SetActive(true); text2.Icon.sprite = PlayerView.Binder.SpriteResources.getSprite("Menu", data2.SmallSprite); if (this.ItemInstance != null) { text2.Text.text = MenuHelpers.GetFormattedPerkDescription(instance3.Type, instance3.Modifier, data2.DurationSeconds, data2.Threshold, 0f, true); } else { text2.Text.text = "CHANGE ME"; } } else { text2.gameObject.SetActive(false); } } this.PerksTitleDivier.SetActive((num3 + count) > 0); }