static public void Prefix(UnitBody __instance) { if (__instance.Owner.Ensure <UnitPartWildArmor>().active()) { if (__instance.Armor.HasArmor && Patch_UnitBody_ApplyPolymorphEffect.hasWildEnchant(__instance.Armor.Armor)) { __instance.Armor.RetainDeactivateFlag(); } } }
static public void Postfix(UnitBody __instance) { var primary_hand = __instance.CurrentHandsEquipmentSet?.PrimaryHand; var secondary_hand = __instance.CurrentHandsEquipmentSet?.SecondaryHand; if (primary_hand != null && (!primary_hand.HasShield || !Patch_UnitBody_ApplyPolymorphEffect.hasWildEnchant(primary_hand.Shield?.ArmorComponent) || !__instance.Owner.Ensure <UnitPartWildArmor>().active()) && (primary_hand.MaybeItem?.Blueprint != thundering_claw)) { primary_hand.ReleaseDeactivateFlag(); } if (secondary_hand != null && (!secondary_hand.HasShield || !Patch_UnitBody_ApplyPolymorphEffect.hasWildEnchant(secondary_hand.Shield?.ArmorComponent) || !__instance.Owner.Ensure <UnitPartWildArmor>().active()) && (secondary_hand.MaybeItem?.Blueprint != thundering_claw)) { secondary_hand.ReleaseDeactivateFlag(); } }