Example #1
0
            public InternalSellInfo()
            {
                Add(typeof(HairDye), HairDye.GetSBSellValue());

                //Add( typeof( SpecialBeardDye ), 1000000 );
                //Add( typeof( SpecialHairDye ), 1000000 );
            }
    private void Setup(HairType type, HairSetCollection hair, int meshIndex, float typeNum, float dyeNum, MaterialPropertyBlock block)
    {
        this.CacheOriginalMaterials();
        HairSetCollection.HairSetEntry hairSetEntry = hair.Get(type, typeNum);
        if (hairSetEntry.HairSet == null)
        {
            Debug.LogWarning("Hair.Get returned a NULL hair");
            return;
        }
        int num = -1;

        if (type == HairType.Facial || type == HairType.Eyebrow)
        {
            num = meshIndex;
        }
        HairDye           hairDye           = null;
        HairDyeCollection hairDyeCollection = hairSetEntry.HairDyeCollection;

        if (hairDyeCollection != null)
        {
            hairDye = hairDyeCollection.Get(dyeNum);
        }
        hairSetEntry.HairSet.Process(this, hairDyeCollection, hairDye, block);
        hairSetEntry.HairSet.ProcessMorphs(base.gameObject, num);
    }
Example #3
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo(typeof(RefreshPotion), 15, 9, 0xF0B, 0));
                Add(new GenericBuyInfo(typeof(AgilityPotion), 15, 9, 0xF08, 0));
                Add(new GenericBuyInfo(typeof(NightSightPotion), 15, 9, 0xF06, 0));
                Add(new GenericBuyInfo(typeof(LesserHealPotion), 15, 9, 0xF0C, 0));
                Add(new GenericBuyInfo(typeof(StrengthPotion), 15, 9, 0xF09, 0));
                Add(new GenericBuyInfo(typeof(LesserPoisonPotion), 15, 9, 0xF0A, 0));
                Add(new GenericBuyInfo(typeof(LesserCurePotion), 15, 9, 0xF07, 0));
                Add(new GenericBuyInfo(typeof(LesserExplosionPotion), 21, 9, 0xF0D, 0));
                Add(new GenericBuyInfo(typeof(MortarPestle), 8, 9, 0xE9B, 0));

                Add(new GenericBuyInfo(typeof(BlackPearl), 5, 20, 0xF7A, 0));
                Add(new GenericBuyInfo(typeof(Bloodmoss), 5, 20, 0xF7B, 0));
                Add(new GenericBuyInfo(typeof(Garlic), 3, 20, 0xF84, 0));
                Add(new GenericBuyInfo(typeof(Ginseng), 3, 20, 0xF85, 0));
                Add(new GenericBuyInfo(typeof(MandrakeRoot), 3, 20, 0xF86, 0));
                Add(new GenericBuyInfo(typeof(Nightshade), 3, 20, 0xF88, 0));
                Add(new GenericBuyInfo(typeof(SpidersSilk), 3, 20, 0xF8D, 0));
                Add(new GenericBuyInfo(typeof(SulfurousAsh), 3, 20, 0xF8C, 0));

                Add(new GenericBuyInfo(typeof(Bottle), 5, 9, 0xF0E, 0));

                Add(new GenericBuyInfo("1041060", typeof(HairDye), 37, 9, 0xEFF, HairDye.GetHue()));
            }
 private void Setup(
     HairType type,
     HairSetCollection hair,
     int meshIndex,
     float typeNum,
     float dyeNum,
     MaterialPropertyBlock block)
 {
     this.CacheOriginalMaterials();
     HairSetCollection.HairSetEntry hairSetEntry = hair.Get(type, typeNum);
     if (Object.op_Equality((Object)hairSetEntry.HairSet, (Object)null))
     {
         Debug.LogWarning((object)"Hair.Get returned a NULL hair");
     }
     else
     {
         int blendShapeIndex = -1;
         if (type == HairType.Facial || type == HairType.Eyebrow)
         {
             blendShapeIndex = meshIndex;
         }
         HairDye           dye = (HairDye)null;
         HairDyeCollection hairDyeCollection = hairSetEntry.HairDyeCollection;
         if (Object.op_Inequality((Object)hairDyeCollection, (Object)null))
         {
             dye = hairDyeCollection.Get(dyeNum);
         }
         hairSetEntry.HairSet.Process(this, hairDyeCollection, dye, block);
         hairSetEntry.HairSet.ProcessMorphs(((Component)this).get_gameObject(), blendShapeIndex);
     }
 }
            public InternalSellInfo()
            {
                Add(typeof(Bottle), Bottle.GetSBSellValue());
                Add(typeof(MortarPestle), MortarPestle.GetSBSellValue());

                Add(typeof(BlackPearl), BlackPearl.GetSBSellValue());
                Add(typeof(Bloodmoss), Bloodmoss.GetSBSellValue());
                Add(typeof(MandrakeRoot), MandrakeRoot.GetSBSellValue());
                Add(typeof(Garlic), Garlic.GetSBSellValue());
                Add(typeof(Ginseng), Ginseng.GetSBSellValue());
                Add(typeof(Nightshade), Nightshade.GetSBSellValue());
                Add(typeof(SpidersSilk), SpidersSilk.GetSBSellValue());
                Add(typeof(SulfurousAsh), SulfurousAsh.GetSBSellValue());

                Add(typeof(LesserMagicResistPotion), LesserMagicResistPotion.GetSBSellValue());
                Add(typeof(AgilityPotion), AgilityPotion.GetSBSellValue());
                Add(typeof(StrengthPotion), StrengthPotion.GetSBSellValue());
                Add(typeof(RefreshPotion), RefreshPotion.GetSBSellValue());
                Add(typeof(LesserCurePotion), LesserCurePotion.GetSBSellValue());
                Add(typeof(LesserHealPotion), LesserHealPotion.GetSBSellValue());
                Add(typeof(LesserPoisonPotion), LesserPoisonPotion.GetSBSellValue());
                Add(typeof(LesserExplosionPotion), LesserExplosionPotion.GetSBSellValue());

                Add(typeof(HairDye), HairDye.GetSBSellValue());
            }
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Bottle", typeof(Bottle), Bottle.GetSBPurchaseValue(), 200, 0xF0E, 0));
                Add(new GenericBuyInfo("Mortar and Pestle", typeof(MortarPestle), MortarPestle.GetSBPurchaseValue(), 10, 0xE9B, 0));

                Add(new GenericBuyInfo("Black Pearl", typeof(BlackPearl), BlackPearl.GetSBPurchaseValue(), 500, 0xF7A, 0));
                Add(new GenericBuyInfo("Bloodmoss", typeof(Bloodmoss), Bloodmoss.GetSBPurchaseValue(), 500, 0xF7B, 0));
                Add(new GenericBuyInfo("Mandrake Root", typeof(MandrakeRoot), MandrakeRoot.GetSBPurchaseValue(), 500, 0xF86, 0));
                Add(new GenericBuyInfo("Garlic", typeof(Garlic), Garlic.GetSBPurchaseValue(), 500, 0xF84, 0));
                Add(new GenericBuyInfo("Ginseng", typeof(Ginseng), Ginseng.GetSBPurchaseValue(), 500, 0xF85, 0));
                Add(new GenericBuyInfo("Nightshade", typeof(Nightshade), Nightshade.GetSBPurchaseValue(), 500, 0xF88, 0));
                Add(new GenericBuyInfo("Spider Silk", typeof(SpidersSilk), SpidersSilk.GetSBPurchaseValue(), 500, 0xF8D, 0));
                Add(new GenericBuyInfo("Sulfurous Ash", typeof(SulfurousAsh), SulfurousAsh.GetSBPurchaseValue(), 500, 0xF8C, 0));

                Add(new GenericBuyInfo("Lesser Heal Potion", typeof(LesserHealPotion), LesserHealPotion.GetSBPurchaseValue(), 50, 0xF0C, 0));
                Add(new GenericBuyInfo("Lesser Cure Potion", typeof(LesserCurePotion), LesserCurePotion.GetSBPurchaseValue(), 50, 0xF07, 0));
                Add(new GenericBuyInfo("Refresh Potion", typeof(RefreshPotion), RefreshPotion.GetSBPurchaseValue(), 50, 0xF0B, 0));
                Add(new GenericBuyInfo("Agility Potion", typeof(AgilityPotion), AgilityPotion.GetSBPurchaseValue(), 50, 0xF08, 0));
                Add(new GenericBuyInfo("Strength Potion", typeof(StrengthPotion), StrengthPotion.GetSBPurchaseValue(), 50, 0xF09, 0));
                Add(new GenericBuyInfo("Lesser Magic Resist Potion", typeof(LesserMagicResistPotion), LesserMagicResistPotion.GetSBPurchaseValue(), 10, 0xF06, 0));
                Add(new GenericBuyInfo("Lesser Poison Potion", typeof(LesserPoisonPotion), LesserPoisonPotion.GetSBPurchaseValue(), 50, 0xF0A, 0));
                Add(new GenericBuyInfo("Lesser Explosion Potion", typeof(LesserExplosionPotion), LesserExplosionPotion.GetSBPurchaseValue(), 50, 0xF0D, 0));

                Add(new GenericBuyInfo("Hair Dye", typeof(HairDye), HairDye.GetSBPurchaseValue(), 10, 0xEFF, 0));
            }
