Exemplo n.º 1
0
 private void CharacterBody_AddBuff_BuffDef(On.RoR2.CharacterBody.orig_AddBuff_BuffDef orig, CharacterBody self, BuffDef buffDef)
 {
     if (CanCancelBuff(self, buffDef))
     {
         return;
     }
     orig(self, buffDef);
 }
Exemplo n.º 2
0
 private static void CharacterBody_AddBuff_BuffDef(On.RoR2.CharacterBody.orig_AddBuff_BuffDef orig, CharacterBody self, BuffDef buffDef)
 {
     if (!buffDef.isDebuff) //aka isBuff
     {
         self = self.gameObject.GetComponent <BTSendBuffsToAttacker>() ? self.gameObject.GetComponent <BTSendBuffsToAttacker>().attackerBody : self;
     }
     else
     {
         self = self.gameObject.GetComponent <BTSendDebuffsToVictim>() ? self.gameObject.GetComponent <BTSendDebuffsToVictim>().victimBody : self;
     }
     orig(self, buffDef);
 }
Exemplo n.º 3
0
        private void Check(On.RoR2.CharacterBody.orig_AddBuff_BuffDef orig, CharacterBody self, BuffDef buff)
        {
            if (self)
            {
                if (self.activeBuffsList != null)
                {
                    if (self.activeBuffsListCount >= 4)
                    {
                        if (base.meetsBodyRequirement)
                        {
                            base.Grant();
                        }
                    }
                }
            }

            orig(self, buff);
        }