Skip to content

Commit

Permalink
Fix bug where temporary hacking stat modifiers were being added to th…
Browse files Browse the repository at this point in the history
…e bonus granted by Enemy Protocol
  • Loading branch information
BlackDog86 committed Jan 6, 2025
1 parent 4d82ba4 commit c5325fb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,11 @@ function ApplyEnemyProtocol(XComGameState_Unit Hacker, XComGameState_BaseObject
local XComGameState_Unit HackerState;

HackerState = XComGameState_Unit(NewGameState.ModifyStateObject(class'XComGameState_Unit', Hacker.ObjectID));

HackerState.SetBaseMaxStat(eStat_Hacking, HackerState.GetMaxStat(eStat_Hacking) + ENEMY_PROTOCOL_HACKING_BONUS);
// Single Line for Issue #1443 - Use GetBaseStat instead of GetMaxStat
/// HL-Docs: ref:Bugfixes; issue:1443
/// Fixes a bug where temporary hacking stat modifiers were being erroneously added to the Enemy Protocol hack
/// reward bonus.
HackerState.SetBaseMaxStat(eStat_Hacking, HackerState.GetBaseStat(eStat_Hacking) + ENEMY_PROTOCOL_HACKING_BONUS);
}

static function X2HackRewardTemplate MapAlert(Name TemplateName)
Expand Down

0 comments on commit c5325fb

Please sign in to comment.