private void OnAgreeFriend() { // 正式请求 CSAccept csAccept = new CSAccept() { OperationUid = scOtherStruct.Uid }; ProtocalManager.Instance().SendCSAccept(csAccept, (serverRes) => { StaticData.playerInfoData.listApplyInfo.RemoveAt(itemIndex); StaticData.playerInfoData.listFriendInfo.Add(new SCFriendInfo() { Uid = scOtherStruct.Uid, FriendName = scOtherStruct.FriendName, FriendExperience = scOtherStruct.FriendExperience, FriendImage = scOtherStruct.FriendImage, Online = scOtherStruct.Online }); uiFriendComponent.GenerateApplyListUI(); //Destroy(gameObject); }, (error) => { }); }
public void SendCSAccept(CSAccept csaccept, Action <SCEmptyAccept> ResponseSCEmptyAcceptCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true) { OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSAccept> (); ProtoSendMethod.BusinessRequest <SCEmptyAccept>(csaccept, opCodeType, ResponseSCEmptyAcceptCallBack, errorCallBack, isShowDefaultTip); }