1
This commit is contained in:
parent
04de2961c3
commit
d63f9fdca3
@ -184,6 +184,15 @@ func (this *player) CMAddFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAddFriendReques
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) CMAcceptFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAcceptFriendRequest) {
|
func (this *player) CMAcceptFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAcceptFriendRequest) {
|
||||||
|
rspMsg := new(cs.SMAcceptFriendRequest)
|
||||||
|
if this.GetAccountId() == msg.GetTargetAccountId() {
|
||||||
|
this.SendMsg(rspMsg.Err(2, "Cannot add oneself"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if GetFriendMgr().IsFriend(this.GetAccountId(), msg.GetTargetAccountId()) {
|
||||||
|
this.SendMsg(rspMsg)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) CMRejectFriendRequest(hdr *f5.MsgHdr, msg *cs.CMRejectFriendRequest) {
|
func (this *player) CMRejectFriendRequest(hdr *f5.MsgHdr, msg *cs.CMRejectFriendRequest) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user