ME3TweaksModManager
ME3TweaksModManager copied to clipboard
[Question] Is this due to engine difference of tooling problem?
This code below works in LE3 but fails to merge in ME3.
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.