Fixed Angelscript ExecutingAttack::GetHitData function.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4c48085840
commit
6ffcd4dcbc
|
@ -9,6 +9,10 @@ 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);
|
||||
static CreatureLib::Battling::ExecutingAttack::HitData*
|
||||
GetHitDataWrapper(CreatureLib::Battling::ExecutingAttack* obj, CreatureLib::Battling::Creature* c, uint8_t hit) {
|
||||
return &obj->GetHitData(c, hit);
|
||||
}
|
||||
|
||||
void RegisterExecutingAttack::RegisterHitData(asIScriptEngine* engine) {
|
||||
[[maybe_unused]] int r = engine->RegisterObjectType("HitData", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
|
@ -38,7 +42,7 @@ void RegisterExecutingAttack::RegisterExecutingAttackType(asIScriptEngine* engin
|
|||
[[maybe_unused]] int r = engine->RegisterObjectType("ExecutingMove", 0, asOBJ_REF | asOBJ_NOCOUNT);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("ExecutingMove", "HitData@ GetHitData(Pokemon@ target, uint8 hit) const",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack, GetHitData), asCALL_THISCALL);
|
||||
asFUNCTION(GetHitDataWrapper), asCALL_CDECL_OBJFIRST);
|
||||
Assert(r >= 0);
|
||||
r = engine->RegisterObjectMethod("ExecutingMove", "bool IsPokemonTarget(Pokemon@ pkmn) const",
|
||||
asMETHOD(CreatureLib::Battling::ExecutingAttack, IsCreatureTarget),
|
||||
|
|
Loading…
Reference in New Issue