diff --git a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterParty.cpp b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterParty.cpp index 9ac095c..9b462ea 100644 --- a/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterParty.cpp +++ b/src/ScriptResolving/AngelScript/TypeRegistry/Battling/RegisterParty.cpp @@ -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); }