Changes prevent statboostchange interface in angelscript in line with creaturelib update
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-03-12 11:37:06 +01:00
parent 2c678756c7
commit d4c6ba372e
5 changed files with 11 additions and 9 deletions

View File

@@ -55,13 +55,12 @@ void AngelScriptScript::SetAngelscriptOwner(CScriptHandle* owner) {
}
AngelScriptScript::~AngelScriptScript() {
if (_ownerHandle != nullptr){
if (_ownerHandle != nullptr) {
delete _ownerHandle;
}
_obj->Release();
}
void AngelScriptScript::OnInitialize(const CreatureLib::Battling::BattleLibrary* library,
const ArbUt::List<CreatureLib::Library::EffectParameter*>& parameters) {
CALL_HOOK(OnInitialize, {
@@ -155,12 +154,14 @@ void AngelScriptScript::BlockCritical(CreatureLib::Battling::ExecutingAttack* at
}
void AngelScriptScript::PreventStatBoostChange(CreatureLib::Battling::Creature* target,
CreatureLib::Library::Statistic stat, int8_t diffAmount, bool* prevent) {
CreatureLib::Library::Statistic stat, int8_t diffAmount,
bool selfInflicted, bool* prevent) {
CALL_HOOK(PreventStatBoostChange, {
ctx->SetArgObject(0, (void*)target);
ctx->SetArgDWord(1, (i32)stat);
ctx->SetArgByte(2, diffAmount);
ctx->SetArgAddress(3, prevent);
ctx->SetArgByte(3, selfInflicted);
ctx->SetArgAddress(4, prevent);
})
}