Read the incoming operation
OnDrop receives the target's geometry, the pointer event, and the DragDropOperation. Cast the operation to your inventory-specific subclass before reading custom fields. A failed cast is an unrelated operation, not a valid inventory move.
Validate before moving anything
For this example, check that the source still contains the expected item, the destination accepts its type, and the source and target are valid slots. Decide what an occupied destination means: swap, stack, or reject. Keep that rule in the inventory logic so other ways of moving an item can use the same rule.
OnDrop(Operation)
→ Cast to BP_InventoryDragOperation
→ Validate source and destination
→ Request inventory move / swap
→ Refresh the affected slot views
→ Return true when handled
Rejected or unrelated operation
→ Return falseReturn the actual result
OnDrop returns a boolean indicating whether the widget handled the drop. Returning true is not a substitute for updating your inventory. Handle cancellation separately: releasing outside a valid target should leave the model in a consistent state.