检查是否是新获得的英雄
This commit is contained in:
parent
b94962d80c
commit
bf35dce1b2
@ -119,6 +119,8 @@ type (
|
||||
CrossSearchUser(nickname string) ([]*pb.DBUser, error)
|
||||
// 搜索远程用户
|
||||
SearchRmoteUser(nickname string) ([]*pb.DBUser, error)
|
||||
// 检查是不是新获得的英雄
|
||||
CheckTujianHero(session IUserSession, heros []string) []bool
|
||||
}
|
||||
//武器模块
|
||||
IEquipment interface {
|
||||
|
@ -562,3 +562,17 @@ func (this *User) RpcGetCrossUserSession(ctx context.Context, req *pb.UIdReq, re
|
||||
func (this *User) RpcQueryUser(ctx context.Context, req *pb.NameReq, reply *pb.UserDataListResp) error {
|
||||
return this.queryUserFromRemoteDb(req.Name, reply)
|
||||
}
|
||||
func (this *User) CheckTujianHero(session comm.IUserSession, heros []string) []bool {
|
||||
sz := make([]bool, len(heros))
|
||||
|
||||
userEx, err := this.GetUserExpand(session.GetUserId())
|
||||
if err != nil {
|
||||
return sz
|
||||
}
|
||||
for i, heroid := range heros {
|
||||
if _, ok := userEx.Tujian[heroid]; ok {
|
||||
sz[i] = true
|
||||
}
|
||||
}
|
||||
return sz
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user