Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
0d4cafb55f
@ -416,8 +416,6 @@ type (
|
||||
BingoJumpTask(session IUserSession, groupId, rtaskId int32) error
|
||||
// 通过任务ID bingo
|
||||
JumpTaskByTaskId(session IUserSession, rtaskId int32) error
|
||||
// 查询我的世界任务
|
||||
GetMyWorldtask(uid string) *pb.DBWorldtask
|
||||
//接取商队任务 //接口废弃
|
||||
AcceptCaravanTask(session IUserSession, groupId int32) (task *pb.Worldtask, errdata *pb.ErrorData)
|
||||
//更新接取任务
|
||||
|
@ -120,18 +120,27 @@ func (this *ModelDragon) CreateDragon(session comm.IUserSession, dragons map[str
|
||||
dragon.Property["csubtime"] = c.Csubtime
|
||||
}
|
||||
}
|
||||
if !bNewDragon {
|
||||
continue
|
||||
}
|
||||
|
||||
for k := range this.module.configure.GetDragonAttributeConf() {
|
||||
dragon.Lvitem[k] = 1
|
||||
}
|
||||
|
||||
if bNewDragon {
|
||||
if dbModel != nil {
|
||||
err = dbModel.AddList(uid, dragon.Id, dragon)
|
||||
} else {
|
||||
err = this.AddList(uid, dragon.Id, dragon)
|
||||
}
|
||||
} else {
|
||||
update := make(map[string]interface{}, 0)
|
||||
update["property"] = dragon.Property
|
||||
if dbModel != nil {
|
||||
err = dbModel.ChangeList(uid, dragon.Id, update)
|
||||
} else {
|
||||
err = this.ChangeList(uid, dragon.Id, update)
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
|
@ -3,6 +3,7 @@ package pagoda
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
@ -20,13 +21,23 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewar
|
||||
|
||||
var (
|
||||
atno []*pb.UserAtno
|
||||
pagoda *pb.DBPagoda
|
||||
err error
|
||||
_cfg *cfg.GamePagodaTaskRewardData
|
||||
)
|
||||
if errdata = this.GetRewardCheck(session, req); errdata != nil {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
if pagoda, err := this.module.modelPagoda.getPagodaList(session.GetUserId()); err != nil {
|
||||
_cfg, err := this.module.configure.GetPagodaRewardconfig(req.Id)
|
||||
if pagoda, err = this.module.modelPagoda.getPagodaList(session.GetUserId()); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
_cfg, err = this.module.configure.GetPagodaRewardconfig(req.Id)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
@ -70,6 +81,6 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewar
|
||||
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
|
||||
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "PagodaGetRewardReq", atno)
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user