上传引导代码
This commit is contained in:
parent
88b95dfef3
commit
73ba1522c3
@ -20,7 +20,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.GuidanceInfoReq) (e
|
||||
gourmet *pb.DBGuidance
|
||||
err error
|
||||
)
|
||||
if gourmet, err = this.module.modelGuidance.getUserGourmet(session.GetUserId()); err == nil {
|
||||
if gourmet, err = this.module.modelGuidance.getUserGourmet(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
|
@ -20,7 +20,7 @@ func (this *apiComp) Begin(session comm.IUserSession, req *pb.GuidanceBeginReq)
|
||||
gourmet *pb.DBGuidance
|
||||
err error
|
||||
)
|
||||
if gourmet, err = this.module.modelGuidance.getUserGourmet(session.GetUserId()); err == nil {
|
||||
if gourmet, err = this.module.modelGuidance.getUserGourmet(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
|
@ -3,9 +3,11 @@ package passon
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go_dreamfactory/lego/base"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
)
|
||||
|
||||
/*
|
||||
@ -46,3 +48,25 @@ func (this *Passon) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
return
|
||||
}
|
||||
|
||||
// 英雄升级
|
||||
func (this *Passon) HeroUpLv(session comm.IUserSession, heroid string, lv int32) {
|
||||
var (
|
||||
passon *pb.DBPasson
|
||||
err error
|
||||
)
|
||||
if passon, err = this.modelPasson.getUserPasson(session.GetUserId()); err != nil {
|
||||
this.Error("getUserPasson err", log.Field{Key: "err", Value: err.Error()})
|
||||
return
|
||||
}
|
||||
if lv <= passon.Passonlv {
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range passon.Teacher {
|
||||
if v == heroid {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user