Пример #1
0
 internal static void GetSiruFlags(ChaFileDefine.SiruParts _parts, OCIChar __instance, ref byte __result)
 {
     if (__instance is OCICharMale charMale)
     {
         __result = charMale.male.GetSiruFlags(_parts);
     }
 }
Пример #2
0
 public bool Proc(AnimatorStateInfo _ai)
 {
     if (this.oldHash != ((AnimatorStateInfo) ref _ai).get_shortNameHash())
     {
         this.oldFrame = 0.0f;
     }
     this.oldHash = ((AnimatorStateInfo) ref _ai).get_shortNameHash();
     for (int index1 = 0; index1 < this.lstPaste.Count; ++index1)
     {
         this.p = this.lstPaste[index1];
         if (((AnimatorStateInfo) ref _ai).IsName(this.p.anim))
         {
             float num = ((AnimatorStateInfo) ref _ai).get_normalizedTime() % 1f;
             this.ti = this.p.timing;
             if ((double)this.oldFrame <= (double)this.ti.normalizeTime && (double)this.ti.normalizeTime < (double)num)
             {
                 for (int index2 = 0; index2 < this.ti.lstWhere.Count; ++index2)
                 {
                     this.sp = (ChaFileDefine.SiruParts) this.ti.lstWhere[index2];
                     this.chaFemale.SetSiruFlag(this.sp, (byte)Mathf.Clamp((int)this.chaFemale.GetSiruFlag(this.sp) + 1, 0, 2));
                 }
             }
         }
     }
     this.oldFrame = ((AnimatorStateInfo) ref _ai).get_normalizedTime();
     return(true);
 }
Пример #3
0
 internal static void SetSiruFlags(ChaFileDefine.SiruParts _parts, byte _state, OCIChar __instance)
 {
     if (__instance is OCICharMale charMale)
     {
         charMale.male.SetSiruFlags(_parts, _state);
     }
 }
Пример #4
0
        public static void CleanUpSiru(AgentStateAction __instance)
        {
            if (AI_BetterHScenes.shouldCleanUp == null || AI_BetterHScenes.shouldCleanUp.Count == 0 || __instance == null || __instance.Owner == null)
            {
                return;
            }

            var tree = (__instance.Owner as AgentBehaviorTree);

            if (tree == null)
            {
                return;
            }

            AgentActor agent = tree.SourceAgent;

            if (agent == null || agent.ChaControl == null || !AI_BetterHScenes.shouldCleanUp.Contains(agent.ChaControl))
            {
                return;
            }

            for (int i = 0; i < 5; i++)
            {
                ChaFileDefine.SiruParts parts = (ChaFileDefine.SiruParts)i;
                agent.ChaControl.SetSiruFlag(parts, 0);
            }

            AI_BetterHScenes.shouldCleanUp.Remove(agent.ChaControl);
        }
Пример #5
0
            private static void GetSiruFlags(ChaFileDefine.SiruParts _parts, OCIChar __instance, ref byte __result)
            {
                if (__instance is OCICharMale charMale)
#if KK
                { __result = charMale.male.GetSiruFlags(_parts); }
#else
                { __result = charMale.male.GetSiruFlag(_parts); }
#endif
            }
Пример #6
0
            private static void SetSiruFlags(ChaFileDefine.SiruParts _parts, byte _state, OCIChar __instance)
            {
                if (__instance is OCICharMale charMale)
#if KK
                { charMale.male.SetSiruFlags(_parts, _state); }
#else
                { charMale.male.SetSiruFlag(_parts, _state); }
#endif
            }
Пример #7
0
        public static void SetSiruFlagsPostfix(OCIChar __instance, ChaFileDefine.SiruParts _parts, byte _state)
        {
            if (__instance.charInfo.fileParam.sex == 0 || __instance is OCICharFemale)
            {
                return;
            }

            __instance.charInfo.SetSiruFlags(_parts, _state);
        }
Пример #8
0
        public static void GetSiruFlagsPostfix(OCIChar __instance, ChaFileDefine.SiruParts _parts, ref byte __result)
        {
            if (__instance.charInfo.fileParam.sex == 0 || __instance is OCICharFemale)
            {
                return;
            }

            __result = __instance.charInfo.GetSiruFlags(_parts);
        }
Пример #9
0
        private static void Patch_OnClickLiquid(object __instance, ref ChaFileDefine.SiruParts _parts, ref byte _state)
        {
            if (Utils.GetIsUpdateInfo(__instance))
            {
                return;
            }

            foreach (var chara in Utils.GetAllSelectedButMain(__instance))
            {
                chara.SetSiruFlags(_parts, _state);
            }
        }
Пример #10
0
 public override byte GetSiruFlags(ChaFileDefine.SiruParts _parts)
 {
     return(this.female.GetSiruFlag(_parts));
 }
Пример #11
0
 public override void SetSiruFlags(ChaFileDefine.SiruParts _parts, byte _state)
 {
     base.SetSiruFlags(_parts, _state);
     this.female.SetSiruFlag(_parts, _state);
 }