Example #7
0
        public HairDyeGump(HairDye dye) : base(50, 50)
        {
            m_HairDye = dye;

            AddPage(0);

            AddBackground(100, 10, 350, 355, 2600);
            AddBackground(120, 54, 110, 270, 5100);

            AddHtmlLocalized(70, 25, 400, 35, 1011013); // <center>Hair Color Selection Menu</center>

            AddButton(149, 328, 4005, 4007, 1);
            AddHtmlLocalized(185, 329, 250, 35, 1011014); // Dye my hair this color!

            for (var i = 0; i < m_Entries.Length; ++i)
            {
                AddLabel(130, 59 + i * 22, m_Entries[i].HueStart - 1, m_Entries[i].Name);
                AddButton(207, 60 + i * 22, 5224, 5224, 0, GumpButtonType.Page, i + 1);
            }

            for (var i = 0; i < m_Entries.Length; ++i)
            {
                var e = m_Entries[i];

                AddPage(i + 1);

                for (var j = 0; j < e.HueCount; ++j)
                {
                    AddLabel(278 + j / 16 * 80, 52 + j % 16 * 17, e.HueStart + j - 1, "*****");
                    AddRadio(260 + j / 16 * 80, 52 + j % 16 * 17, 210, 211, false, i * 100 + j);
                }
            }
        }
    public void SetupHairCap(SkinSetCollection skin, float hairNum, float meshNum, MaterialPropertyBlock block)
    {
        float   single;
        float   single1;
        int     index = skin.GetIndex(meshNum);
        SkinSet skins = skin.Skins[index];

        if (skins != null)
        {
            for (int i = 0; i < 5; i++)
            {
                if (((int)this.hairCapMask & 1 << (i & 31)) != 0)
                {
                    PlayerModelHair.GetRandomVariation(hairNum, i, index, out single, out single1);
                    HairType hairType = (HairType)i;
                    HairSetCollection.HairSetEntry hairSetEntry = skins.HairCollection.Get(hairType, single);
                    if (hairSetEntry.HairSet != null)
                    {
                        HairDyeCollection hairDyeCollection = hairSetEntry.HairDyeCollection;
                        if (hairDyeCollection != null)
                        {
                            HairDye hairDye = hairDyeCollection.Get(single1);
                            if (hairDye != null)
                            {
                                hairDye.ApplyCap(hairDyeCollection, hairType, block);
                            }
                        }
                    }
                }
            }
        }
    }
