ME3TweaksModManager icon indicating copy to clipboard operation
ME3TweaksModManager copied to clipboard

[Question] Is this due to engine difference of tooling problem?

Open levicki opened this issue 5 months ago • 6 comments

This code below works in LE3 but fails to merge in ME3.

image

public static final function VerifyPlayerTalentPoints(SFXPawn Pawn)
{
	local int TalentPoints;
	local int SpentPoints;
	local SFXPawn_Player Player;
	local SFXPawn_Henchman Henchman;
	local SFXPowerCustomActionBase Power;

	Player = SFXPawn_Player(Pawn);
	Henchman = SFXPawn_Henchman(Pawn);

	if (Player != None)
	{
		LogInternal((GetFuncName() $ " - Player = ") $ Player.GetFullName());

		TalentPoints = GetTalentPointSum(Player.CharacterLevel, FALSE);

		foreach Player.PowerManager.Powers(Power)
		{
			if (Power.DisplayInCharacterRecord)
			{
				SpentPoints += Class'SFXPowerManager'.static.GetRefundAmount(Class'SFXPowerCustomAction', int(Power.Rank));
			}
		}
	}
	else if (Henchman != None)
	{
		LogInternal((GetFuncName() $ " - Henchman = ") $ Henchman.GetPrettyName());

		TalentPoints = GetTalentPointSum(Henchman.CharacterLevel, TRUE);

		foreach Henchman.PowerManager.Powers(Power)
		{
			if (Power.DisplayInCharacterRecord)
			{
				SpentPoints += Class'SFXPowerManager'.static.GetRefundAmount(Class'SFXPowerCustomAction', int(Power.Rank));
			}
		}
	}
	else
	{
		LogInternal(GetFuncName() $ " - invalid pawn");
		return;
	}

	LogInternal((((GetFuncName() $ " - TalentPoints = ") $ TalentPoints) $ ", SpentPoints = ") $ SpentPoints);

	TalentPoints -= SpentPoints;

	LogInternal((GetFuncName() $ " - Pawn.TalentPoints = ") $ Pawn.TalentPoints);

	if (Pawn.TalentPoints < TalentPoints)
	{
		Pawn.TalentPoints = TalentPoints;
	}
}

It's not a big deal, I'd just like to know if that is toolset issue or a game engine difference.

levicki avatar Jan 26 '24 23:01 levicki