Implements missing Script functions.
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:
@@ -93,7 +93,7 @@ public:
|
||||
arr = GetEffectParameters(ctx, parameters);
|
||||
ctx->SetArgAddress(0, arr);
|
||||
})
|
||||
if (arr != nullptr){
|
||||
if (arr != nullptr) {
|
||||
arr->Release();
|
||||
}
|
||||
}
|
||||
@@ -102,11 +102,14 @@ public:
|
||||
void OnRemove() override { CALL_HOOK(OnRemove, ); }
|
||||
|
||||
void OnBeforeTurn(const CreatureLib::Battling::BaseTurnChoice* choice) override {
|
||||
throw NotImplementedException(); // TODO
|
||||
CALL_HOOK(OnBeforeTurn, { ctx->SetArgObject(0, (void*)choice); })
|
||||
}
|
||||
|
||||
void ChangeAttack(CreatureLib::Battling::AttackTurnChoice* choice, ConstString* outAttack) override {
|
||||
throw NotImplementedException(); // TODO
|
||||
CALL_HOOK(ChangeAttack, {
|
||||
ctx->SetArgObject(0, (void*)choice);
|
||||
ctx->SetArgAddress(0, outAttack);
|
||||
})
|
||||
}
|
||||
|
||||
void PreventAttack(CreatureLib::Battling::ExecutingAttack* attack, bool* outResult) override {
|
||||
@@ -206,7 +209,10 @@ public:
|
||||
}
|
||||
|
||||
void PreventSelfSwitch(const CreatureLib::Battling::SwitchTurnChoice* choice, bool* outResult) override {
|
||||
throw NotImplementedException(); // TODO
|
||||
CALL_HOOK(PreventSelfSwitch, {
|
||||
ctx->SetArgObject(0, (void*)choice);
|
||||
ctx->SetArgAddress(1, outResult);
|
||||
})
|
||||
}
|
||||
|
||||
void ModifyEffectChance(const CreatureLib::Battling::ExecutingAttack* attack,
|
||||
|
||||
Reference in New Issue
Block a user