Exemplo n.º 1
0
 public void SendFollowAgency(List <int> send_follow_list, Action <bool> callback = null)
 {
     MonoBehaviourSingleton <FriendManager> .I.SendFollowUser(send_follow_list, delegate(Error err, List <int> follow_list)
     {
         bool flag = err == Error.None && follow_list.Count > 0;
         if (flag)
         {
             bool updated = false;
             send_follow_list.ForEach(delegate(int userId)
             {
                 FollowPartyMember followPartyMember = GetFollowPartyMember(userId);
                 if (followPartyMember != null && !followPartyMember.following)
                 {
                     followPartyMember.following = true;
                     updated = true;
                 }
             });
             if (updated)
             {
                 UpdateParty(partyData, followPartyMember, partyServerData, inviteFriendInfo, null);
             }
         }
         if (callback != null)
         {
             callback(flag);
         }
     });
 }
Exemplo n.º 2
0
 public void SendUnFollowAgency(int send_unfollow_user_id, Action <bool> callback = null)
 {
     MonoBehaviourSingleton <FriendManager> .I.SendUnfollowUser(send_unfollow_user_id, delegate(bool is_success)
     {
         if (is_success)
         {
             FollowPartyMember followPartyMember = GetFollowPartyMember(send_unfollow_user_id);
             if (followPartyMember != null && followPartyMember.following)
             {
                 followPartyMember.following = false;
                 UpdateParty(partyData, this.followPartyMember, partyServerData, inviteFriendInfo, null);
             }
         }
         if (callback != null)
         {
             callback(is_success);
         }
     });
 }