Networked Object Pool Manager [Advice/Tips]

I’m going to briefly explain my current setup first of all, but feel free to skip past it down to the actual question.

Current Situation

I currently have an object pool component which is attached to my player characters and is referenced by my weapon components to permit them to pull an object for use from the pool.

I also have implemented a system for updating projectiles artwork and stats which is instigated by the below method, and called when a projectile is drawn from the pool:

void UBaseWeaponComponent::CheckAndUpdateProjectile(ABaseProjectile * _Projectile) {
	if (_Projectile->GetWeaponDataID() != GetUniqueID()) {
		// update the weapon data of the projectile, and update the id
		_Projectile->PassNewWeaponData(WeaponData, GetUniqueID());
	}
}

This permits on the fly modification to weapons and their projectiles as they are taken from the pool. Once the data has been passed to the projectile, the server applies these modifications via RPC methods.

Intentions

I intend to create a system that would permit multiple characters/ weapons to use the same pool when their weapons types are also the same.

My current thoughts are to implement a pool manager. Weapons would request a reference to a pool containing projectiles which match their ID number. If a pool cannot be found, then an unused pool is assigned to that weapon type.

Reference counting would keep track of the current amount of users of a pool at any one time.

Below is some pseudocode as to what this manager might look like:

// .h ============================

private TMap<WeaponID, Pair<PoolIndex, ReferenceCount>> PoolMap;

private TArray<ObjectPoolCOmponent*> ObjectPool;

// .cpp ============================

public inline const& ObjectPoolComponent RequestPoolReference(int WeaponID) {
    if (PoolMap.Contains(WeaponID)) {
        return GetPoolByIndex(PoolMap[WeaponID].first);
    }
    else return FindUnusedPool();
}

private ObjectPoolComponent FindUnusedPool(int WeaponID) {
    // identify unused pool
    // update key value in map for pool index
    for (auto& Elem : PoolMap) {
        if (Elem.Key.key = 0 ) { // If the number of characters referencing == 0
//Process

        }
    }

    return GetPoolByIndex(PoolMap[unusedindex]); 
}

private ObjectPoolComponent GetPoolByIndex(int index) { return ObjectPool[index]
}

Question

So, what would be the best way to go about actually implementing this system?
Are there any reasons that I shouldn’t that may have been overlooked?

Where would be the best place for such an object to exist - the gamemode (server only), game state(networked), game instance(networked, but “high level”) or in the level itself?

My understanding at this point is that the pools themselves wouldn’t necessarily need to exist on the client(s) - only the objects. The client could make a request to the server for a reference to said object.

I’m still mulling this over, and would appreciate some more input before I dive head first into potential problems, so if anyone has any idea - they are welcome to share them.

necro 4 characters needed