public byte AddInvitedFriend(stInvitedFriend friend, bool persist = true) { if (!this.m_InvitedFriendDic.ContainsKey(friend.uulUid)) { try { this.m_InvitedFriendDic.Add(friend.uulUid, friend); if (persist) { this.WriteInvitedFriendDicToBinFile(); } byte b = 1; byte result = b; return(result); } catch (Exception) { byte b2 = 0; byte result = b2; return(result); } return(0); } return(0); }
public stInvitedFriend GetInvitedFriendByUid(ulong uulUid) { if (!this.m_IsInited) { this.InitLoginData(); } if (!this.m_IsLocalDataInited) { this.InitLocalData(); } stInvitedFriend result = default(stInvitedFriend); if (this.m_InvitedFriendDic.ContainsKey(uulUid)) { this.m_InvitedFriendDic.TryGetValue(uulUid, ref result); } return(result); }
public stInvitedFriend GetInvitedFriendByUid(ulong uulUid) { if (!this.m_IsInited) { this.InitLoginData(); } if (!this.m_IsLocalDataInited) { this.InitLocalData(); } stInvitedFriend friend = new stInvitedFriend(); if (this.m_InvitedFriendDic.ContainsKey(uulUid)) { this.m_InvitedFriendDic.TryGetValue(uulUid, out friend); } return(friend); }
public byte AddInvitedFriend(stInvitedFriend friend, bool persist = true) { if (!this.m_InvitedFriendDic.ContainsKey(friend.uulUid)) { try { this.m_InvitedFriendDic.Add(friend.uulUid, friend); if (persist) { this.WriteInvitedFriendDicToBinFile(); } return(1); } catch (Exception) { return(0); } } return(0); }