好友切磋pvp

This commit is contained in:
wh_zcy 2023-02-08 18:52:07 +08:00
parent 49915ec269
commit 885993f549

View File

@ -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 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
red := this.moduleFriend.ModuleUser.GetUser(req.Uid) red := this.moduleFriend.ModuleUser.GetUser(req.Uid)
if red == nil { 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()}) this.moduleFriend.Error("未找到蓝方信息", log.Field{Key: "uid", Value: session.GetUserId()})
return return
} }
// if _, code = ipvp.CreatePvp( if _, code = ipvp.CreatePvp(
// &pb.PvpUserInfo{Uid: red.Uid, Name: red.Name, Avatar: red.Avatar, Lv: red.Lv}, &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.PvpUserInfo{Uid: blue.Uid, Name: blue.Name, Avatar: blue.Avatar, Lv: blue.Lv},
// pb.PvpType_friends, pb.PvpType_friends,
// ); code != pb.ErrorCode_Success { ); code != pb.ErrorCode_Success {
// return return
// } }
} }
} }