feat: the rebuild gamemode of "Gauntlet"
This commit is contained in:
@@ -130,9 +130,9 @@ func add_friend_by_id(user_id: String) -> bool:
|
||||
print("[FriendManager] add_friend_by_id: add_friends_async OK, sending notification RPC...")
|
||||
# Step 2: Notify the target via RPC
|
||||
var payload = JSON.stringify({"user_id": user_id})
|
||||
var rpc_result = await NakamaManager.client.rpc_async(NakamaManager.session, "send_friend_request", payload)
|
||||
if rpc_result.is_exception():
|
||||
push_error("[FriendManager] rpcSendFriendRequest failed: " + rpc_result.get_exception().message)
|
||||
var rpc_result = await BackendService.send_friend_request(user_id)
|
||||
if rpc_result.get("success", false) == false:
|
||||
push_error("[FriendManager] rpcSendFriendRequest failed: " + str(rpc_result.get("error", "")))
|
||||
else:
|
||||
print("[FriendManager] rpcSendFriendRequest OK: " + str(rpc_result.payload))
|
||||
|
||||
@@ -169,11 +169,9 @@ func remove_friend(user_id: String) -> bool:
|
||||
func send_lobby_invite(to_user_id: String, match_id: String) -> void:
|
||||
if not NakamaManager.session:
|
||||
return
|
||||
var payload = JSON.stringify({"to_user_id": to_user_id, "match_id": match_id})
|
||||
var result = await NakamaManager.client.rpc_async(
|
||||
NakamaManager.session, "send_lobby_invite", payload)
|
||||
if result.is_exception():
|
||||
push_warning("[FriendManager] send_lobby_invite failed: " + result.get_exception().message)
|
||||
var result = await BackendService.send_lobby_invite(to_user_id, match_id)
|
||||
if result.get("success", false) == false:
|
||||
push_warning("[FriendManager] send_lobby_invite failed: " + str(result.get("error", "")))
|
||||
|
||||
func _on_notification_received(notification) -> void:
|
||||
print("[FriendManager] _on_notification_received: code=%d sender=%s" % [notification.code, notification.sender_id])
|
||||
|
||||
Reference in New Issue
Block a user