1
This commit is contained in:
parent
3ac553e110
commit
e16035737d
@ -62,7 +62,7 @@ type FriendMgr interface {
|
||||
AsyncApplyFriend(string, string, func(int32, string))
|
||||
AsyncAcceptApply(string, string, func(int32, string))
|
||||
AsyncRejectApply(string, string, func(int32, string))
|
||||
AsynDeleteFriend(string, string, func(int32, string))
|
||||
AsyncDeleteFriend(string, string, func(int32, string))
|
||||
AsyncAddBlack(string, string, func(int32, string))
|
||||
AsyncRemoveBlack(string, string, func(int32, string))
|
||||
}
|
||||
@ -85,6 +85,7 @@ type GuildMgr interface {
|
||||
AsyncApplyJoin(string, string, func(int32, string))
|
||||
AsyncAcceptApply(string, string, func(int32, string))
|
||||
AsyncRejectApply(string, string, func(int32, string))
|
||||
|
||||
AsyncLeave(string, func(int32, string))
|
||||
AsyncKickout(string, string, func(int32, string))
|
||||
AsyncDisband(string, string, func(int32, string))
|
||||
|
@ -314,7 +314,6 @@ func (this *friendMgr) AsynDeleteFriend(senderId string, targetId string, cb fun
|
||||
}
|
||||
this.removeFriendShip(accountId1, accountId2)
|
||||
cb(0, "")
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -284,6 +284,24 @@ func (this *player) CMRejectFriendRequest(hdr *f5.MsgHdr, msg *cs.CMRejectFriend
|
||||
}
|
||||
|
||||
func (this *player) CMDeleteFriendShip(hdr *f5.MsgHdr, msg *cs.CMDeleteFriendShip) {
|
||||
rspMsg := new(cs.SMDeleteFriendShip)
|
||||
f5.NewLockAsyncTask(
|
||||
[][]string{
|
||||
{constant.MEMBER_LOCK_KEY, this.GetAccountId()},
|
||||
{constant.MEMBER_LOCK_KEY, msg.GetTargetAccountId()},
|
||||
},
|
||||
func (cb *f5.LockAsyncTask) {
|
||||
GetFriendMgr().AsyncDeleteFriend(
|
||||
this.GetAccountId(),
|
||||
msg.GetTargetAccountId(),
|
||||
func (errCode int32, errMsg string) {
|
||||
if errCode != 0 {
|
||||
this.SendMsg(rspMsg.Err(500, "server internal error"))
|
||||
return
|
||||
}
|
||||
this.SendMsg(rspMsg)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
func (this *player) CMAddBlacklist(hdr *f5.MsgHdr, msg *cs.CMAddBlacklist) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user