예제 #1
0
        private static void CharacterBody_OnEquipmentLost(On.RoR2.CharacterBody.orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef)
        {
            orig(self, equipmentDef);

            if (equipmentDef.equipmentIndex == _equipIndex)
            {
                self.RemoveBuff(_buffIndex);
            }
        }
예제 #2
0
 public static void CharacterBody_OnEquipmentLost(On.RoR2.CharacterBody.orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef)
 {
     if (self.masterObject && self.masterObject.GetComponent <AffixEquipBehaviour>() is AffixEquipBehaviour behaviour)
     {
         //If I have one, run the modified pickup hook in the behaviour
         behaviour.UpdateEquipment(equipmentDef.equipmentIndex, false);
     }
     orig(self, equipmentDef);
 }