Use GetUseAttack for executingmove
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-05-13 13:25:08 +02:00
parent d8eac290cf
commit 59a092a06e
2 changed files with 6 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ void RegisterExecutingAttack::Register(asIScriptEngine* engine) {
}
BORROWED_PTR_GETTER_FUNC(CreatureLib::Battling::ExecutingAttack, CreatureLib::Battling::Creature, GetUser);
BORROWED_PTR_GETTER_FUNC(CreatureLib::Battling::ExecutingAttack, CreatureLib::Battling::LearnedAttack, GetAttack);
BORROWED_PTR_GETTER_FUNC(CreatureLib::Battling::ExecutingAttack, const CreatureLib::Library::AttackData, GetUseAttack);
static CreatureLib::Battling::ExecutingAttack::HitData*
GetHitDataWrapper(CreatureLib::Battling::ExecutingAttack* obj, CreatureLib::Battling::Creature* c, uint8_t hit) {
return &obj->GetHitData(c, hit);
@@ -60,4 +61,7 @@ void RegisterExecutingAttack::RegisterExecutingAttackType(asIScriptEngine* engin
r = engine->RegisterObjectMethod("ExecutingMove", "LearnedMove@ get_Move() const property",
asFUNCTION(GetAttackWrapper), asCALL_CDECL_OBJFIRST);
Ensure(r >= 0);
r = engine->RegisterObjectMethod("ExecutingMove", "MoveData@ get_UseMove() const property",
asFUNCTION(GetUseAttackWrapper), asCALL_CDECL_OBJFIRST);
Ensure(r >= 0);
}