예제 #1
0
            static void Postfix(ActorEquip.EEquipSlot slot, ItemEquipmentCmpt Equipment)
            {
                Dbgl($"applying submodel to slot {slot}");
                if (!enabled || Equipment == null)
                {
                    return;
                }

                string text = Equipment.SubPathWoman;

                if (text != null)
                {
                    Dbgl($"applying submodel {text}");
                    Actor emily = ActorMgr.Self.Get(4000003);
                    Actor alice = ActorMgr.Self.Get(4000050);

                    typeof(Actor).GetField("subModels", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(emily, typeof(Actor).GetField("subModels", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(Module <Player> .Self.actor));
                    typeof(Actor).GetField("subModels", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(alice, typeof(Actor).GetField("subModels", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(Module <Player> .Self.actor));


                    ActorMgr.Self.Get(4000035).ApplySubModel((int)slot, Equipment.SubPathWoman);
                    ActorMgr.Self.Get(4000003).ApplySubModel((int)slot, Equipment.SubPathWoman);
                    ActorMgr.Self.Get(4000050).ApplySubModel((int)slot, Equipment.SubPathWoman);
                }
            }
예제 #2
0
            static void Postfix(Player __instance)
            {
                if (!enabled)
                {
                    return;
                }

                string[] array = new string[5];
                for (int i = 0; i < array.Length; i++)
                {
                    AppearPartEnum        part       = (AppearPartEnum)i;
                    ActorEquip.EEquipSlot eequipSlot = ActorEquip.AppaerPartEnumToEEquipSlot(part);
                    if (eequipSlot != ActorEquip.EEquipSlot.Max)
                    {
                        array[i] = __instance.GetInfo(__instance.bag.EquipSlot.GetItemEquipmentCmpt(eequipSlot));
                    }
                }

                Dbgl($"updating appearances");

                Actor emily = ActorMgr.Self.Get(4000003);
                Actor alice = ActorMgr.Self.Get(4000050);

                emily.gameObject.AddComponent <ActorEquip>();
                alice.gameObject.AddComponent <ActorEquip>();

                ActorMgr.Self.Get(4000003).SetEquipInfo(array);
                ActorMgr.Self.Get(4000050).SetEquipInfo(array);

                AccessTools.FieldRefAccess <ActorEquip, string[]>(emily.GetComponent <ActorEquip>(), "nudeAppearUnits") = Module <Player> .Self.actor.GetComponent <ActorEquip>().GetCurrentNudeAppearsPath();

                AccessTools.FieldRefAccess <ActorEquip, string[]>(emily.GetComponent <ActorEquip>(), "equipAppearUnits") = Module <Player> .Self.actor.GetComponent <ActorEquip>().GetCurrentNudeAppearsPath();

                AccessTools.FieldRefAccess <ActorEquip, string[]>(alice.GetComponent <ActorEquip>(), "nudeAppearUnits") = Module <Player> .Self.actor.GetComponent <ActorEquip>().GetCurrentNudeAppearsPath();

                AccessTools.FieldRefAccess <ActorEquip, string[]>(alice.GetComponent <ActorEquip>(), "equipAppearUnits") = Module <Player> .Self.actor.GetComponent <ActorEquip>().GetCurrentNudeAppearsPath();

                emily.ApplyCloth(true);
                alice.ApplyCloth(true);
            }