好友切磋pvp
This commit is contained in:
parent
49915ec269
commit
885993f549
@ -23,7 +23,7 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.FriendAcceptReq)
|
||||
}
|
||||
|
||||
if imodule, err := this.moduleFriend.service.GetModule(comm.ModulePvp); err == nil {
|
||||
if _, ok := imodule.(comm.IPvp); ok {
|
||||
if ipvp, ok := imodule.(comm.IPvp); ok {
|
||||
//发起者 red
|
||||
red := this.moduleFriend.ModuleUser.GetUser(req.Uid)
|
||||
if red == nil {
|
||||
@ -37,13 +37,13 @@ func (this *apiComp) Accept(session comm.IUserSession, req *pb.FriendAcceptReq)
|
||||
this.moduleFriend.Error("未找到蓝方信息", log.Field{Key: "uid", Value: session.GetUserId()})
|
||||
return
|
||||
}
|
||||
// if _, code = ipvp.CreatePvp(
|
||||
// &pb.PvpUserInfo{Uid: red.Uid, Name: red.Name, Avatar: red.Avatar, Lv: red.Lv},
|
||||
// &pb.PvpUserInfo{Uid: blue.Uid, Name: blue.Name, Avatar: blue.Avatar, Lv: blue.Lv},
|
||||
// pb.PvpType_friends,
|
||||
// ); code != pb.ErrorCode_Success {
|
||||
// return
|
||||
// }
|
||||
if _, code = ipvp.CreatePvp(
|
||||
&pb.PvpUserInfo{Uid: red.Uid, Name: red.Name, Avatar: red.Avatar, Lv: red.Lv},
|
||||
&pb.PvpUserInfo{Uid: blue.Uid, Name: blue.Name, Avatar: blue.Avatar, Lv: blue.Lv},
|
||||
pb.PvpType_friends,
|
||||
); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user