protected override bool dragAllowed() { CharacterInstance activeCharacter = GameLogic.Binder.GameState.Player.ActiveCharacter; ConfigSkills.SharedData data = ConfigSkills.SHARED_DATA[this.SkillInstance.SkillType]; return((this.SkillMenu.DraggedSkillToggle == null) && (activeCharacter.Rank >= data.UnlockRank)); }
public void reconstructCell(CellData cell) { ConfigSkills.SharedData data = ConfigSkills.SHARED_DATA[cell.SkillType]; cell.Icon.sprite = PlayerView.Binder.SpriteResources.getSprite(data.Spritesheet, data.Sprite); cell.Name.text = StringExtensions.ToUpperLoca(_.L(data.Name, null, false)); cell.Name.color = Color.white; }
public int getRunestoneSkillGroupIndex(string runestoneId) { ConfigRunestones.SharedData runestoneData = ConfigRunestones.GetRunestoneData(runestoneId); ConfigPerks.SharedData data2 = ConfigPerks.SHARED_DATA[runestoneData.PerkInstance.Type]; ConfigSkills.SharedData data3 = ConfigSkills.SHARED_DATA[data2.LinkedToSkill]; return(data3.Group); }
public int CompareTo(SkillInstance other) { ConfigSkills.SharedData data = ConfigSkills.SHARED_DATA[this.SkillType]; ConfigSkills.SharedData data2 = ConfigSkills.SHARED_DATA[other.SkillType]; if (data.UnlockRank < data2.UnlockRank) { return(-1); } if (data.UnlockRank > data2.UnlockRank) { return(1); } return(0); }
public void refreshContent(SkillInstance si) { if ((si == null) || (si.SkillType == SkillType.NONE)) { base.ReceivingImage.enabled = false; this.SkillName.text = string.Empty; } else { ConfigSkills.SharedData data = ConfigSkills.SHARED_DATA[si.SkillType]; base.ReceivingImage.enabled = true; base.ReceivingImage.sprite = PlayerView.Binder.SpriteResources.getSprite(data.Spritesheet, data.Sprite); this.SkillName.text = data.Name; } }
public void initialize(PlayerView.SkillMenu skillMenu, CharacterInstance owner, GameLogic.SkillInstance skillInstance) { this.SkillMenu = skillMenu; this.Owner = owner; this.SkillInstance = skillInstance; ConfigSkills.SharedData data = ConfigSkills.SHARED_DATA[skillInstance.SkillType]; this.Image.sprite = PlayerView.Binder.SpriteResources.getSprite(data.Spritesheet, data.Sprite); this.Name.text = _.L(data.Name, null, false); ColorBlock colors = this.Toggle.colors; if (owner.Rank >= data.UnlockRank) { object[] objArray1 = new object[] { "<color=orange>", skillInstance.Rank, "/", App.Binder.ConfigMeta.GLOBAL_LEVEL_CAP, "</color>" }; this.Text.text = string.Concat(objArray1); colors.normalColor = Color.white; } else { this.Text.text = "<color=red>Lvl " + data.UnlockRank + "</color>"; colors.normalColor = DISABLED_SKILL_TOGGLE_COLOR; } this.Toggle.colors = colors; }
private void addSkillTitleCellToGrid(int rowIdx, Transform parentTm) { IconWithText text = this.m_skillTitleCells[rowIdx]; SkillType nONE = SkillType.NONE; switch (rowIdx) { case 0: nONE = SkillType.Whirlwind; break; case 1: nONE = SkillType.Leap; break; case 2: nONE = SkillType.Clone; break; case 3: nONE = SkillType.Slam; break; case 4: nONE = SkillType.Omnislash; break; case 5: nONE = SkillType.Implosion; break; } ConfigSkills.SharedData data = ConfigSkills.SHARED_DATA[nONE]; text.Icon.sprite = PlayerView.Binder.SpriteResources.getSprite(data.Spritesheet, data.Sprite); text.Text.text = StringExtensions.ToUpperLoca(_.L(data.Name, null, false)); text.transform.SetParent(parentTm, false); text.gameObject.SetActive(true); }
public void refreshCell(CellData cell, bool highlighted) { Player player = GameLogic.Binder.GameState.Player; CharacterInstance activeCharacter = player.ActiveCharacter; ConfigSkills.SharedData data = ConfigSkills.SHARED_DATA[cell.SkillType]; List <RunestoneSelection> list = player.Runestones.getRunestoneSelectionsForSkillType(cell.SkillType, RunestoneSelectionSource.None); if (list.Count == 0) { cell.Header.text = _.L(ConfigLoca.RUNESTONE_NAME_BASIC, null, false); } else { cell.Header.text = string.Empty; for (int i = 0; i < list.Count; i++) { cell.Header.text = cell.Header.text + _.L(ConfigRunestones.GetShortDescription(list[i].Id), null, false); if (i < (list.Count - 1)) { cell.Header.text = cell.Header.text + " + "; } } } bool flag = player.Runestones.getRunestoneSelectionsForSkillType(cell.SkillType, RunestoneSelectionSource.Pet).Count > 0; bool flag2 = player.hasUnlockedSkill(cell.SkillType); cell.Button.interactable = true; if (activeCharacter.isSkillActive(cell.SkillType)) { cell.SelectedBorder.gameObject.SetActive(true); cell.SelectedBorder.color = ConfigUi.COLOR_HIGHLIGHTED; cell.TextAlphaGroup.alpha = 1f; cell.Icon.material = null; cell.IconBG.material = null; cell.LockIcon.SetActive(false); cell.LockText.text = string.Empty; cell.Icon.color = ConfigUi.COLOR_HIGHLIGHTED; cell.IconBG.color = ConfigUi.COLOR_HIGHLIGHTED; } else { cell.SelectedBorder.gameObject.SetActive(false); if (flag2) { cell.TextAlphaGroup.alpha = 0.5f; cell.Icon.material = null; cell.IconBG.material = null; cell.Icon.color = !highlighted ? ConfigUi.COLOR_DEHIGHLIGHTED_UNLOCKED : ConfigUi.COLOR_HIGHLIGHTED; cell.IconBG.color = !highlighted ? ConfigUi.COLOR_DEHIGHLIGHTED_UNLOCKED : ConfigUi.COLOR_HIGHLIGHTED; cell.LockIcon.SetActive(false); cell.LockText.text = string.Empty; } else { cell.TextAlphaGroup.alpha = 0.3f; cell.Icon.material = PlayerView.Binder.DisabledUiMaterial; cell.IconBG.material = PlayerView.Binder.DisabledUiMaterial; cell.Icon.color = ConfigUi.COLOR_DEHIGHLIGHTED_LOCKED; cell.IconBG.color = ConfigUi.COLOR_DEHIGHLIGHTED_LOCKED; cell.LockIcon.SetActive(true); cell.LockText.text = StringExtensions.ToUpperLoca(_.L(ConfigLoca.SKILL_POPUP_UNLOCKS_AT_LEVEL_SHORT, new < > __AnonType8 <int>(data.UnlockRank), false)); } } cell.UnlockNotifier.SetActive(player.Notifiers.isSkillGoldNotificationActive(cell.SkillType)); cell.PetSourceIconRoot.SetActive(flag && flag2); }