C++ n00b - how Modifie the LyraTeamSubsystem

Hello. I would like to revamp the Lyrateamsubsystem or maybe other place
i would like to define what team can give damage or not depending on TeamID (not depending or same team or not ) or in the future depending of action in the game (like weapon)
in the the LyraTeamSubsystem.cpp i found that

bool ULyraTeamSubsystem::CanCauseDamage(const UObject* Instigator, const UObject* Target, bool bAllowDamageToSelf) const
{
	if (bAllowDamageToSelf)
	{
		if ((Instigator == Target) || (FindPlayerStateFromActor(Cast<AActor>(Instigator)) == FindPlayerStateFromActor(Cast<AActor>(Target))))
		{
			return true;
		}
	}

	int32 InstigatorTeamId;
	int32 TargetTeamId;
	const ELyraTeamComparison Relationship = CompareTeams(Instigator, Target, /*out*/ InstigatorTeamId, /*out*/ TargetTeamId);
	if (Relationship == ELyraTeamComparison::DifferentTeams || teamDamage) // @TangoAlphaDev - Added the teamDamage check
	{
		return true;
	}
	else if ((Relationship == ELyraTeamComparison::InvalidArgument) && (InstigatorTeamId != INDEX_NONE))
	{
		// Allow damaging non-team actors for now, as long as they have an ability system component
		//@TODO: This is temporary until the target practice dummy has a team assignment
		return UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Cast<const AActor>(Target)) != nullptr;
	}
	
	return false;
}

is it only to setup team damage or is it the general rules to generate damage ?

i still have no idea how to do that (learn about c++ 2 days ago ) but i want to know if it s good files to work on it (.cpp and .h )

maybe that not the good place if i want change during the gameplay.

because i saw something strange also

In the GA_Melee ability, damage is only applied to hit pawns if they’re on a different team from the one executing the melee ability

Note : i want to change that and be team Id specific rules

So mean damaged allowed are set at 2 place ? or the GA_melee use different approach than other weapon. ?

Probably i m not clear

thanks you best regards