pb重命名
This commit is contained in:
parent
1d602288dd
commit
55c6844301
@ -8,73 +8,73 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
//friend
|
//friend
|
||||||
friend_builders = []*builder{
|
friendBuilders = []*builder{
|
||||||
{
|
{
|
||||||
//list
|
//list
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_List,
|
subType: friend.FriendSubTypeList,
|
||||||
req: &pb.Friend_List_Req{},
|
req: &pb.FriendListReq{},
|
||||||
rsp: &pb.Friend_List_Rsp{},
|
rsp: &pb.FriendListRsp{},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
}, {
|
}, {
|
||||||
//blacklist
|
//blacklist
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_Blacklist,
|
subType: friend.FriendSubTypeBlacklist,
|
||||||
req: &pb.Friend_BlackList_Req{},
|
req: &pb.FriendBlackListReq{},
|
||||||
rsp: &pb.Friend_BlackList_Rsp{},
|
rsp: &pb.FriendBlackListRsp{},
|
||||||
}, {
|
}, {
|
||||||
//search
|
//search
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_Search,
|
subType: friend.FriendSubTypeSearch,
|
||||||
req: &pb.Friend_Search_Req{
|
req: &pb.FriendSearchReq{
|
||||||
NickName: "", //设置测试参数
|
NickName: "", //设置测试参数
|
||||||
},
|
},
|
||||||
rsp: &pb.Friend_Search_Rsp{},
|
rsp: &pb.FriendSearchRsp{},
|
||||||
}, {
|
}, {
|
||||||
//apply
|
//apply
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_Apply,
|
subType: friend.FriendSubTypeApply,
|
||||||
req: &pb.Friend_Apply_Req{},
|
req: &pb.FriendApplyReq{},
|
||||||
rsp: &pb.Friend_Apply_Rsp{},
|
rsp: &pb.FriendApplyRsp{},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
}, {
|
}, {
|
||||||
//applylist
|
//applylist
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_ApplyList,
|
subType: friend.FriendSubTypeApplyList,
|
||||||
req: &pb.Friend_ApplyList_Req{},
|
req: &pb.FriendApplyListReq{},
|
||||||
rsp: &pb.Friend_ApplyList_Rsp{},
|
rsp: &pb.FriendApplyListRsp{},
|
||||||
}, {
|
}, {
|
||||||
//agree
|
//agree
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_Agree,
|
subType: friend.FriendSubTypeAgree,
|
||||||
req: &pb.Friend_Agree_Req{},
|
req: &pb.FriendAgreeReq{},
|
||||||
rsp: &pb.Friend_Agree_Rsp{},
|
rsp: &pb.FriendAgreeRsp{},
|
||||||
}, {
|
}, {
|
||||||
//refuse
|
//refuse
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_Refuse,
|
subType: friend.FriendSubTypeRefuse,
|
||||||
req: &pb.Friend_Agree_Req{},
|
req: &pb.FriendAgreeReq{},
|
||||||
rsp: &pb.Friend_Agree_Rsp{},
|
rsp: &pb.FriendAgreeRsp{},
|
||||||
}, {
|
}, {
|
||||||
//addblack
|
//addblack
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_AddBlack,
|
subType: friend.FriendSubTypeAddBlack,
|
||||||
req: &pb.Friend_BlackAdd_Req{
|
req: &pb.FriendBlackAddReq{
|
||||||
FriendId: "",
|
FriendId: "",
|
||||||
},
|
},
|
||||||
rsp: &pb.Friend_BlackAdd_Rsp{},
|
rsp: &pb.FriendBlackAddRsp{},
|
||||||
}, {
|
}, {
|
||||||
//delblack
|
//delblack
|
||||||
mainType: string(comm.SM_FriendModule),
|
mainType: string(comm.SM_FriendModule),
|
||||||
subType: friend.Friend_SubType_DelBlack,
|
subType: friend.FriendSubTypeDelBlack,
|
||||||
req: &pb.Friend_DelBlack_Req{},
|
req: &pb.FriendDelBlackReq{},
|
||||||
rsp: &pb.Friend_DelBlack_Rsp{},
|
rsp: &pb.FriendDelBlackRsp{},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
//声明加入到构建器并发起请求
|
//声明加入到构建器并发起请求
|
||||||
func (r *Robot) RunFriend() {
|
func (r *Robot) RunFriend() {
|
||||||
r.addBuilders(friend_builders)
|
r.addBuilders(friendBuilders)
|
||||||
r.handleReq()
|
r.handleReq()
|
||||||
}
|
}
|
||||||
|
@ -8,19 +8,21 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
//hero
|
//hero
|
||||||
hero_builders = []*builder{
|
heroBuilders = []*builder{
|
||||||
{
|
{
|
||||||
mainType: string(comm.SM_HeroModule),
|
mainType: string(comm.SM_HeroModule),
|
||||||
subType: hero.Hero_SubType_List,
|
subType: hero.HeroSubTypeList,
|
||||||
req: &pb.Hero_List_Req{},
|
req: &pb.Hero_List_Req{},
|
||||||
rsp: &pb.Hero_List_Rsp{},
|
rsp: &pb.Hero_List_Rsp{},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
}, {
|
||||||
|
mainType: string(comm.SM_HeroModule),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
//声明加入到构建器并发起请求
|
//声明加入到构建器并发起请求
|
||||||
func (r *Robot) RunHero() {
|
func (r *Robot) RunHero() {
|
||||||
r.addBuilders(hero_builders)
|
r.addBuilders(heroBuilders)
|
||||||
r.handleReq()
|
r.handleReq()
|
||||||
}
|
}
|
||||||
|
@ -6,15 +6,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Friend_SubType_List = "list"
|
FriendSubTypeList = "list"
|
||||||
Friend_SubType_Apply = "apply"
|
FriendSubTypeApply = "apply"
|
||||||
Friend_SubType_ApplyList = "applylist"
|
FriendSubTypeApplyList = "applylist"
|
||||||
Friend_SubType_AddBlack = "addblack"
|
FriendSubTypeAddBlack = "addblack"
|
||||||
Friend_SubType_DelBlack = "delblack"
|
FriendSubTypeDelBlack = "delblack"
|
||||||
Friend_SubType_Blacklist = "blacklist"
|
FriendSubTypeBlacklist = "blacklist"
|
||||||
Friend_SubType_Agree = "agree"
|
FriendSubTypeAgree = "agree"
|
||||||
Friend_SubType_Refuse = "refuse"
|
FriendSubTypeRefuse = "refuse"
|
||||||
Friend_SubType_Search = "search"
|
FriendSubTypeSearch = "search"
|
||||||
)
|
)
|
||||||
|
|
||||||
type apiComp struct {
|
type apiComp struct {
|
||||||
|
@ -6,14 +6,14 @@ import (
|
|||||||
"go_dreamfactory/utils"
|
"go_dreamfactory/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) AddblackCheck(session comm.IUserSession, req *pb.Friend_BlackAdd_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) AddblackCheck(session comm.IUserSession, req *pb.FriendBlackAddReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
blackNumMax = 50 //TODO 从配置中读取
|
blackNumMax = 50 //TODO 从配置中读取
|
||||||
)
|
)
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
target := &pb.DB_FriendData{UId: req.FriendId}
|
target := &pb.DBFriend{UId: req.FriendId}
|
||||||
|
|
||||||
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
if self == nil || err != nil {
|
if self == nil || err != nil {
|
||||||
@ -58,22 +58,22 @@ func (this *apiComp) AddblackCheck(session comm.IUserSession, req *pb.Friend_Bla
|
|||||||
}
|
}
|
||||||
|
|
||||||
//加入黑名单
|
//加入黑名单
|
||||||
func (this *apiComp) Addblack(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_BlackAdd_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Addblack(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendBlackAddReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
self *pb.DB_FriendData
|
self *pb.DBFriend
|
||||||
rsp *pb.Friend_BlackAdd_Rsp
|
rsp *pb.FriendBlackAddRsp
|
||||||
)
|
)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
rsp = &pb.Friend_BlackAdd_Rsp{
|
rsp = &pb.FriendBlackAddRsp{
|
||||||
FriendId: req.FriendId,
|
FriendId: req.FriendId,
|
||||||
UserId: session.GetUserId(),
|
UserId: session.GetUserId(),
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), Friend_SubType_AddBlack, rsp)
|
session.SendMsg(string(this.module.GetType()), FriendSubTypeAddBlack, rsp)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if v, ok := chk["self"]; ok {
|
if v, ok := chk["self"]; ok {
|
||||||
self = v.(*pb.DB_FriendData)
|
self = v.(*pb.DBFriend)
|
||||||
//将目标加入黑名单
|
//将目标加入黑名单
|
||||||
self.BlackIds = append(self.BlackIds, req.FriendId)
|
self.BlackIds = append(self.BlackIds, req.FriendId)
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"go_dreamfactory/utils"
|
"go_dreamfactory/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.Friend_Agree_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.FriendAgreeReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
var err error
|
var err error
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
|
|
||||||
//获取玩家自己好友数据
|
//获取玩家自己好友数据
|
||||||
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
@ -34,18 +34,18 @@ func (this *apiComp) AgreeCheck(session comm.IUserSession, req *pb.Friend_Agree_
|
|||||||
}
|
}
|
||||||
|
|
||||||
//单个/批量同意
|
//单个/批量同意
|
||||||
func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Agree_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendAgreeReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
self *pb.DB_FriendData
|
self *pb.DBFriend
|
||||||
rsp *pb.Friend_Agree_Rsp
|
rsp *pb.FriendAgreeRsp
|
||||||
optNum int32
|
optNum int32
|
||||||
)
|
)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
rsp = &pb.Friend_Agree_Rsp{
|
rsp = &pb.FriendAgreeRsp{
|
||||||
Num: optNum,
|
Num: optNum,
|
||||||
}
|
}
|
||||||
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Agree, rsp)
|
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeAgree, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
@ -56,7 +56,7 @@ func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}
|
|||||||
code = pb.ErrorCode_FriendTargetNoData
|
code = pb.ErrorCode_FriendTargetNoData
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
self = v.(*pb.DB_FriendData)
|
self = v.(*pb.DBFriend)
|
||||||
}
|
}
|
||||||
|
|
||||||
if agreeIds, ok := chk["agreeIds"]; ok {
|
if agreeIds, ok := chk["agreeIds"]; ok {
|
||||||
@ -70,7 +70,7 @@ func (this *apiComp) Agree(session comm.IUserSession, chk map[string]interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
//双向添加:将自己加入到申请人的好友列表中
|
//双向添加:将自己加入到申请人的好友列表中
|
||||||
target := &pb.DB_FriendData{}
|
target := &pb.DBFriend{}
|
||||||
err := this.module.modelFriend.Get(userId, target)
|
err := this.module.modelFriend.Get(userId, target)
|
||||||
if target == nil || err != nil {
|
if target == nil || err != nil {
|
||||||
code = pb.ErrorCode_FriendTargetNoData
|
code = pb.ErrorCode_FriendTargetNoData
|
||||||
|
@ -7,11 +7,11 @@ import (
|
|||||||
"go_dreamfactory/utils"
|
"go_dreamfactory/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.Friend_Apply_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.FriendApplyReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
var err error
|
var err error
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
target := &pb.DB_FriendData{UId: req.FriendId}
|
target := &pb.DBFriend{UId: req.FriendId}
|
||||||
|
|
||||||
//获取玩家自己好友数据
|
//获取玩家自己好友数据
|
||||||
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
@ -79,24 +79,24 @@ func (this *apiComp) ApplyCheck(session comm.IUserSession, req *pb.Friend_Apply_
|
|||||||
}
|
}
|
||||||
|
|
||||||
//好友申请
|
//好友申请
|
||||||
func (this *apiComp) Apply(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Apply_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Apply(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendApplyReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
target *pb.DB_FriendData
|
target *pb.DBFriend
|
||||||
rsp *pb.Friend_Apply_Rsp
|
rsp *pb.FriendApplyRsp
|
||||||
)
|
)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), Friend_SubType_Apply, req, rsp)
|
utils.TraceFunc(session.GetUserId(), string(this.module.GetType()), FriendSubTypeApply, req, rsp)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if code == pb.ErrorCode_Success {
|
if code == pb.ErrorCode_Success {
|
||||||
rsp = &pb.Friend_Apply_Rsp{
|
rsp = &pb.FriendApplyRsp{
|
||||||
UserId: session.GetUserId(),
|
UserId: session.GetUserId(),
|
||||||
FriendId: req.FriendId,
|
FriendId: req.FriendId,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Apply, rsp)
|
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeApply, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
@ -107,7 +107,7 @@ func (this *apiComp) Apply(session comm.IUserSession, chk map[string]interface{}
|
|||||||
code = pb.ErrorCode_FriendTargetNoData
|
code = pb.ErrorCode_FriendTargetNoData
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
target = v.(*pb.DB_FriendData)
|
target = v.(*pb.DBFriend)
|
||||||
}
|
}
|
||||||
|
|
||||||
//将自己加入到目标用户的申请列表中
|
//将自己加入到目标用户的申请列表中
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) ApplyListCheck(session comm.IUserSession, req *pb.Friend_ApplyList_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) ApplyListCheck(session comm.IUserSession, req *pb.FriendApplyListReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
if self == nil || err != nil {
|
if self == nil || err != nil {
|
||||||
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
||||||
@ -18,24 +18,24 @@ func (this *apiComp) ApplyListCheck(session comm.IUserSession, req *pb.Friend_Ap
|
|||||||
}
|
}
|
||||||
|
|
||||||
//申请列表
|
//申请列表
|
||||||
func (this *apiComp) ApplyList(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_ApplyList_Req) (code pb.ErrorCode) {
|
func (this *apiComp) ApplyList(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendApplyListReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
self *pb.DB_FriendData
|
self *pb.DBFriend
|
||||||
rsp *pb.Friend_ApplyList_Rsp
|
rsp *pb.FriendApplyListRsp
|
||||||
list []*pb.FriendBase
|
list []*pb.FriendBase
|
||||||
)
|
)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
if code == pb.ErrorCode_Success {
|
if code == pb.ErrorCode_Success {
|
||||||
rsp = &pb.Friend_ApplyList_Rsp{
|
rsp = &pb.FriendApplyListRsp{
|
||||||
List: list,
|
List: list,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), Friend_SubType_ApplyList, rsp)
|
session.SendMsg(string(this.module.GetType()), FriendSubTypeApplyList, rsp)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if v, ok := chk["self"]; ok {
|
if v, ok := chk["self"]; ok {
|
||||||
self = v.(*pb.DB_FriendData)
|
self = v.(*pb.DBFriend)
|
||||||
for _, userId := range self.ApplyIds {
|
for _, userId := range self.ApplyIds {
|
||||||
//TODO 组装FriendBase明细数据
|
//TODO 组装FriendBase明细数据
|
||||||
list = append(list, &pb.FriendBase{
|
list = append(list, &pb.FriendBase{
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) BlacklistCheck(session comm.IUserSession, req *pb.Friend_BlackList_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) BlacklistCheck(session comm.IUserSession, req *pb.FriendBlackListReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
if self == nil || err != nil {
|
if self == nil || err != nil {
|
||||||
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
||||||
@ -18,19 +18,19 @@ func (this *apiComp) BlacklistCheck(session comm.IUserSession, req *pb.Friend_Bl
|
|||||||
}
|
}
|
||||||
|
|
||||||
//黑名单
|
//黑名单
|
||||||
func (this *apiComp) Blacklist(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_BlackList_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Blacklist(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendBlackListReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
self *pb.DB_FriendData
|
self *pb.DBFriend
|
||||||
rsp *pb.Friend_BlackList_Rsp
|
rsp *pb.FriendBlackListRsp
|
||||||
list []*pb.FriendBase
|
list []*pb.FriendBase
|
||||||
)
|
)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
rsp = &pb.Friend_BlackList_Rsp{
|
rsp = &pb.FriendBlackListRsp{
|
||||||
Friends: list,
|
Friends: list,
|
||||||
}
|
}
|
||||||
|
|
||||||
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Blacklist, rsp)
|
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeBlacklist, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
@ -38,7 +38,7 @@ func (this *apiComp) Blacklist(session comm.IUserSession, chk map[string]interfa
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
if v, ok := chk["self"]; ok {
|
if v, ok := chk["self"]; ok {
|
||||||
self = v.(*pb.DB_FriendData)
|
self = v.(*pb.DBFriend)
|
||||||
for _, userId := range self.BlackIds {
|
for _, userId := range self.BlackIds {
|
||||||
//TODO 完善FriendBase信息
|
//TODO 完善FriendBase信息
|
||||||
list = append(list, &pb.FriendBase{
|
list = append(list, &pb.FriendBase{
|
||||||
|
@ -5,11 +5,11 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) DelCheck(session comm.IUserSession, req *pb.Friend_Del_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) DelCheck(session comm.IUserSession, req *pb.FriendDelReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除好友
|
//删除好友
|
||||||
func (this *apiComp) Del(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Del_Req) error {
|
func (this *apiComp) Del(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendDelReq) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"go_dreamfactory/utils"
|
"go_dreamfactory/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) DelblackCheck(session comm.IUserSession, req *pb.Friend_DelBlack_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) DelblackCheck(session comm.IUserSession, req *pb.FriendDelBlackReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
if self == nil || err != nil {
|
if self == nil || err != nil {
|
||||||
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
||||||
@ -19,19 +19,19 @@ func (this *apiComp) DelblackCheck(session comm.IUserSession, req *pb.Friend_Del
|
|||||||
}
|
}
|
||||||
|
|
||||||
//删除黑名单
|
//删除黑名单
|
||||||
func (this *apiComp) Delblack(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_DelBlack_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Delblack(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendDelBlackReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
self *pb.DB_FriendData
|
self *pb.DBFriend
|
||||||
rsp *pb.Friend_DelBlack_Rsp
|
rsp *pb.FriendDelBlackRsp
|
||||||
)
|
)
|
||||||
defer func() {
|
defer func() {
|
||||||
if code == pb.ErrorCode_Success {
|
if code == pb.ErrorCode_Success {
|
||||||
rsp = &pb.Friend_DelBlack_Rsp{
|
rsp = &pb.FriendDelBlackRsp{
|
||||||
FriendId: req.FriendId,
|
FriendId: req.FriendId,
|
||||||
UserId: session.GetUserId(),
|
UserId: session.GetUserId(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_DelBlack, rsp)
|
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeDelBlack, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
@ -39,7 +39,7 @@ func (this *apiComp) Delblack(session comm.IUserSession, chk map[string]interfac
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
if v, ok := chk["self"]; ok {
|
if v, ok := chk["self"]; ok {
|
||||||
self = v.(*pb.DB_FriendData)
|
self = v.(*pb.DBFriend)
|
||||||
//从黑名单列表中删除目标
|
//从黑名单列表中删除目标
|
||||||
self.BlackIds = utils.DeleteString(self.BlackIds, req.FriendId)
|
self.BlackIds = utils.DeleteString(self.BlackIds, req.FriendId)
|
||||||
//更新黑名单
|
//更新黑名单
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.Friend_List_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.FriendListReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
err := this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
if self == nil || err != nil {
|
if self == nil || err != nil {
|
||||||
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSelfNoData}
|
||||||
@ -18,18 +18,18 @@ func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.Friend_List_Re
|
|||||||
}
|
}
|
||||||
|
|
||||||
//好友列表
|
//好友列表
|
||||||
func (this *apiComp) List(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_List_Req) (code pb.ErrorCode) {
|
func (this *apiComp) List(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendListReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
self *pb.DB_FriendData
|
self *pb.DBFriend
|
||||||
rsp *pb.Friend_List_Rsp
|
rsp *pb.FriendListRsp
|
||||||
list []*pb.FriendBase
|
list []*pb.FriendBase
|
||||||
)
|
)
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
rsp = &pb.Friend_List_Rsp{
|
rsp = &pb.FriendListRsp{
|
||||||
List: list,
|
List: list,
|
||||||
}
|
}
|
||||||
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_List, rsp)
|
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeList, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
@ -37,7 +37,7 @@ func (this *apiComp) List(session comm.IUserSession, chk map[string]interface{},
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
if v, ok := chk["self"]; ok {
|
if v, ok := chk["self"]; ok {
|
||||||
self = v.(*pb.DB_FriendData)
|
self = v.(*pb.DBFriend)
|
||||||
for _, userId := range self.FriendIds {
|
for _, userId := range self.FriendIds {
|
||||||
list = append(list, &pb.FriendBase{
|
list = append(list, &pb.FriendBase{
|
||||||
UserId: userId,
|
UserId: userId,
|
||||||
|
@ -6,10 +6,10 @@ import (
|
|||||||
"go_dreamfactory/utils"
|
"go_dreamfactory/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.Friend_Refuse_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.FriendRefuseReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
chk = make(map[string]interface{})
|
chk = make(map[string]interface{})
|
||||||
var err error
|
var err error
|
||||||
self := &pb.DB_FriendData{UId: session.GetUserId()}
|
self := &pb.DBFriend{UId: session.GetUserId()}
|
||||||
|
|
||||||
//获取玩家自己好友数据
|
//获取玩家自己好友数据
|
||||||
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
err = this.module.modelFriend.Get(session.GetUserId(), self)
|
||||||
@ -33,19 +33,19 @@ func (this *apiComp) RefuseCheck(session comm.IUserSession, req *pb.Friend_Refus
|
|||||||
}
|
}
|
||||||
|
|
||||||
//单个/批量拒绝
|
//单个/批量拒绝
|
||||||
func (this *apiComp) Refuse(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Refuse_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Refuse(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendRefuseReq) (code pb.ErrorCode) {
|
||||||
//将申请人从申请列表中删除
|
//将申请人从申请列表中删除
|
||||||
var (
|
var (
|
||||||
self *pb.DB_FriendData
|
self *pb.DBFriend
|
||||||
rsp *pb.Friend_Refuse_Rsp
|
rsp *pb.FriendRefuseRsp
|
||||||
optNum int32
|
optNum int32
|
||||||
)
|
)
|
||||||
defer func() {
|
defer func() {
|
||||||
rsp = &pb.Friend_Refuse_Rsp{
|
rsp = &pb.FriendRefuseRsp{
|
||||||
Num: optNum,
|
Num: optNum,
|
||||||
}
|
}
|
||||||
|
|
||||||
err := session.SendMsg(string(this.module.GetType()), Friend_SubType_Refuse, rsp)
|
err := session.SendMsg(string(this.module.GetType()), FriendSubTypeRefuse, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
@ -56,7 +56,7 @@ func (this *apiComp) Refuse(session comm.IUserSession, chk map[string]interface{
|
|||||||
code = pb.ErrorCode_FriendTargetNoData
|
code = pb.ErrorCode_FriendTargetNoData
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
self = v.(*pb.DB_FriendData)
|
self = v.(*pb.DBFriend)
|
||||||
|
|
||||||
if v, ok := chk["refuseIds"]; ok {
|
if v, ok := chk["refuseIds"]; ok {
|
||||||
//将申请人从申请列表中删除
|
//将申请人从申请列表中删除
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *apiComp) SearchCheck(session comm.IUserSession, req *pb.Friend_Search_Req) (chk map[string]interface{}, code comm.ErrorCode) {
|
func (this *apiComp) SearchCheck(session comm.IUserSession, req *pb.FriendSearchReq) (chk map[string]interface{}, code comm.ErrorCode) {
|
||||||
if req.NickName == "" {
|
if req.NickName == "" {
|
||||||
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSearchNameEmpty}
|
code = comm.ErrorCode{Code: pb.ErrorCode_FriendSearchNameEmpty}
|
||||||
return
|
return
|
||||||
@ -14,18 +14,18 @@ func (this *apiComp) SearchCheck(session comm.IUserSession, req *pb.Friend_Searc
|
|||||||
}
|
}
|
||||||
|
|
||||||
//搜索
|
//搜索
|
||||||
func (this *apiComp) Search(session comm.IUserSession, chk map[string]interface{}, req *pb.Friend_Search_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Search(session comm.IUserSession, chk map[string]interface{}, req *pb.FriendSearchReq) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
rsp *pb.Friend_Search_Rsp
|
rsp *pb.FriendSearchRsp
|
||||||
friend *pb.FriendBase
|
friend *pb.FriendBase
|
||||||
)
|
)
|
||||||
defer func() {
|
defer func() {
|
||||||
if code == pb.ErrorCode_Success {
|
if code == pb.ErrorCode_Success {
|
||||||
rsp = &pb.Friend_Search_Rsp{
|
rsp = &pb.FriendSearchRsp{
|
||||||
Friend: friend,
|
Friend: friend,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
session.SendMsg(string(this.module.GetType()), Friend_SubType_Search, rsp)
|
session.SendMsg(string(this.module.GetType()), FriendSubTypeSearch, rsp)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
user := this.module.modelFriend.Frined_FindCond(req.NickName)
|
user := this.module.modelFriend.Frined_FindCond(req.NickName)
|
||||||
|
@ -15,8 +15,8 @@ type apiComp struct {
|
|||||||
|
|
||||||
const ( //消息回复的头名称
|
const ( //消息回复的头名称
|
||||||
StrengthenUplv = "strengthenherolv"
|
StrengthenUplv = "strengthenherolv"
|
||||||
Hero_SubType_Info = "info" //英雄卡片信息
|
HeroSubTypeInfo = "info" //英雄卡片信息
|
||||||
Hero_SubType_List = "list" //英雄列表
|
HeroSubTypeList = "list" //英雄列表
|
||||||
)
|
)
|
||||||
|
|
||||||
//组件初始化接口
|
//组件初始化接口
|
||||||
|
@ -19,7 +19,7 @@ func (this *apiComp) InfoCheck(session comm.IUserSession, req *pb.Hero_Info_Req)
|
|||||||
func (this *apiComp) Info(session comm.IUserSession, result map[string]interface{}, req *pb.Hero_Info_Req) (code pb.ErrorCode) {
|
func (this *apiComp) Info(session comm.IUserSession, result map[string]interface{}, req *pb.Hero_Info_Req) (code pb.ErrorCode) {
|
||||||
rsp := &pb.Hero_Info_Rsp{}
|
rsp := &pb.Hero_Info_Rsp{}
|
||||||
defer func() {
|
defer func() {
|
||||||
err := session.SendMsg(string(this.moduleHero.GetType()), Hero_SubType_Info, rsp)
|
err := session.SendMsg(string(this.moduleHero.GetType()), HeroSubTypeInfo, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
return
|
return
|
||||||
|
@ -14,7 +14,7 @@ func (this *apiComp) List(session comm.IUserSession, result map[string]interface
|
|||||||
rsp := &pb.Hero_List_Rsp{}
|
rsp := &pb.Hero_List_Rsp{}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
err := session.SendMsg(this.moduleHero.api.service.GetType(), Hero_SubType_List, rsp)
|
err := session.SendMsg(string(this.moduleHero.GetType()), HeroSubTypeList, rsp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_SystemError
|
code = pb.ErrorCode_SystemError
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
type DB_FriendData struct {
|
type DBFriend struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
@ -31,8 +31,8 @@ type DB_FriendData struct {
|
|||||||
BlackIds []string `protobuf:"bytes,4,rep,name=blackIds,proto3" json:"blackIds" bson:"blackIds"` //黑名单ID
|
BlackIds []string `protobuf:"bytes,4,rep,name=blackIds,proto3" json:"blackIds" bson:"blackIds"` //黑名单ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_FriendData) Reset() {
|
func (x *DBFriend) Reset() {
|
||||||
*x = DB_FriendData{}
|
*x = DBFriend{}
|
||||||
if protoimpl.UnsafeEnabled {
|
if protoimpl.UnsafeEnabled {
|
||||||
mi := &file_friend_friend_db_proto_msgTypes[0]
|
mi := &file_friend_friend_db_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -40,13 +40,13 @@ func (x *DB_FriendData) Reset() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_FriendData) String() string {
|
func (x *DBFriend) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
return protoimpl.X.MessageStringOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*DB_FriendData) ProtoMessage() {}
|
func (*DBFriend) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DB_FriendData) ProtoReflect() protoreflect.Message {
|
func (x *DBFriend) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_friend_friend_db_proto_msgTypes[0]
|
mi := &file_friend_friend_db_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@ -58,33 +58,33 @@ func (x *DB_FriendData) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use DB_FriendData.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DBFriend.ProtoReflect.Descriptor instead.
|
||||||
func (*DB_FriendData) Descriptor() ([]byte, []int) {
|
func (*DBFriend) Descriptor() ([]byte, []int) {
|
||||||
return file_friend_friend_db_proto_rawDescGZIP(), []int{0}
|
return file_friend_friend_db_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_FriendData) GetUId() string {
|
func (x *DBFriend) GetUId() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.UId
|
return x.UId
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_FriendData) GetFriendIds() []string {
|
func (x *DBFriend) GetFriendIds() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.FriendIds
|
return x.FriendIds
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_FriendData) GetApplyIds() []string {
|
func (x *DBFriend) GetApplyIds() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.ApplyIds
|
return x.ApplyIds
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DB_FriendData) GetBlackIds() []string {
|
func (x *DBFriend) GetBlackIds() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.BlackIds
|
return x.BlackIds
|
||||||
}
|
}
|
||||||
@ -95,16 +95,15 @@ var File_friend_friend_db_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_friend_friend_db_proto_rawDesc = []byte{
|
var file_friend_friend_db_proto_rawDesc = []byte{
|
||||||
0x0a, 0x16, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f,
|
0x0a, 0x16, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f,
|
||||||
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x0d, 0x44, 0x42, 0x5f, 0x46,
|
0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x08, 0x44, 0x42, 0x46, 0x72,
|
||||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64,
|
0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66,
|
0x09, 0x52, 0x03, 0x75, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64,
|
||||||
0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09,
|
0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x66, 0x72, 0x69, 0x65, 0x6e,
|
||||||
0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70,
|
0x64, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x73,
|
||||||
0x6c, 0x79, 0x49, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70,
|
0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x49, 0x64, 0x73,
|
||||||
0x6c, 0x79, 0x49, 0x64, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64,
|
0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03,
|
||||||
0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64,
|
0x28, 0x09, 0x52, 0x08, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04,
|
||||||
0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -121,7 +120,7 @@ func file_friend_friend_db_proto_rawDescGZIP() []byte {
|
|||||||
|
|
||||||
var file_friend_friend_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_friend_friend_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_friend_friend_db_proto_goTypes = []interface{}{
|
var file_friend_friend_db_proto_goTypes = []interface{}{
|
||||||
(*DB_FriendData)(nil), // 0: DB_FriendData
|
(*DBFriend)(nil), // 0: DBFriend
|
||||||
}
|
}
|
||||||
var file_friend_friend_db_proto_depIdxs = []int32{
|
var file_friend_friend_db_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for method output_type
|
0, // [0:0] is the sub-list for method output_type
|
||||||
@ -138,7 +137,7 @@ func file_friend_friend_db_proto_init() {
|
|||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_friend_friend_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_friend_friend_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*DB_FriendData); i {
|
switch v := v.(*DBFriend); i {
|
||||||
case 0:
|
case 0:
|
||||||
return &v.state
|
return &v.state
|
||||||
case 1:
|
case 1:
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -430,7 +430,8 @@ type Hero_StrengthenUpStar_Req struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID
|
HeroObjID string `protobuf:"bytes,1,opt,name=heroObjID,proto3" json:"heroObjID"` // 英雄对象ID
|
||||||
Items []*CostCardData `protobuf:"bytes,2,rep,name=items,proto3" json:"items"` // 消耗卡牌对象ID
|
Hero []*CostCardData `protobuf:"bytes,2,rep,name=hero,proto3" json:"hero"` // 消耗卡牌对象ID
|
||||||
|
HeroRace []*CostCardData `protobuf:"bytes,3,rep,name=heroRace,proto3" json:"heroRace"` // 消耗种族卡牌对象ID
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Hero_StrengthenUpStar_Req) Reset() {
|
func (x *Hero_StrengthenUpStar_Req) Reset() {
|
||||||
@ -472,9 +473,16 @@ func (x *Hero_StrengthenUpStar_Req) GetHeroObjID() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Hero_StrengthenUpStar_Req) GetItems() []*CostCardData {
|
func (x *Hero_StrengthenUpStar_Req) GetHero() []*CostCardData {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Items
|
return x.Hero
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Hero_StrengthenUpStar_Req) GetHeroRace() []*CostCardData {
|
||||||
|
if x != nil {
|
||||||
|
return x.HeroRace
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -1111,74 +1119,77 @@ var file_hero_hero_msg_proto_rawDesc = []byte{
|
|||||||
0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x01,
|
0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62, 0x6a, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x4f, 0x62,
|
||||||
0x6a, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x6a, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x61, 0x0a, 0x19, 0x48, 0x65, 0x72,
|
0x05, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8d, 0x01, 0x0a, 0x19, 0x48, 0x65,
|
||||||
0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74,
|
0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53,
|
||||||
0x61, 0x72, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62,
|
0x74, 0x61, 0x72, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f,
|
||||||
0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f,
|
0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f,
|
||||||
0x62, 0x6a, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20,
|
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x24, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x02, 0x20,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72,
|
0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72,
|
||||||
0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x41, 0x0a, 0x1a,
|
0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x2c, 0x0a, 0x08, 0x68,
|
||||||
0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55,
|
0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
|
||||||
0x70, 0x53, 0x74, 0x61, 0x72, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65,
|
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52,
|
||||||
0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42,
|
0x08, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x61, 0x63, 0x65, 0x22, 0x41, 0x0a, 0x1a, 0x48, 0x65, 0x72,
|
||||||
0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22,
|
0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x74,
|
||||||
0x82, 0x01, 0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74,
|
0x61, 0x72, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18,
|
||||||
0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c,
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65,
|
||||||
0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x82, 0x01, 0x0a,
|
||||||
0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a,
|
0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e,
|
||||||
0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68,
|
||||||
0x52, 0x0a, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x05,
|
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62,
|
0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6b, 0x69,
|
||||||
0x2e, 0x43, 0x6f, 0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69,
|
0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73,
|
||||||
0x74, 0x65, 0x6d, 0x73, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72,
|
0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x05, 0x69, 0x74, 0x65,
|
||||||
0x65, 0x6e, 0x67, 0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52,
|
0x6d, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f,
|
||||||
0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x73, 0x74, 0x43, 0x61, 0x72, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d,
|
||||||
0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61,
|
0x73, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x53, 0x74, 0x72, 0x65, 0x6e, 0x67,
|
||||||
0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f,
|
0x74, 0x68, 0x65, 0x6e, 0x55, 0x70, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x5f, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a,
|
|
||||||
0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63,
|
|
||||||
0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
|
||||||
0x63, 0x6f, 0x73, 0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x48, 0x65,
|
|
||||||
0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70,
|
|
||||||
0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
|
0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
|
||||||
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52,
|
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52,
|
||||||
0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18,
|
0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x4f, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x2f, 0x0a,
|
0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65,
|
||||||
0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
|
|
||||||
0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61,
|
|
||||||
0x74, 0x61, 0x52, 0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x22, 0x36,
|
|
||||||
0x0a, 0x16, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52,
|
|
||||||
0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f,
|
|
||||||
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72,
|
|
||||||
0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x56, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47,
|
|
||||||
0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
|
||||||
0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61,
|
|
||||||
0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79,
|
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x72,
|
|
||||||
0x0a, 0x1a, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x55,
|
|
||||||
0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09,
|
|
||||||
0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
||||||
0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73,
|
|
||||||
0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75,
|
|
||||||
0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54,
|
|
||||||
0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79,
|
|
||||||
0x70, 0x65, 0x22, 0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d,
|
|
||||||
0x69, 0x6e, 0x67, 0x55, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x73,
|
|
||||||
0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
|
||||||
0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61,
|
|
||||||
0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x22, 0x5c, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a,
|
|
||||||
0x75, 0x65, 0x78, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65,
|
|
||||||
0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68,
|
0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68,
|
||||||
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74,
|
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74,
|
||||||
0x49, 0x74, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62,
|
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x73,
|
||||||
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49,
|
0x74, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x22, 0x82, 0x01, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x5f,
|
||||||
0x74, 0x6d, 0x65, 0x73, 0x22, 0x38, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65,
|
0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a,
|
||||||
0x78, 0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72,
|
0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62,
|
||||||
0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f,
|
0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65,
|
||||||
0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x06,
|
0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x2f, 0x0a, 0x0a, 0x75, 0x70,
|
||||||
|
0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
|
||||||
|
0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52,
|
||||||
|
0x0a, 0x75, 0x70, 0x53, 0x74, 0x61, 0x72, 0x43, 0x61, 0x72, 0x64, 0x22, 0x36, 0x0a, 0x16, 0x48,
|
||||||
|
0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65,
|
||||||
|
0x74, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a,
|
||||||
|
0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62,
|
||||||
|
0x6a, 0x49, 0x44, 0x22, 0x56, 0x0a, 0x17, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67,
|
||||||
|
0x6d, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23,
|
||||||
|
0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
|
||||||
|
0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68,
|
||||||
|
0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20,
|
||||||
|
0x01, 0x28, 0x05, 0x52, 0x06, 0x65, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x22, 0x72, 0x0a, 0x1a, 0x48,
|
||||||
|
0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x55, 0x73, 0x65, 0x45,
|
||||||
|
0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72,
|
||||||
|
0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65,
|
||||||
|
0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x45, 0x6e,
|
||||||
|
0x65, 0x72, 0x67, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x75, 0x73, 0x65, 0x45,
|
||||||
|
0x6e, 0x65, 0x72, 0x67, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||||
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x75, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22,
|
||||||
|
0x42, 0x0a, 0x1b, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x47, 0x6f, 0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67,
|
||||||
|
0x55, 0x73, 0x65, 0x45, 0x6e, 0x65, 0x72, 0x67, 0x79, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23,
|
||||||
|
0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70,
|
||||||
|
0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68,
|
||||||
|
0x65, 0x72, 0x6f, 0x22, 0x5c, 0x0a, 0x10, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65, 0x78,
|
||||||
|
0x69, 0x6e, 0x67, 0x5f, 0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f,
|
||||||
|
0x62, 0x6a, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f,
|
||||||
|
0x4f, 0x62, 0x6a, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x6d,
|
||||||
|
0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x62, 0x2e, 0x49, 0x74,
|
||||||
|
0x65, 0x6d, 0x44, 0x61, 0x74, 0x61, 0x52, 0x09, 0x63, 0x6f, 0x73, 0x74, 0x49, 0x74, 0x6d, 0x65,
|
||||||
|
0x73, 0x22, 0x38, 0x0a, 0x11, 0x48, 0x65, 0x72, 0x6f, 0x5f, 0x4a, 0x75, 0x65, 0x78, 0x69, 0x6e,
|
||||||
|
0x67, 0x5f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x42, 0x5f, 0x48, 0x65, 0x72,
|
||||||
|
0x6f, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||||
|
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1221,21 +1232,22 @@ var file_hero_hero_msg_proto_depIdxs = []int32{
|
|||||||
20, // 0: pb.Hero_Info_Rsp.base:type_name -> pb.DB_HeroData
|
20, // 0: pb.Hero_Info_Rsp.base:type_name -> pb.DB_HeroData
|
||||||
20, // 1: pb.Hero_List_Rsp.list:type_name -> pb.DB_HeroData
|
20, // 1: pb.Hero_List_Rsp.list:type_name -> pb.DB_HeroData
|
||||||
20, // 2: pb.Hero_StrengthenUplv_Resp.hero:type_name -> pb.DB_HeroData
|
20, // 2: pb.Hero_StrengthenUplv_Resp.hero:type_name -> pb.DB_HeroData
|
||||||
7, // 3: pb.Hero_StrengthenUpStar_Req.items:type_name -> pb.CostCardData
|
7, // 3: pb.Hero_StrengthenUpStar_Req.hero:type_name -> pb.CostCardData
|
||||||
20, // 4: pb.Hero_StrengthenUpStar_Resp.hero:type_name -> pb.DB_HeroData
|
7, // 4: pb.Hero_StrengthenUpStar_Req.heroRace:type_name -> pb.CostCardData
|
||||||
7, // 5: pb.Hero_StrengthenUpSkill_Req.items:type_name -> pb.CostCardData
|
20, // 5: pb.Hero_StrengthenUpStar_Resp.hero:type_name -> pb.DB_HeroData
|
||||||
20, // 6: pb.Hero_StrengthenUpSkill_Resp.hero:type_name -> pb.DB_HeroData
|
7, // 6: pb.Hero_StrengthenUpSkill_Req.items:type_name -> pb.CostCardData
|
||||||
20, // 7: pb.Hero_Gongming_Resp.hero:type_name -> pb.DB_HeroData
|
20, // 7: pb.Hero_StrengthenUpSkill_Resp.hero:type_name -> pb.DB_HeroData
|
||||||
20, // 8: pb.Hero_Gongming_Resp.upStarCard:type_name -> pb.DB_HeroData
|
20, // 8: pb.Hero_Gongming_Resp.hero:type_name -> pb.DB_HeroData
|
||||||
20, // 9: pb.Hero_GongmingReset_Resp.hero:type_name -> pb.DB_HeroData
|
20, // 9: pb.Hero_Gongming_Resp.upStarCard:type_name -> pb.DB_HeroData
|
||||||
20, // 10: pb.Hero_GongmingUseEnergy_Resp.hero:type_name -> pb.DB_HeroData
|
20, // 10: pb.Hero_GongmingReset_Resp.hero:type_name -> pb.DB_HeroData
|
||||||
4, // 11: pb.Hero_Juexing_Req.costItmes:type_name -> pb.ItemData
|
20, // 11: pb.Hero_GongmingUseEnergy_Resp.hero:type_name -> pb.DB_HeroData
|
||||||
20, // 12: pb.Hero_Juexing_Resp.hero:type_name -> pb.DB_HeroData
|
4, // 12: pb.Hero_Juexing_Req.costItmes:type_name -> pb.ItemData
|
||||||
13, // [13:13] is the sub-list for method output_type
|
20, // 13: pb.Hero_Juexing_Resp.hero:type_name -> pb.DB_HeroData
|
||||||
13, // [13:13] is the sub-list for method input_type
|
14, // [14:14] is the sub-list for method output_type
|
||||||
13, // [13:13] is the sub-list for extension type_name
|
14, // [14:14] is the sub-list for method input_type
|
||||||
13, // [13:13] is the sub-list for extension extendee
|
14, // [14:14] is the sub-list for extension type_name
|
||||||
0, // [0:13] is the sub-list for field type_name
|
14, // [14:14] is the sub-list for extension extendee
|
||||||
|
0, // [0:14] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_hero_hero_msg_proto_init() }
|
func init() { file_hero_hero_msg_proto_init() }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
option go_package = ".;pb";
|
option go_package = ".;pb";
|
||||||
|
|
||||||
message DB_FriendData {
|
message DBFriend {
|
||||||
string uId = 1; //@go_tags(`bson:"uId"`) 用户ID
|
string uId = 1; //@go_tags(`bson:"uId"`) 用户ID
|
||||||
repeated string friendIds = 2; //@go_tags(`bson:"friendIds"`) 好友ID
|
repeated string friendIds = 2; //@go_tags(`bson:"friendIds"`) 好友ID
|
||||||
repeated string applyIds = 3; //@go_tags(`bson:"applyIds"`) 申请用户ID
|
repeated string applyIds = 3; //@go_tags(`bson:"applyIds"`) 申请用户ID
|
||||||
|
@ -12,97 +12,97 @@ message FriendBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//好友列表
|
//好友列表
|
||||||
message Friend_List_Req {}
|
message FriendListReq {}
|
||||||
|
|
||||||
message Friend_List_Rsp { repeated FriendBase list = 1; }
|
message FriendListRsp { repeated FriendBase list = 1; }
|
||||||
|
|
||||||
//申请好友
|
//申请好友
|
||||||
message Friend_Apply_Req {
|
message FriendApplyReq {
|
||||||
string friendId = 1; //好友ID
|
string friendId = 1; //好友ID
|
||||||
}
|
}
|
||||||
message Friend_Apply_Rsp {
|
message FriendApplyRsp {
|
||||||
string userId = 1; //用户ID
|
string userId = 1; //用户ID
|
||||||
string friendId = 2; //好友ID
|
string friendId = 2; //好友ID
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除好友
|
//删除好友
|
||||||
message Friend_Del_Req {
|
message FriendDelReq {
|
||||||
string friendId = 1; //好友ID
|
string friendId = 1; //好友ID
|
||||||
}
|
}
|
||||||
|
|
||||||
message Friend_Del_Rsp {
|
message FriendDelRsp {
|
||||||
string friendId = 1; //好友ID
|
string friendId = 1; //好友ID
|
||||||
string userId = 2; //用户ID
|
string userId = 2; //用户ID
|
||||||
}
|
}
|
||||||
|
|
||||||
//同意
|
//同意
|
||||||
message Friend_Agree_Req {
|
message FriendAgreeReq {
|
||||||
repeated string friendIds = 1; //被同意的用户
|
repeated string friendIds = 1; //被同意的用户
|
||||||
}
|
}
|
||||||
message Friend_Agree_Rsp {
|
message FriendAgreeRsp {
|
||||||
int32 Num = 1; //操作的数量
|
int32 Num = 1; //操作的数量
|
||||||
}
|
}
|
||||||
|
|
||||||
//拒绝
|
//拒绝
|
||||||
message Friend_Refuse_Req {
|
message FriendRefuseReq {
|
||||||
repeated string friendIds = 1; //被拒绝的用户
|
repeated string friendIds = 1; //被拒绝的用户
|
||||||
}
|
}
|
||||||
message Friend_Refuse_Rsp {
|
message FriendRefuseRsp {
|
||||||
int32 Num = 1; //操作的数量
|
int32 Num = 1; //操作的数量
|
||||||
}
|
}
|
||||||
|
|
||||||
//好友申请列表
|
//好友申请列表
|
||||||
message Friend_ApplyList_Req {}
|
message FriendApplyListReq {}
|
||||||
message Friend_ApplyList_Rsp { repeated FriendBase list = 1; }
|
message FriendApplyListRsp { repeated FriendBase list = 1; }
|
||||||
|
|
||||||
//好友搜索
|
//好友搜索
|
||||||
message Friend_Search_Req {
|
message FriendSearchReq {
|
||||||
string nickName = 1; //好友昵称
|
string nickName = 1; //好友昵称
|
||||||
}
|
}
|
||||||
|
|
||||||
message Friend_Search_Rsp { FriendBase friend = 1; }
|
message FriendSearchRsp { FriendBase friend = 1; }
|
||||||
|
|
||||||
//黑名单
|
//黑名单
|
||||||
message Friend_BlackList_Req {}
|
message FriendBlackListReq {}
|
||||||
|
|
||||||
message Friend_BlackList_Rsp { repeated FriendBase friends = 1; }
|
message FriendBlackListRsp { repeated FriendBase friends = 1; }
|
||||||
|
|
||||||
//添加黑名单
|
//添加黑名单
|
||||||
message Friend_BlackAdd_Req { string friendId = 1; }
|
message FriendBlackAddReq { string friendId = 1; }
|
||||||
|
|
||||||
message Friend_BlackAdd_Rsp {
|
message FriendBlackAddRsp {
|
||||||
string friendId = 1;
|
string friendId = 1;
|
||||||
string userId = 2;
|
string userId = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//删除黑名单
|
//删除黑名单
|
||||||
message Friend_DelBlack_Req { string friendId = 1; }
|
message FriendDelBlackReq { string friendId = 1; }
|
||||||
|
|
||||||
message Friend_DelBlack_Rsp {
|
message FriendDelBlackRsp {
|
||||||
string friendId = 1;
|
string friendId = 1;
|
||||||
string userId = 2;
|
string userId = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//接收
|
//接收
|
||||||
message Friend_Receive_Req { string friendId = 1; }
|
message FriendReceiveReq { string friendId = 1; }
|
||||||
|
|
||||||
message Friend_Receive_Rsp {
|
message FriendReceiveRsp {
|
||||||
string friendId = 1;
|
string friendId = 1;
|
||||||
string userId = 2;
|
string userId = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//赠送
|
//赠送
|
||||||
message Friend_Give_Req { string friendId = 1; }
|
message FriendGiveReq { string friendId = 1; }
|
||||||
|
|
||||||
message Friend_Give_Rsp {
|
message FriendGiveRsp {
|
||||||
string friendId = 1;
|
string friendId = 1;
|
||||||
string userId = 2;
|
string userId = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
//好友数量
|
//好友数量
|
||||||
message Friend_Total_Req { string friendId = 1; }
|
message FriendTotalReq { string friendId = 1; }
|
||||||
|
|
||||||
message Friend_Total_Rsp {
|
message FriendTotalRsp {
|
||||||
string friendId = 1;
|
string friendId = 1;
|
||||||
int32 total = 2; //好友数量
|
int32 total = 2; //好友数量
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user