Example #9
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Hair Dye", typeof(HairDye), HairDye.GetSBPurchaseValue(), 25, 0xEFF, 0));

                //Add( new GenericBuyInfo( "special beard dye", typeof( SpecialBeardDye ), 2000000, 20, 0xE26, 0 ) );
                //Add( new GenericBuyInfo( "special hair dye", typeof( SpecialHairDye ), 2000000, 20, 0xE26, 0 ) );
                //Add( new GenericBuyInfo( "1041060", typeof( HairDye ), 60, 20, 0xEFF, 0 ) );
            }
Example #10
0
 public InternalBuyInfo()
 {
     Add(new GenericBuyInfo(typeof(Backpack), 15, 9, 0x9B2, 0));
     Add(new GenericBuyInfo(typeof(Pouch), 6, 9, 0xE79, 0));
     Add(new GenericBuyInfo(typeof(Torch), 8, 9, 0xF6B, 0));
     Add(new GenericBuyInfo(typeof(Lantern), 2, 9, 0xA25, 0));
     //Add( new GenericBuyInfo( typeof( OilFlask ), 8, 9, 0x####, 0 ) );
     Add(new GenericBuyInfo(typeof(Lockpick), 12, 9, 0x14FC, 0));
     Add(new GenericBuyInfo(typeof(WoodenBox), 14, 9, 0x9AA, 0));
     Add(new GenericBuyInfo(typeof(Key), 2, 9, 0x100E, 0));
     Add(new GenericBuyInfo(typeof(HairDye), 37, 9, 0xEFF, HairDye.GetHue()));
 }
