Fixes BattleParty::GetParty not returning valid value in AngelScript
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2021-08-29 17:45:27 +02:00
parent bb4fd8456c
commit a6771353b0
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 4 additions and 2 deletions

View File

@ -27,10 +27,12 @@ void RegisterParty::RegisterPartyClass(asIScriptEngine* engine) {
Ensure(r >= 0);
}
BORROWED_PTR_GETTER_FUNC(CreatureLib::Battling::BattleParty, CreatureLib::Battling::CreatureParty, GetParty);
void RegisterParty::RegisterBattleParty(asIScriptEngine* engine) {
auto r = engine->RegisterObjectType("BattleParty", 0, asOBJ_REF | asOBJ_NOCOUNT);
Ensure(r >= 0);
r = engine->RegisterObjectMethod("BattleParty", "Party@ get_Party() const property",
asMETHOD(CreatureLib::Battling::BattleParty, GetParty), asCALL_THISCALL);
r = engine->RegisterObjectMethod("BattleParty", "Party@ get_Party() const property", asFUNCTION(GetPartyWrapper),
asCALL_CDECL_OBJFIRST);
Ensure(r >= 0);
}