private void DotController_AddDot(On.RoR2.DotController.orig_AddDot orig, DotController self, GameObject attackerObject, float duration, DotController.DotIndex dotIndex, float damageMultiplier) { if (dotIndex == DotController.DotIndex.PercentBurn) { //Duration of Burn Percentage duration = 0; } orig(self, attackerObject, duration, dotIndex, damageMultiplier); }
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); }
private void PreventDot(On.RoR2.DotController.orig_AddDot orig, DotController self, GameObject attackerObject, float duration, DotIndex dotIndex, float damageMultiplier) { if (InventoryCount > 0) { switch (dotIndex) { case DotIndex.Helfire: case DotIndex.Burn: case DotIndex.PercentBurn: dotIndex = DotIndex.None; break; default: break; } } orig(self, attackerObject, duration, dotIndex, damageMultiplier); }