diff --git a/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs b/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs index 02c72dfd..6b6c6182 100644 --- a/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs +++ b/Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs @@ -48,6 +48,12 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback } } + // TODO: Check for glass increments + if (operation is GClass2870) + { + return; + } + InventoryPacket packet = new() { HasItemControllerExecutePacket = true @@ -83,6 +89,12 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback } } + if (operation is GClass2870) + { + base.Execute(operation, callback); + return; + } + InventoryPacket packet = new() { HasItemControllerExecutePacket = true @@ -94,6 +106,7 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback callback = callback, inventoryController = this }; + clientOperationManager.callback ??= new Callback(ClientPlayer.Control0.Class1400.class1400_0.method_0); uint operationNum = AddOperationCallback(operation, new Callback(clientOperationManager.HandleResult)); @@ -153,7 +166,6 @@ private class ClientInventoryOperationManager public void HandleResult(Result result) { - ConsoleScreen.Log("Running OperationManager::HandleResult"); ClientInventoryCallbackManager callbackManager = new() { clientOperationManager = this, @@ -196,14 +208,14 @@ private class ClientInventoryCallbackManager public void HandleResult(IResult executeResult) { - ConsoleScreen.Log("Running CallbackManager::HandleResult"); if (!executeResult.Succeed) { FikaPlugin.Instance.FikaLogger.LogError($"{clientOperationManager.inventoryController.ID} - Client operation critical failure: {clientOperationManager.inventoryController.ID} - {clientOperationManager.operation}\r\nError: {executeResult.Error}"); } + clientOperationManager.operation.Dispose(); clientOperationManager.callback.Invoke(result); - return; + /*clientOperationManager.localOperationStatus = EOperationStatus.Finished; EOperationStatus? serverOperationStatus = clientOperationManager.serverOperationStatus; EOperationStatus? eoperationStatus = clientOperationManager.localOperationStatus;