PlayerPatch.PlayerAttackInput_Prefix runs from Player.FixedUpdate (50×/s) and adds a new SettingChanged handler on every call while a bow is equipped (two for a crossbow). AttackPatch.AttackStart_Postfix adds three per shot, and Helper.UpdateCriticalMultiplier / UpdateBackstabMultiplier add more on every tooltip frame. They are never removed. On Unity's Mono each += copies the whole invocation list, so after an hour with a bow in hand every physics tick allocates ~1.4 MB and the GC stutters. The handlers also capture the Player, so a later config change runs hundreds of thousands of stale closures. Since each of these methods already applies the current value directly, the subscriptions can simply be removed, or registered once in Awake. Also, Critical Chance = 0 hits break in ObjectDBAwake_Postfix, which skips SwitchProjectile.Init and the retrieve-chance setup for every item after the first bow. And CharacterPatch looks for 3f in Character.UpdateStagger, which uses 5f since 1.0, so the transpiler changes nothing.
Memory leak: SettingChanged subscribed every frame (1.8.7)
Log in to reply.