public static int GetHeroNeedEnergy(int id, Skill skill) { HeroData data = userHeros.Find(x => x.id == id || x.id.Equals(id)); if (data != null && skill != null) { return(SkillSystem.GetNeedSkillEnergy(skill) - GetHeroStatusSkillEnergy(ref data)); } return(1000); }