private void OnFriendClick(GameObject go)
 {
     Globals.Instance.EffectSoundMgr.Play("ui/ui_001");
     if (this.mChatInfo == null)
     {
         return;
     }
     if (this.friendType == 1)
     {
         GameMessageBox gameMessageBox = GameMessageBox.ShowMessageBox(Singleton<StringManager>.Instance.GetString("friend_22", new object[]
         {
             this.mChatInfo.Name
         }), MessageBox.Type.OKCancel, this.mChatInfo);
         GameMessageBox expr_5E = gameMessageBox;
         expr_5E.OkClick = (MessageBox.MessageDelegate)Delegate.Combine(expr_5E.OkClick, new MessageBox.MessageDelegate(delegate(object obj)
         {
             if (Globals.Instance.Player.FriendSystem.IsFriend(this.mChatInfo.PlayerID))
             {
                 MC2S_RemoveFriend mC2S_RemoveFriend = new MC2S_RemoveFriend();
                 mC2S_RemoveFriend.GUID = this.mChatInfo.PlayerID;
                 Globals.Instance.CliSession.Send(313, mC2S_RemoveFriend);
             }
             else
             {
                 GameUIManager.mInstance.ShowMessageTipByKey("friend_33", 0f, 0f);
             }
         }));
         this.friendType = 0;
     }
     else if (this.mChatInfo.PlayerID == Globals.Instance.Player.Data.ID)
     {
         GameUIManager.mInstance.ShowMessageTipByKey("friend_30", 0f, 0f);
     }
     else
     {
         MC2S_RequestFriend mC2S_RequestFriend = new MC2S_RequestFriend();
         mC2S_RequestFriend.GUID = this.mChatInfo.PlayerID;
         Globals.Instance.CliSession.Send(309, mC2S_RequestFriend);
     }
     this.EnablePersonalInfoLayer(false);
 }
Beispiel #2
0
 private void HandleRemoveFriendCmd(CommandParser.Command param)
 {
     ulong gUID = 0uL;
     ulong.TryParse(param.GetParam(1), out gUID);
     MC2S_RemoveFriend mC2S_RemoveFriend = new MC2S_RemoveFriend();
     mC2S_RemoveFriend.GUID = gUID;
     Globals.Instance.CliSession.Send(313, mC2S_RemoveFriend);
 }
 private void OnFriendBtnClick(GameObject go)
 {
     if (this.mGuildMember != null)
     {
         if (this.friendType == 1)
         {
             if (this.mGuildMember.ID != Globals.Instance.Player.Data.ID)
             {
                 GameMessageBox gameMessageBox = GameMessageBox.ShowMessageBox(Singleton<StringManager>.Instance.GetString("friend_22", new object[]
                 {
                     this.mGuildMember.Name
                 }), MessageBox.Type.OKCancel, null);
                 GameMessageBox expr_67 = gameMessageBox;
                 expr_67.OkClick = (MessageBox.MessageDelegate)Delegate.Combine(expr_67.OkClick, new MessageBox.MessageDelegate(delegate(object obj)
                 {
                     MC2S_RemoveFriend mC2S_RemoveFriend = new MC2S_RemoveFriend();
                     mC2S_RemoveFriend.GUID = this.mGuildMember.ID;
                     Globals.Instance.CliSession.Send(313, mC2S_RemoveFriend);
                 }));
             }
             this.friendType = 0;
         }
         else if (this.mGuildMember.ID == Globals.Instance.Player.Data.ID)
         {
             GameUIManager.mInstance.ShowMessageTipByKey("friend_30", 0f, 0f);
         }
         else
         {
             MC2S_RequestFriend mC2S_RequestFriend = new MC2S_RequestFriend();
             mC2S_RequestFriend.GUID = this.mGuildMember.ID;
             Globals.Instance.CliSession.Send(309, mC2S_RequestFriend);
         }
         GameUIPopupManager.GetInstance().PopState(true, null);
     }
 }