Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
41622f696e
@ -46,7 +46,7 @@ func (this *apiComp) DailyBuy(session comm.IUserSession, req *pb.PayDailyBuyReq)
|
||||
return
|
||||
}
|
||||
if info.Items[conf.Id] != nil {
|
||||
if info.Items[conf.Id].Buyunm <= 0 {
|
||||
if conf.BuyNum >= 0 && info.Items[conf.Id].Buyunm >= conf.BuyNum {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_PayBuyNumNotEnough,
|
||||
Title: pb.ErrorCode_PayBuyNumNotEnough.ToString(),
|
||||
|
@ -19,7 +19,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (errdat
|
||||
var (
|
||||
info *pb.DBPayDaily
|
||||
goods []*cfg.GamePayPackageData
|
||||
conf *cfg.GamePayPackageData
|
||||
// conf *cfg.GamePayPackageData
|
||||
err error
|
||||
)
|
||||
if errdata = this.InfoCheck(session, req); errdata != nil {
|
||||
@ -53,7 +53,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (errdat
|
||||
|
||||
for _, v := range info.Items {
|
||||
if configure.Now().Sub(time.Unix(v.Lastrefresh, 0)).Hours() > 24 {
|
||||
if conf, err = this.module.configure.getPayPackageData(v.Id); err != nil {
|
||||
if _, err = this.module.configure.getPayPackageData(v.Id); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
@ -61,7 +61,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PayInfoReq) (errdat
|
||||
}
|
||||
return
|
||||
}
|
||||
v.Buyunm = conf.BuyNum
|
||||
v.Buyunm = 0
|
||||
v.Lastrefresh = configure.Now().Unix()
|
||||
}
|
||||
}
|
||||
|
@ -184,13 +184,11 @@ func (this *configureComp) GetPlayerOverview(id string, sex int32) (configure *c
|
||||
key string
|
||||
ok bool
|
||||
)
|
||||
sex += 1
|
||||
key = fmt.Sprintf("%s%d", id, sex)
|
||||
if configure, ok = this._pInforoverview[key]; !ok {
|
||||
err = comm.NewNotFoundConfErr("用户模块", game_playerinfor_overview, key)
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
@ -453,14 +453,26 @@ func (this *Worldtask) AcceptCaravanTask(session comm.IUserSession, groupId int3
|
||||
mytask.CurrentTasks = make(map[int32]*pb.Worldtasks)
|
||||
}
|
||||
|
||||
if v, ok1 := mytask.CurrentTasks[curTaskConf.Group]; ok1 {
|
||||
v.TaskMap[task.TaskId] = &pb.Worldtask{
|
||||
if _, ok1 := mytask.CurrentTasks[curTaskConf.Group]; !ok1 {
|
||||
mytask.CurrentTasks[curTaskConf.Group] = &pb.Worldtasks{
|
||||
TaskMap: make(map[int32]*pb.Worldtask),
|
||||
}
|
||||
|
||||
}
|
||||
mytask.CurrentTasks[curTaskConf.Group].TaskMap[task.TaskId] = &pb.Worldtask{
|
||||
TaskId: task.TaskId,
|
||||
TaskType: curTaskConf.Des,
|
||||
NpcStatus: 1,
|
||||
}
|
||||
if err = this.ModuleBuried.ActiveCondition(uid, curTaskConf.Completetask...); err != nil {
|
||||
log.Errorf("调用接口错误:%s", err.Error())
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ExternalModule,
|
||||
Title: pb.ErrorCode_ExternalModule.String(),
|
||||
Message: fmt.Sprintf("ModuleBuried.ActiveCondition err:%s", err.Error()),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if task.Conds, err = this.ModuleBuried.CheckCondition(uid, curTaskConf.Completetask...); err != nil {
|
||||
log.Errorf("调用接口错误:%s", err.Error())
|
||||
errdata = &pb.ErrorData{
|
||||
|
Loading…
Reference in New Issue
Block a user