1
This commit is contained in:
parent
f80a0c21c9
commit
bc954f51df
@ -59,6 +59,12 @@ type FriendMgr interface {
|
|||||||
GetFriendList(string) []string
|
GetFriendList(string) []string
|
||||||
GetBlackList(string) []string
|
GetBlackList(string) []string
|
||||||
AsyncGetApplyList(int64, string, func(int32, string, int64, []string))
|
AsyncGetApplyList(int64, string, func(int32, string, int64, []string))
|
||||||
|
AsyncAddFriend(string, string, func(int32, string))
|
||||||
|
AsyncAccpetApply(string, string, func(int32, string))
|
||||||
|
AsyncRejectApply(string, string, func(int32, string))
|
||||||
|
AsynDeleteFriend(string, string, func(int32, string))
|
||||||
|
AsyncAddBlack(string, string, func(int32, string))
|
||||||
|
AsyncRemoveBlack(string, string, func(int32, string))
|
||||||
}
|
}
|
||||||
|
|
||||||
type Guild interface {
|
type Guild interface {
|
||||||
|
@ -93,3 +93,27 @@ func (this *FriendMgr) getFriends(accountId string) *map[string]int32 {
|
|||||||
func (this *FriendMgr) AsyncGetApplyList(int64, string, func(int32, string, int64, []string)) {
|
func (this *FriendMgr) AsyncGetApplyList(int64, string, func(int32, string, int64, []string)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *FriendMgr) AsyncAddFriend(senderId string, targetId string, cb func(int32, string)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *FriendMgr) AsyncAccpetApply(senderId string, targetId string, cb func(int32, string)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *FriendMgr) AsyncRejectApply(senderId string, targetId string, cb func(int32, string)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *FriendMgr) AsynDeleteFriend(senderId string, targetId string, cb func(int32, string)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *FriendMgr) AsyncAddBlack(senderId string, targetId string, cb func(int32, string)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *FriendMgr) AsyncRemoveBlack(senderId string, targetId string, cb func(int32, string)) {
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -162,6 +162,18 @@ func (this *player) CMBlacklist(hdr *f5.MsgHdr, msg *cs.CMBlacklist) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) CMAddFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAddFriendRequest) {
|
func (this *player) CMAddFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAddFriendRequest) {
|
||||||
|
rspMsg := new(cs.SMAddFriendRequest)
|
||||||
|
if GetFriendMgr().IsFriend(this.GetAccountId(), msg.GetTargetAccountId()) {
|
||||||
|
rspMsg.IsFriendship = proto.Int32(1)
|
||||||
|
this.SendMsg(rspMsg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
GetFriendMgr().AsyncAddFriend(
|
||||||
|
this.GetAccountId(),
|
||||||
|
msg.GetTargetAccountId(),
|
||||||
|
func (errCode int32, errMsg string) {
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *player) CMAcceptFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAcceptFriendRequest) {
|
func (this *player) CMAcceptFriendRequest(hdr *f5.MsgHdr, msg *cs.CMAcceptFriendRequest) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user