Example #11
0
            public InternalSellInfo()
            {
                Add(typeof(Lockpick), Lockpick.GetSBSellValue());
                Add(typeof(Dagger), Dagger.GetSBSellValue());

                Add(typeof(Lantern), Lantern.GetSBSellValue());
                Add(typeof(Torch), Torch.GetSBSellValue());
                Add(typeof(Candle), Candle.GetSBSellValue());
                Add(typeof(Bedroll), Bedroll.GetSBSellValue());
                Add(typeof(Backpack), Backpack.GetSBSellValue());
                Add(typeof(Bag), Bag.GetSBSellValue());
                Add(typeof(Pouch), Pouch.GetSBSellValue());
                Add(typeof(WoodenBox), WoodenBox.GetSBSellValue());

                Add(typeof(HairDye), HairDye.GetSBSellValue());
            }
Example #12
0
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Lockpick", typeof(Lockpick), Lockpick.GetSBPurchaseValue(), 100, 0x14FC, 0));
                Add(new GenericBuyInfo("Dagger", typeof(Dagger), Dagger.GetSBPurchaseValue(), 25, 0xF52, 0));

                Add(new GenericBuyInfo("Lantern", typeof(Lantern), Lantern.GetSBPurchaseValue(), 25, 0xA25, 0));
                Add(new GenericBuyInfo("Torch", typeof(Torch), Torch.GetSBPurchaseValue(), 25, 0xF6B, 0));
                Add(new GenericBuyInfo("Candle", typeof(Candle), Candle.GetSBPurchaseValue(), 25, 0xA28, 0));
                Add(new GenericBuyInfo("Bedroll", typeof(Bedroll), Bedroll.GetSBPurchaseValue(), 25, 0xA57, 0));
                Add(new GenericBuyInfo("Backpack", typeof(Backpack), Backpack.GetSBPurchaseValue(), 25, 0x9B2, 0));
                Add(new GenericBuyInfo("Bag", typeof(Bag), Bag.GetSBPurchaseValue(), 25, 0xE76, 0));
                Add(new GenericBuyInfo("Pouch", typeof(Pouch), Pouch.GetSBPurchaseValue(), 25, 0xE79, 0));
                Add(new GenericBuyInfo("Wooden Box", typeof(WoodenBox), WoodenBox.GetSBPurchaseValue(), 25, 0xE7D, 0));

                Add(new GenericBuyInfo("Hair Dye", typeof(HairDye), HairDye.GetSBPurchaseValue(), 10, 0xEFF, 0));
            }
