feat(Core/Unit): Implement OnPowerUpdate() unit script hook (#17560)

This commit is contained in:
Andrew
2023-10-22 09:14:41 -03:00
committed by GitHub
parent 0cc85086a4
commit 9935e72341
2 changed files with 9 additions and 1 deletions

View File

@@ -14115,6 +14115,11 @@ int32 Unit::ModifyPower(Powers power, int32 dVal, bool withPowerUpdate /*= true*
gain = maxPower - curPower;
}
if (GetAI())
{
GetAI()->OnPowerUpdate(power, gain, dVal, curPower);
}
return gain;
}