Adds hook to completely prevent stat boost change
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -141,6 +141,12 @@ namespace CreatureLib::Battling {
|
||||
}
|
||||
|
||||
bool Creature::ChangeStatBoost(Library::Statistic stat, int8_t diffAmount) {
|
||||
bool preventStatChange = false;
|
||||
HOOK(PreventStatBoostChange, this, this, stat, diffAmount, &preventStatChange);
|
||||
if (preventStatChange) {
|
||||
return false;
|
||||
}
|
||||
|
||||
HOOK(ModifyStatBoostChange, this, this, stat, &diffAmount);
|
||||
bool changed = false;
|
||||
auto oldValue = this->_statBoost.GetStat(stat);
|
||||
|
||||
Reference in New Issue
Block a user