Mark LearnedAttack in ExecutingAttack as smart pointer
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-06-02 21:29:01 +02:00
parent 6225ed19fa
commit 64a22324c7
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ void RegisterExecutingAttack::Register(asIScriptEngine* engine) {
RegisterExecutingAttackType(engine);
}
SMART_PTR_GETTER_FUNC(CreatureLib::Battling::ExecutingAttack, CreatureLib::Battling::Creature, GetUser);
SMART_PTR_GETTER_FUNC(CreatureLib::Battling::ExecutingAttack, CreatureLib::Battling::LearnedAttack, GetAttack);
void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) {
[[maybe_unused]] int r = engine->RegisterObjectType("HitData", 0, asOBJ_REF | asOBJ_NOCOUNT);
@ -47,6 +48,6 @@ void RegisterExecutingAttack::RegisterExecutingAttackType(asIScriptEngine* engin
asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
r = engine->RegisterObjectMethod("ExecutingMove", "LearnedMove@ get_Move() const property",
asMETHOD(CreatureLib::Battling::ExecutingAttack, GetAttack), asCALL_THISCALL);
asFUNCTION(GetAttackWrapper), asCALL_CDECL_OBJFIRST);
Assert(r >= 0);
}