Esempio n. 1
0
        private void Init(STU_73AE9738 def, ulong key = default)
        {
            if (def == null)
            {
                return;
            }

            Id           = (teResourceGUID)key;
            Name         = GetString(def.m_137210AF);
            Location     = GetString(def.m_4BA3B3CE);
            Abbreviation = GetString(def.m_0945E50A);
            Logo         = def.m_AC77C84A;
            LogoAlt      = def.m_DA688288;

            Division = def.m_AA53A680;

            FullName = $"{Location} {(string.Equals(Location, Name) ? "" : Name)}".Trim();
        }
Esempio n. 2
0
        public void Init(STULoadout loadout, ulong key = default)
        {
            GUID        = (teResourceGUID)key;
            MovieGUID   = loadout.m_infoMovie;
            TextureGUID = loadout.m_texture;
            Category    = loadout.m_category;

            Name        = GetString(loadout.m_name);
            Description = GetString(loadout.m_description);

            Button             = GetString(STUHelper.GetInstance <STU_C5243F93>(loadout.m_logicalButton)?.m_name);
            ButtonUnk          = GetString(STUHelper.GetInstance <STU_C5243F93>(loadout.m_9290B942)?.m_name);
            DescriptionButtons = loadout.m_B1124918?.Select(x => GetString(STUHelper.GetInstance <STU_C5243F93>(x)?.m_name)).ToArray();

            // If the ability isn't shown in the UI (weapons, zoom ability)
            IsHiddenAbility = loadout.m_0E679979 >= 1;

            // Mercy, Bastion and Torbjorn all have 2 weapons, this is only set on their secondary weapons??
            IsSecondaryWeapon = loadout.m_0E679979 == 2;
        }
Esempio n. 3
0
        private void Init(STU_2B8093CD brawl, ulong key = default)
        {
            GUID = (teResourceGUID)key;

            if (brawl.m_catalog != null)
            {
                var mapCatalog = GetInstance <STUMapCatalog>(brawl.m_catalog);
                if (mapCatalog?.m_headerGUIDs != null)
                {
                    Maps = mapCatalog.m_headerGUIDs.Select(x => new MapHeader(x).ToLite()).ToList();
                }
            }

            if (brawl.m_rulesets != null)
            {
                Rulesets = new List <GameRulesetGameMode>();

                foreach (var br in brawl.m_rulesets)
                {
                    var ruleset = GetInstance <STUGameRuleset>(br);
                    if (ruleset.m_gamemode == null)
                    {
                        continue;
                    }

                    Rulesets.Add(new GameRulesetGameMode(ruleset.m_gamemode));
                }
            }

            var brawlName = GetInstance <STU_4B259FE1>(brawl.m_A848F2C7);

            if (brawlName != null)
            {
                Name = GetString(brawlName.m_name);
            }

            Achievements = brawl.m_ECCC6D23?.Select(x => new Achievement(x)).ToArray();
            Unlocks      = brawl.m_B1449DF7?.Select(x => new Unlock(x)).ToArray();
        }
Esempio n. 4
0
        private void Init(STU_E3594B8E arcade, ulong key = default)
        {
            GUID        = (teResourceGUID)key;
            Name        = GetString(arcade.m_name);
            Description = GetString(arcade.m_description);
            Image       = arcade.m_21EB3E73;
            Unknown     = Helper.JSON.FixArray(arcade.m_5797DE13);

            switch (arcade)
            {
            case STU_598579A3 a1:
                Brawl = a1.m_5DC61E59;
                break;

            case STU_19C05237 a2:
                Children = Helper.JSON.FixArray(a2.m_children);
                break;

            default:
                break;
            }
        }
Esempio n. 5
0
        // todo: more fields and stuff.

        public VoiceLineInstance(STUVoiceLineInstance instance)
        {
            if (instance.m_AF226247 != null)
            {
                var voiceSounds = new List <ulong>();
                foreach (var soundFile in new[] {
                    instance.m_AF226247.m_1485B834, instance.m_AF226247.m_798027DE,
                    instance.m_AF226247.m_A84AA2B5, instance.m_AF226247.m_D872E45C
                })
                {
                    if (soundFile != null)
                    {
                        voiceSounds.Add(soundFile.m_3C099E86);
                    }
                }
                VoiceSounds = voiceSounds.ToArray();
            }

            if (instance.m_voiceLineRuntime != null)
            {
                VoiceConversation = instance.m_voiceLineRuntime.m_voiceConversation;
            }
        }
Esempio n. 6
0
 public MapHeaderLite(MapHeader mapHeader)
 {
     GUID    = mapHeader.GUID;
     Name    = mapHeader.Name;
     MapGUID = mapHeader.MapGUID;
 }
Esempio n. 7
0
 public LootBoxShopCard(STULootBoxShopCard shopCard)
 {
     Text    = GetString(shopCard.m_cardText);
     Texture = shopCard.m_cardTexture;
 }
Esempio n. 8
0
 private void Init(STU_71C0D73D reportResponse, ulong key = default)
 {
     GUID        = (teResourceGUID)key;
     Title       = GetString(reportResponse.m_BEBA3AEF);
     Description = GetString(reportResponse.m_C65AA24E);
 }
Esempio n. 9
0
 public MapHeaderLite(MapHeader mapHeader)
 {
     GUID        = mapHeader.GUID;
     Name        = mapHeader.Name;
     VariantName = mapHeader.VariantName;
 }
Esempio n. 10
0
 private void Init(STU_15A511F9 cReplacementContainer, ulong key = default)
 {
     GUID = (teResourceGUID)key;
     ReplacementsSettings = cReplacementContainer.m_97BAD106.Select(x => new ChatReplacementSettings(x)).ToArray();
 }
Esempio n. 11
0
 private void Init(STUVoiceConversationLine convoLine, ulong key = default)
 {
     GUID          = (teResourceGUID)key;
     VoicelineGUID = (teResourceGUID)convoLine.m_lineGUID;
     Position      = convoLine.m_B4D405A1;
 }
Esempio n. 12
0
 public GameModeLite(GameMode gameMode)
 {
     GUID = gameMode.GUID;
     Name = gameMode.Name;
 }