private void Init(STUHero hero, ulong key = default) { GUID = (teResourceGUID)key; Name = GetString(hero.m_0EDCE350); Description = GetDescriptionString(hero.m_3446F580); Gender = hero.m_gender; Size = hero.m_heroSize; GalleryColor = hero.m_heroColor; //if (hero.m_skinThemes != null) { // SkinThemes = new List<HeroSkinTheme>(); // foreach (STU_63172E83 skinTheme in hero.m_skinThemes) { // SkinThemes.Add(new HeroSkinTheme(skinTheme)); // } //} if (hero.m_heroLoadout != null) { Loadouts = new List <Loadout>(); foreach (teResourceGUID loadoutGUID in hero.m_heroLoadout) { var loadout = Loadout.GetLoadout(loadoutGUID); if (loadout == null) { continue; } Loadouts.Add(loadout); } } }
private void Init(STUHero hero, ulong key = default) { STU = hero; GUID = (teResourceGUID)key; Name = GetString(hero.m_0EDCE350); Description = GetDescriptionString(hero.m_3446F580); Class = GetNullableGUIDName(hero.m_category); Gender = hero.m_gender; Size = hero.m_heroSize; GalleryColor = hero.m_heroColor; Color = GalleryColor.ToHex(); sRGBColor = GalleryColor.ToNonLinear().ToHex(); SupportsAi = hero.m_906C3711 > 0; IsHero = hero.m_62746D34 > 0; if (hero.m_heroLoadout != null) { Loadouts = new List <LoadoutLite>(); foreach (teResourceGUID loadoutGUID in hero.m_heroLoadout) { var loadout = Loadout.GetLoadout(loadoutGUID); if (loadout == null) { continue; } Loadouts.Add(loadout.ToLite()); } } // Contains array of various hero images, hero gallery portraits, small hero select icons, etc. if (hero.m_8203BFE1 != null) { Images = new List <HeroImage>(); foreach (var imageSet in hero.m_8203BFE1) { Images.Add(new HeroImage { Id = imageSet.m_id, TextureGUID = imageSet.m_texture }); } } }