Example #13
0
    public void Process(
        PlayerModelHair playerModelHair,
        HairDyeCollection dyeCollection,
        HairDye dye,
        MaterialPropertyBlock block)
    {
        List <SkinnedMeshRenderer> list = (List <SkinnedMeshRenderer>)Pool.GetList <SkinnedMeshRenderer>();

        ((Component)playerModelHair).get_gameObject().GetComponentsInChildren <SkinnedMeshRenderer>(true, (List <M0>)list);
        using (List <SkinnedMeshRenderer> .Enumerator enumerator = list.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                SkinnedMeshRenderer current = enumerator.Current;
                if (!Object.op_Equality((Object)current.get_sharedMesh(), (Object)null) && !Object.op_Equality((Object)((Renderer)current).get_sharedMaterial(), (Object)null))
                {
                    string name = ((Object)current.get_sharedMesh()).get_name();
                    ((Object)((Renderer)current).get_sharedMaterial()).get_name();
                    if (!((Component)current).get_gameObject().get_activeSelf())
                    {
                        ((Component)current).get_gameObject().SetActive(true);
                    }
                    for (int index = 0; index < this.MeshReplacements.Length; ++index)
                    {
                        if (this.MeshReplacements[index].Test(name))
                        {
                            SkinnedMeshRenderer replace = this.MeshReplacements[index].Replace;
                            if (Object.op_Equality((Object)replace, (Object)null))
                            {
                                ((Component)current).get_gameObject().SetActive(false);
                            }
                            else
                            {
                                current.set_sharedMesh(replace.get_sharedMesh());
                                current.set_rootBone(replace.get_rootBone());
                                current.set_bones(this.MeshReplacements[index].GetBones());
                            }
                        }
                    }
                    PlayerModelHair.RendererMaterials rendererMaterials;
                    if (playerModelHair.Materials.TryGetValue((Renderer)current, out rendererMaterials))
                    {
                        Array.Copy((Array)rendererMaterials.original, (Array)rendererMaterials.replacement, rendererMaterials.original.Length);
                        for (int index1 = 0; index1 < rendererMaterials.original.Length; ++index1)
                        {
                            for (int index2 = 0; index2 < this.MaterialReplacements.Length; ++index2)
                            {
                                if (this.MaterialReplacements[index2].Test(rendererMaterials.names[index1]))
                                {
                                    rendererMaterials.replacement[index1] = this.MaterialReplacements[index2].Replace;
                                }
                            }
                        }
                        ((Renderer)current).set_sharedMaterials(rendererMaterials.replacement);
                    }
                    else
                    {
                        Debug.LogWarning((object)("[HairSet.Process] Missing cached renderer materials in " + ((Object)playerModelHair).get_name()));
                    }
                    if (dye != null && ((Component)current).get_gameObject().get_activeSelf())
                    {
                        dye.Apply(dyeCollection, block);
                    }
                }
            }
        }
        // ISSUE: cast to a reference type
        Pool.FreeList <SkinnedMeshRenderer>((List <M0>&) ref list);
    }
