Beispiel #1
0
        public Hero(STUHero hero)
        {
            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 loadout in hero.m_heroLoadout)
                {
                    STULoadout stuLoadout = GetInstance <STULoadout>(loadout);
                    if (stuLoadout == null)
                    {
                        continue;
                    }

                    Loadouts.Add(new Loadout(stuLoadout));
                }
            }
        }
Beispiel #2
0
        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);
                }
            }
        }
Beispiel #3
0
 public static string ToBackground(this teColorRGBA color)
 {
     return($"\x1b[48;2;{(int) (color.R * 255.0f)};{(int) (color.G * 255.0f)};{(int) (color.B * 255.0f)}m");
 }