public void AskForGuide() { OptionData option = dropdown.options[dropdown.value]; BasePatternSpell basePatternSpell = mfxTraningCampPatternComponent.GetSpellPoints(option.text); ElementType elementType = ElementTypeExtensions.GetElementTypeByName(option.text); coverageUI.FilterSpellCoverage(elementType); if (basePatternSpell == null) { spellGuideDrawer.ClearGuide(); } else { spellGuideDrawer.DrawGuide(basePatternSpell.SpellPatternPoints.GetPoints()); } }
public BasePatternSpell GetSpellPoints(string name) { var basePatterns = dataManager.GetBasePatterns(); if (name == "No") { return(null); } else { ElementType type = ElementTypeExtensions.GetElementTypeByName(name); for (int i = 0; i < basePatterns.Count; i++) { if (basePatterns[i].elementType == type) { return(basePatterns[i]); } } return(null); } }