private static void on_friend_request(Event_FriendAcceptedRequest ev) { if (BasicPlayerInfoOps.Contains(pending_friends_incoming, ev.PlayerInfo)) { Debug.LogErrorFormat("Request from {0} is already pending.", ev.PlayerInfo.DisplayName); return; } pending_friends_incoming.Add(ev.PlayerInfo); }
private static void on_send_friend_request(BasicPlayerInfo target, FriendRequestResult r) { if (r.IsNowPending) { if (BasicPlayerInfoOps.Contains(pending_friends_outgoing, target)) { Debug.LogError("Server added pending outgoing friend but the datastore thinks the player is already in the pending list."); return; } pending_friends_outgoing.Add(target); } }
private static void on_answer_friend_request(BasicPlayerInfo player, AnswerFriendRequestResult r) { if (r.NowFriend) { if (BasicPlayerInfoOps.Contains(friends, player)) { Debug.LogError("Server added friend but the data store thinks the player is already a friend"); return; } friends.Add(player); } }
private static void on_ignore_player(BasicPlayerInfo player, IgnorePlayerResult r) { if (r.IsIgnored) { if (BasicPlayerInfoOps.Contains(ignored, player)) { Debug.Log("Server said to us player is ignored and the data store already have that player as ignored. Hopefully we just tried to ignore an already ignored player."); return; } ignored.Add(player); } }