fix(D-01/A): 3 review bugs + null guards (BUG-001, BUG-002, BUG-003, RISK-003)

BUG-001: TyingInteractionHelper swap now checks V2EquipResult — on failure,
rolls back by re-equipping the old bind instead of leaving target untied

BUG-002: OwnershipComponent.onUnequipped no longer double-calls
unregisterWearer — onCollarRemoved already handles it. Suppressed-alert
path calls unregister directly since onCollarRemoved is skipped.

BUG-003: PacketSelfBondage handleV2SelfBind now clears completed tying
task from PlayerBindState to prevent blocking future tying interactions

RISK-003: StruggleCollar get/setResistanceState null-guard on player
This commit is contained in:
NotEvil
2026-04-14 16:38:09 +02:00
parent 5c4e4c2352
commit eb7f06bfc8
4 changed files with 39 additions and 20 deletions

View File

@@ -47,6 +47,7 @@ public class StruggleCollar extends StruggleState {
@Override
protected int getResistanceState(PlayerBindState state) {
Player player = state.getPlayer();
if (player == null) return 0;
ItemStack collar = V2EquipmentHelper.getInRegion(player, BodyRegionV2.NECK);
if (collar.isEmpty() || !CollarHelper.isCollar(collar)) return 0;
@@ -66,6 +67,7 @@ public class StruggleCollar extends StruggleState {
@Override
protected void setResistanceState(PlayerBindState state, int resistance) {
Player player = state.getPlayer();
if (player == null) return;
ItemStack collar = V2EquipmentHelper.getInRegion(player, BodyRegionV2.NECK);
if (collar.isEmpty() || !CollarHelper.isCollar(collar)) return;