Adds Angelscript hook to prevent stat boost changes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-02-12 15:59:16 +01:00
parent 8983ba7251
commit d1efde4328
4 changed files with 15 additions and 0 deletions

View File

@@ -126,6 +126,16 @@ void AngelScriptScript::BlockCritical(CreatureLib::Battling::ExecutingAttack* at
})
}
void AngelScriptScript::PreventStatBoostChange(CreatureLib::Battling::Creature* target,
CreatureLib::Library::Statistic stat, int8_t diffAmount, bool* prevent) {
CALL_HOOK(PreventStatBoostChange, {
ctx->SetArgObject(0, (void*)target);
ctx->SetArgByte(1, (u8)stat);
ctx->SetArgByte(2, diffAmount);
ctx->SetArgAddress(3, prevent);
})
}
void AngelScriptScript::ModifyStatBoostChange(CreatureLib::Battling::Creature* target,
CreatureLib::Library::Statistic stat, int8_t* diffAmount) {
CALL_HOOK(ModifyStatBoostChange, {