Esempio n. 1
0
        protected HighlightInfoJSON GetHighlightInfo(tePlayerHighlight.HighlightInfo infoNew)
        {
            HighlightInfoJSON outputJson = new HighlightInfoJSON();
            STUHero           hero       = GetInstance <STUHero>(infoNew.Hero);

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

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

            outputJson.HighlightIntro = GetString(intro.m_name);

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

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

            outputJson.HighlightType = GetString(highlightType?.m_description) ?? "";
            return(outputJson);
        }
Esempio n. 2
0
        protected HeroInfoJSON GetHeroInfo(HeroData heroInfo)
        {
            STUHero hero = GetInstance <STUHero>(heroInfo.Hero);

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

            foreach (uint sprayId in heroInfo.SprayIds)
            {
                STUUnlock_SprayPaint spray = GetInstance <STUUnlock_SprayPaint>(GetCosmeticKey(sprayId));
                outputHero.Sprays.Add(GetString(spray.m_name));
            }

            foreach (uint emoteId in heroInfo.EmoteIds)
            {
                STUUnlock_Emote emote = GetInstance <STUUnlock_Emote>(GetCosmeticKey(emoteId));
                outputHero.Emotes.Add(GetString(emote.m_name));
            }

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

            STUUnlock_POTGAnimation intro = GetInstance <STUUnlock_POTGAnimation>(GetCosmeticKey(heroInfo.POTGAnimation));

            outputHero.HighlightIntro = GetString(intro.m_name);

            // 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);
        }
Esempio n. 3
0
        private void SaveUnlock(ulong guid)
        {
            Unlock unlock;

            try {
                unlock = new Unlock(guid);
            } catch (NotImplementedException) {
                return;
            }

            STUUnlock_POTGAnimation potgAnim = unlock.STU as STUUnlock_POTGAnimation;

            if (potgAnim == null)
            {
                return;
            }
            if (potgAnim.m_animation == 0)
            {
                return;
            }
            //if (unlock.Name != "Selfie") return;
            SaveAnimation(Path.Combine(@"C:\ow\dump\1.28\effect", GetValidFilename(unlock.GetName())), potgAnim.m_animation);
        }