Пример #1
0
            private static void ShortenDots(On.RoR2.DotController.orig_AddDot orig, DotController self,
                                            GameObject attackerObject, float duration, DotController.DotIndex dotIndex, float damageMultiplier)
            {
                var   cb          = self.GetPropertyValue <CharacterBody>("victimBody");
                float newduration = duration;
                var   component   = cb.GetComponent <DebuffStatComponent>();

                if (component)
                {
                    newduration *= component.Reduction;
                }
                orig(self, attackerObject, newduration, dotIndex, damageMultiplier);
            }