/// <summary>
            /// Rebuild the character's skin textures
            /// </summary>
            private void UpdateSkin()
            {
                //Method changed number of parameters, check number of parameters for compatibility
                if (typeof(ChaControl).GetMethod("InitBaseCustomTextureBody", AccessTools.all).GetParameters().Count() == 0)
                {
                    Traverse.Create(ChaControl).Method("InitBaseCustomTextureBody").GetValue();
                }
                else
                {
                    Traverse.Create(ChaControl).Method("InitBaseCustomTextureBody", new object[] { BodyData?.Sex ?? ChaControl.sex }).GetValue();
                }

#if KK || EC
                ChaControl.AddUpdateCMBodyTexFlags(true, true, true, true, true);
                ChaControl.AddUpdateCMBodyColorFlags(true, true, true, true, true, true);
#else
                ChaControl.AddUpdateCMBodyTexFlags(true, true, true, true);
                ChaControl.AddUpdateCMBodyColorFlags(true, true, true, true);
                ChaControl.AddUpdateCMBodyGlossFlags(true, true);
#endif
                ChaControl.AddUpdateCMBodyLayoutFlags(true, true);
                ChaControl.SetBodyBaseMaterial();
                ChaControl.CreateBodyTexture();
                ChaControl.ChangeCustomBodyWithoutCustomTexture();
            }
Exemplo n.º 2
0
            /// <summary>
            /// Rebuild the character's skin textures
            /// </summary>
            private void UpdateSkin()
            {
                //Method changed number of parameters, check number of parameters for compatibility with game versions prior to Darkness (KK)
                if (!typeof(ChaControl).GetMethod("InitBaseCustomTextureBody", AccessTools.all).GetParameters().Any())
                {
                    Traverse.Create(ChaControl).Method("InitBaseCustomTextureBody").GetValue();
                }
                else
                {
                    Traverse.Create(ChaControl).Method("InitBaseCustomTextureBody", BodyData?.Sex ?? ChaControl.sex).GetValue();
                }

#if KK || EC || KKS
                ChaControl.AddUpdateCMBodyTexFlags(true, true, true, true, true);
                ChaControl.AddUpdateCMBodyColorFlags(true, true, true, true, true, true);
#else
                ChaControl.AddUpdateCMBodyTexFlags(true, true, true, true);
                ChaControl.AddUpdateCMBodyColorFlags(true, true, true, true);
                ChaControl.AddUpdateCMBodyGlossFlags(true, true);
#endif
                ChaControl.AddUpdateCMBodyLayoutFlags(true, true);
                ChaControl.SetBodyBaseMaterial();
                ChaControl.CreateBodyTexture();
                ChaControl.ChangeCustomBodyWithoutCustomTexture();
            }
 /// <summary>
 /// Rebuild the character's skin textures
 /// </summary>
 internal static void UpdateSkin(ChaControl chaControl, BodyData bodyData)
 {
     Traverse.Create(chaControl).Method("InitBaseCustomTextureBody", new object[] { bodyData?.Sex ?? chaControl.sex }).GetValue();
     chaControl.AddUpdateCMBodyTexFlags(true, true, true, true, true);
     chaControl.AddUpdateCMBodyColorFlags(true, true, true, true, true, true);
     chaControl.AddUpdateCMBodyLayoutFlags(true, true);
     chaControl.SetBodyBaseMaterial();
     chaControl.CreateBodyTexture();
     chaControl.ChangeCustomBodyWithoutCustomTexture();
 }
                /// <summary>
                /// Rebuild the character's skin textures
                /// </summary>
                internal static void UpdateSkin(ChaControl chaControl, BodyData bodyData)
                {
                    //Method changed number of parameters, check number of parameters for compatibility
                    if (typeof(ChaControl).GetMethod("InitBaseCustomTextureBody", AccessTools.all).GetParameters().Count() == 0)
                    {
                        Traverse.Create(chaControl).Method("InitBaseCustomTextureBody").GetValue();
                    }
                    else
                    {
                        Traverse.Create(chaControl).Method("InitBaseCustomTextureBody", new object[] { bodyData?.Sex ?? chaControl.sex }).GetValue();
                    }

                    chaControl.AddUpdateCMBodyTexFlags(true, true, true, true, true);
                    chaControl.AddUpdateCMBodyColorFlags(true, true, true, true, true, true);
                    chaControl.AddUpdateCMBodyLayoutFlags(true, true);
                    chaControl.SetBodyBaseMaterial();
                    chaControl.CreateBodyTexture();
                    chaControl.ChangeCustomBodyWithoutCustomTexture();
                }