/// <summary> /// 创建实例 /// </summary> public static AgreeAddFriendRequest create(long playerID) { AgreeAddFriendRequest re = (AgreeAddFriendRequest)BytesControl.createRequest(dataID); re.playerID = playerID; return(re); }
/// <summary> /// 同意添加好友 /// </summary> public void agreeApplyFriend(long playerID) { //好友列表已满 if (isFriendListFull()) { me.showInfoCode(InfoCodeType.Friend_friendListIsFull); return; } //已是好友 if (_d.friends.contains(playerID)) { me.showInfoCode(InfoCodeType.Friend_targetIsAlreadyFriend); return; } if (_d.applyDic.remove(playerID) != null) { me.dispatch(GameEventType.RefreshApplyFriendList); } me.send(AgreeAddFriendRequest.create(playerID)); }