Exemplo n.º 1
0
        public void GetFewParticles()
        {
            foreach (ulong key in TrackedFiles[0xA5])
            {
                STUUnlock_HighlightIntro highlightIntro = GetInstance <STUUnlock_HighlightIntro>(key);
                if (highlightIntro?.Animation == null)
                {
                    continue;
                }
                using (Stream animStream = OpenFile(highlightIntro.Animation)) {
                    using (BinaryReader animReader = new BinaryReader(animStream)) {
                        animStream.Position = 0x18L;
                        ulong infokey = animReader.ReadUInt64();
                        if (infokey == 0)
                        {
                            continue;
                        }
                        using (Stream chunkStream = OpenFile(infokey)) {
                            Chunked chunked = new Chunked(chunkStream);

                            if (chunked.GetAllOfTypeFlat <RPCE>().Length == 1)
                            {
                                Console.Out.WriteLine(GetString(highlightIntro.CosmeticName));
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected HighlightInfoJSON GetHighlightInfo(Highlight.HighlightInfoNew infoNew)
        {
            HighlightInfoJSON outputJson = new HighlightInfoJSON();
            STUHero           hero       = GetInstance <STUHero>(infoNew.HeroMasterKey);

            outputJson.Hero   = GetString(hero?.Name);
            outputJson.Player = infoNew.PlayerName;

            STUUnlock_HighlightIntro intro = GetInstance <STUUnlock_HighlightIntro>(infoNew.HighlightIntro);

            outputJson.HighlightIntro = GetString(intro.CosmeticName);

            // todo: outputJson.WeaponSkin
            // todo: outputJson.Skin

            STUHighlightType highlightType = GetInstance <STUHighlightType>(infoNew.HighlightType);

            outputJson.HighlightType = GetString(highlightType?.Name) ?? "";
            return(outputJson);
        }
Exemplo n.º 3
0
        protected HeroInfoJSON GetHeroInfo(Common.HeroInfo heroInfo)
        {
            STUHero hero = GetInstance <STUHero>(heroInfo.HeroMasterKey);

            HeroInfoJSON outputHero = new HeroInfoJSON {
                Hero       = GetString(hero.Name),
                Sprays     = new List <string>(),
                Emotes     = new List <string>(),
                VoiceLines = new List <string>()
            };

            foreach (uint sprayId in heroInfo.SprayIds)
            {
                STUUnlock_Spray spray = GetInstance <STUUnlock_Spray>(GetCosmeticKey(sprayId));
                outputHero.Sprays.Add(GetString(spray.CosmeticName));
            }
            foreach (uint emoteId in heroInfo.EmoteIds)
            {
                STUUnlock_Emote emote = GetInstance <STUUnlock_Emote>(GetCosmeticKey(emoteId));
                outputHero.Emotes.Add(GetString(emote.CosmeticName));
            }

            foreach (uint voiceLineId in heroInfo.VoiceLineIds)
            {
                STUUnlock_VoiceLine voiceLine = GetInstance <STUUnlock_VoiceLine>(GetCosmeticKey(voiceLineId));
                outputHero.VoiceLines.Add(GetString(voiceLine.CosmeticName));
            }
            STUUnlock_HighlightIntro intro = GetInstance <STUUnlock_HighlightIntro>(GetCosmeticKey(heroInfo.HighlightIntro));

            outputHero.HighlightIntro = GetString(intro.CosmeticName);

            // Skin skin = GetInstance<Skin>(GetSkinKey(heroInfo.SkinId));  // todo: this is by skin override
            // outputHero.Skin = GetString(skin?.CosmeticName);

            // Weapon weaponSkin = GetInstance<Weapon>(GetCosmeticKey(heroInfo.WeaponSkinId));  // todo: this is by weapon skin override
            // outputHero.WeaponSkin = GetString(weaponSkin?.CosmeticName);

            return(outputHero);
        }