Changed C Interface ChangeAttack to use C functionality.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-08-04 17:59:50 +02:00
parent 9b9b644143
commit 9d56aaa52a
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,8 @@ export const char* CreatureLib_Script_GetName(Script* p) { return p->GetName().c
export uint8_t CreatureLib_Script_OnBeforeTurn(Script* p, const BaseTurnChoice* choice) {
Try(p->OnBeforeTurn(choice));
}
export uint8_t CreatureLib_Script_ChangeAttack(Script* p, AttackTurnChoice* choice, ArbUt::StringView* outAttack) {
Try(p->ChangeAttack(choice, outAttack));
export uint8_t CreatureLib_Script_ChangeAttack(Script* p, AttackTurnChoice* choice, const char*& outAttack) {
Try(auto sv = ArbUt::StringView(outAttack); p->ChangeAttack(choice, &sv); outAttack = sv.c_str(););
}
export uint8_t CreatureLib_Script_PreventAttack(Script* p, ExecutingAttack* attack, bool* outResult) {
Try(p->PreventAttack(attack, outResult));