From 85cd7073cf5fcb5b0c6ff051a9030ffccf6c8c3b Mon Sep 17 00:00:00 2001 From: David Snopek Date: Mon, 25 Apr 2022 10:05:44 -0500 Subject: [PATCH] Fix receiving "NakamaRTAPI.PartyClose" message (#105) --- CHANGELOG.md | 4 ++++ addons/com.heroiclabs.nakama/api/NakamaRTAPI.gd | 4 ++-- addons/com.heroiclabs.nakama/socket/NakamaSocket.gd | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b8d91..187b1eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ The format is based on [keep a changelog](http://keepachangelog.com/) and this p - Add support for "count_multple" on "NakamaSocket.add_matchmaker_async()" and "NakamaSocket.add_matchmaker_party_async()" - Add C# support classes to better integrate the .NET client with the Mono version of Godot, allowing HTML5 exports to work +### Fixed + +- Fix receiving "NakamaRTAPI.PartyClose" message + ## [3.0.0] - 2022-03-28 ### Added diff --git a/addons/com.heroiclabs.nakama/api/NakamaRTAPI.gd b/addons/com.heroiclabs.nakama/api/NakamaRTAPI.gd index c38e76f..86a61ba 100644 --- a/addons/com.heroiclabs.nakama/api/NakamaRTAPI.gd +++ b/addons/com.heroiclabs.nakama/api/NakamaRTAPI.gd @@ -838,8 +838,8 @@ class PartyClose extends NakamaAsyncResult: # Party ID to close. var party_id : String - func _init(p_id : String): - party_id = p_id + func _init(p_ex = null).(p_ex): + pass func serialize(): return NakamaSerializer.serialize(self) diff --git a/addons/com.heroiclabs.nakama/socket/NakamaSocket.gd b/addons/com.heroiclabs.nakama/socket/NakamaSocket.gd index 39c3849..65ce061 100644 --- a/addons/com.heroiclabs.nakama/socket/NakamaSocket.gd +++ b/addons/com.heroiclabs.nakama/socket/NakamaSocket.gd @@ -510,7 +510,9 @@ func add_matchmaker_party_async(p_party_id : String, p_query : String = "*", p_m # @param p_party_id - The ID of the party. # Returns a task to represent the asynchronous operation. func close_party_async(p_party_id : String): - return _send_async(NakamaRTAPI.PartyClose.new(p_party_id)) + var msg := NakamaRTAPI.PartyClose.new() + msg.party_id = p_party_id + return _send_async(msg) # Create a party. # @param p_open - Whether or not the party will require join requests to be approved by the party leader.