Example #14
0
            public InternalBuyInfo()
            {
                //Add( new GenericBuyInfo( "1060834", typeof( Engines.Plants.PlantBowl ), 2, 9, 0x15FD, 0 ) );

                Add(new GenericBuyInfo(typeof(Arrow), 3, 9, 0xF3F, 0));
                Add(new GenericBuyInfo(typeof(Bolt), 6, 9, 0x1BFB, 0));

                Add(new GenericBuyInfo(typeof(Backpack), 15, 9, 0x9B2, 0));
                Add(new GenericBuyInfo(typeof(Pouch), 6, 9, 0xE79, 0));
                Add(new GenericBuyInfo(typeof(Bag), 6, 9, 0xE76, 0));

                Add(new GenericBuyInfo(typeof(Candle), 6, 9, 0xA28, 0));
                Add(new GenericBuyInfo(typeof(Torch), 8, 9, 0xF6B, 0));
                Add(new GenericBuyInfo(typeof(Lantern), 2, 9, 0xA25, 0));

                //TODO: Oil Flask @ 8GP

                Add(new GenericBuyInfo(typeof(Lockpick), 12, 9, 0x14FC, 0));

                Add(new GenericBuyInfo(typeof(FloppyHat), 25, 9, 0x1713, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(WideBrimHat), 26, 9, 0x1714, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(Cap), 27, 9, 0x1715, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(TallStrawHat), 26, 9, 0x1716, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(StrawHat), 25, 9, 0x1717, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(WizardsHat), 30, 9, 0x1718, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(Bonnet), 26, 9, 0x1719, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(FeatheredHat), 27, 9, 0x171A, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(TricorneHat), 26, 9, 0x171B, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(Bandana), 14, 9, 0x1540, Utility.RandomNeutralHue()));
                Add(new GenericBuyInfo(typeof(SkullCap), 13, 9, 0x1544, Utility.RandomNeutralHue()));

                Add(new GenericBuyInfo(typeof(BreadLoaf), 6, 9, 0x103B, 0));
                Add(new GenericBuyInfo(typeof(LambLeg), 8, 9, 0x160A, 0));
                Add(new GenericBuyInfo(typeof(ChickenLeg), 5, 9, 0x1608, 0));
                Add(new GenericBuyInfo(typeof(CookedBird), 17, 9, 0x9B7, 0));

                Add(new BeverageBuyInfo(typeof(BeverageBottle), BeverageType.Ale, 7, 9, 0x99F, 0));
                Add(new BeverageBuyInfo(typeof(BeverageBottle), BeverageType.Wine, 7, 9, 0x9C7, 0));
                Add(new BeverageBuyInfo(typeof(BeverageBottle), BeverageType.Liquor, 7, 9, 0x99B, 0));
                Add(new BeverageBuyInfo(typeof(Jug), BeverageType.Cider, 13, 9, 0x9C8, 0));

                Add(new GenericBuyInfo(typeof(Pear), 3, 9, 0x994, 0));
                Add(new GenericBuyInfo(typeof(Apple), 3, 9, 0x9D0, 0));

                Add(new GenericBuyInfo(typeof(Beeswax), 1, 9, 0x1422, 0));

                Add(new GenericBuyInfo(typeof(Garlic), 3, 9, 0xF84, 0));
                Add(new GenericBuyInfo(typeof(Ginseng), 3, 9, 0xF85, 0));

                Add(new GenericBuyInfo(typeof(Bottle), 5, 9, 0xF0E, 0));

                Add(new GenericBuyInfo(typeof(RedBook), 15, 9, 0xFF1, 0));
                Add(new GenericBuyInfo(typeof(BlueBook), 15, 9, 0xFF2, 0));
                Add(new GenericBuyInfo(typeof(TanBook), 15, 9, 0xFF0, 0));

                Add(new GenericBuyInfo(typeof(WoodenBox), 14, 9, 0xE7D, 0));
                Add(new GenericBuyInfo(typeof(Key), 2, 9, 0x100E, 0));

                Add(new GenericBuyInfo(typeof(Bedroll), 5, 9, 0xA59, 0));
                Add(new GenericBuyInfo(typeof(Kindling), 2, 9, 0xDE1, 0));

                Add(new GenericBuyInfo("1041205", typeof(Multis.SmallBoatDeed), 10177, 9, 0x14F2, 0));
                Add(new GenericBuyInfo("deed to a blue tent", typeof(BlueTentDeed), 22800, 9, 0x14F0, 0));
                Add(new GenericBuyInfo("deed to a green tent", typeof(GreenTentDeed), 22800, 9, 0x14F0, 0));

                Add(new GenericBuyInfo("1041060", typeof(HairDye), 60, 9, 0xEFF, HairDye.GetHue()));

                Add(new GenericBuyInfo("1016450", typeof(Chessboard), 2, 9, 0xFA6, 0));
                Add(new GenericBuyInfo("1016449", typeof(CheckerBoard), 2, 9, 0xFA6, 0));
                Add(new GenericBuyInfo(typeof(Backgammon), 2, 9, 0xE1C, 0));
                if (Core.AOS)
                {
                    Add(new GenericBuyInfo(typeof(Engines.Mahjong.MahjongGame), 6, 9, 0xFAA, 0));
                }
                Add(new GenericBuyInfo(typeof(Dices), 2, 9, 0xFA7, 0));

                if (Core.AOS)
                {
                    Add(new GenericBuyInfo(typeof(SmallBagBall), 3, 9, 0x2256, 0));
                    Add(new GenericBuyInfo(typeof(LargeBagBall), 3, 9, 0x2257, 0));
                }

                if (!Guild.NewGuildSystem)
                {
                    Add(new GenericBuyInfo("1041055", typeof(GuildDeed), 15002, 9, 0x14F0, 0));
                }
            }
