private void AddWindedDebuff(On.RoR2.CharacterBody.orig_RemoveBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { orig(self, buffType); if (buffType == SecondWindBuff.buffIndex) { self.AddTimedBuffAuthority(WindedDebuff.buffIndex, windedDebuffDuration); } }
private void AlertEnemiesUponUncloak(On.RoR2.CharacterBody.orig_RemoveBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { orig(self, buffType); if (buffType == RoR2Content.Buffs.Cloak.buffIndex || buffType == RoR2Content.Buffs.AffixHauntedRecipient.buffIndex) { foreach (var baseAI in InstanceTracker.GetInstancesList <RoR2.CharacterAI.BaseAI>()) { baseAI.targetRefreshTimer = 0; } } }
private void DamageBoostReset(On.RoR2.CharacterBody.orig_RemoveBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) //Resets the cachedDamageComponent variable, preventing it from getting stuck on a value from a high-damage attack { orig(self, buffType); if (buffType == PatheticBloodBuff.buffIndex || buffType == WeakBloodBuff.buffIndex || buffType == AverageBloodBuff.buffIndex || buffType == StrongBloodBuff.buffIndex || buffType == InsaneBloodBuff.buffIndex || buffType == DevotedBloodBuff.buffIndex) { var cachedDamageComponent = self.gameObject.GetComponent <DamageComponent>(); cachedDamageComponent.cachedDamage = 0; } }
private static void CharacterBody_RemoveBuff_BuffIndex(On.RoR2.CharacterBody.orig_RemoveBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { if (NetworkServer.active) { BuffIndex buff = DLC1Content.Buffs.BearVoidCooldown.buffIndex; if (buffType == buff && self.GetBuffCount(buff) < 1) { return; } } orig(self, buffType); }
private void CharacterBody_RemoveBuff_BuffIndex(On.RoR2.CharacterBody.orig_RemoveBuff_BuffIndex orig, CharacterBody self, BuffIndex buffType) { bool hasBody = self; if (hasBody) { healingSourceStack.Push(self); } orig(self, buffType); if (hasBody) { healingSourceStack.Pop(); } }