What's the right way to override Catalog Inventory for Multi-vendor, so Inventory is calculated according to custom logic?

Hi,

What’s the right way to override Catalog Inventory for Multi-vendor, so Inventory is calculated according to custom logic.
I already created an extension which calculates Inventory according to custom logic, now I’m trying to have Magento user that logic.
How can I do this, which class/function do I override?

Thanks