Example #15
0
    public void Process(PlayerModelHair playerModelHair, HairDyeCollection dyeCollection, HairDye dye, MaterialPropertyBlock block)
    {
        PlayerModelHair.RendererMaterials replace;
        List <SkinnedMeshRenderer>        list = Pool.GetList <SkinnedMeshRenderer>();

        playerModelHair.gameObject.GetComponentsInChildren <SkinnedMeshRenderer>(true, list);
        foreach (SkinnedMeshRenderer bones in list)
        {
            if (bones.sharedMesh == null || bones.sharedMaterial == null)
            {
                continue;
            }
            string str  = bones.sharedMesh.name;
            string str1 = bones.sharedMaterial.name;
            if (!bones.gameObject.activeSelf)
            {
                bones.gameObject.SetActive(true);
            }
            for (int i = 0; i < (int)this.MeshReplacements.Length; i++)
            {
                if (this.MeshReplacements[i].Test(str))
                {
                    SkinnedMeshRenderer skinnedMeshRenderer = this.MeshReplacements[i].Replace;
                    if (skinnedMeshRenderer != null)
                    {
                        bones.sharedMesh = skinnedMeshRenderer.sharedMesh;
                        bones.rootBone   = skinnedMeshRenderer.rootBone;
                        bones.bones      = this.MeshReplacements[i].GetBones();
                    }
                    else
                    {
                        bones.gameObject.SetActive(false);
                    }
                }
            }
            if (!playerModelHair.Materials.TryGetValue(bones, out replace))
            {
                Debug.LogWarning(string.Concat("[HairSet.Process] Missing cached renderer materials in ", playerModelHair.name));
            }
            else
            {
                Array.Copy(replace.original, replace.replacement, (int)replace.original.Length);
                for (int j = 0; j < (int)replace.original.Length; j++)
                {
                    for (int k = 0; k < (int)this.MaterialReplacements.Length; k++)
                    {
                        if (this.MaterialReplacements[k].Test(replace.names[j]))
                        {
                            replace.replacement[j] = this.MaterialReplacements[k].Replace;
                        }
                    }
                }
                bones.sharedMaterials = replace.replacement;
            }
            if (dye == null || !bones.gameObject.activeSelf)
            {
                continue;
            }
            dye.Apply(dyeCollection, block);
        }
        Pool.FreeList <SkinnedMeshRenderer>(ref list);
    }
Example #16
0
    public void Process(PlayerModelHair playerModelHair, HairDyeCollection dyeCollection, HairDye dye, MaterialPropertyBlock block)
    {
        List <SkinnedMeshRenderer> obj = Pool.GetList <SkinnedMeshRenderer>();

        playerModelHair.gameObject.GetComponentsInChildren(true, obj);
        foreach (SkinnedMeshRenderer item in obj)
        {
            if (!(item.sharedMesh == null) && !(item.sharedMaterial == null))
            {
                string materialName = item.sharedMesh.name;
                string name2        = item.sharedMaterial.name;
                if (!item.gameObject.activeSelf)
                {
                    item.gameObject.SetActive(true);
                }
                for (int i = 0; i < MeshReplacements.Length; i++)
                {
                    MeshReplacements[i].Test(materialName);
                }
                if (dye != null && item.gameObject.activeSelf)
                {
                    dye.Apply(dyeCollection, block);
                }
            }
        }
        Pool.FreeList(ref obj);
    }
Example #17
0
 public InternalBuyInfo()
 {
     Add(new GenericBuyInfo("special beard dye", typeof(SpecialBeardDye), 500000, 9, 0xE26, 0));
     Add(new GenericBuyInfo("special hair dye", typeof(SpecialHairDye), 500000, 9, 0xE26, 0));
     Add(new GenericBuyInfo("1041060", typeof(HairDye), 60, 9, 0xEFF, HairDye.GetHue()));
 }