Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
7c3d3c4a2a
@ -86,15 +86,6 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
||||
update["avatar"] = globalConf.GirlHeadPortrait
|
||||
}
|
||||
|
||||
//初始化创角资源
|
||||
if val, err := this.module.configure.GetGlobalInitConf(); err == nil {
|
||||
for _, v := range val.GetDataList() {
|
||||
res = append(res, v.Var...)
|
||||
}
|
||||
if errdata, award = this.module.DispenseAtno(session, res, true); errdata != nil {
|
||||
this.module.Error("发放资源失败!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: errdata.String()})
|
||||
}
|
||||
}
|
||||
if err := this.module.modelUser.Change(session.GetUserId(), update); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
@ -107,6 +98,16 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (e
|
||||
)
|
||||
return
|
||||
}
|
||||
//初始化创角资源
|
||||
if val, err := this.module.configure.GetGlobalInitConf(); err == nil {
|
||||
for _, v := range val.GetDataList() {
|
||||
res = append(res, v.Var...)
|
||||
}
|
||||
if errdata, award = this.module.DispenseAtno(session, res, true); errdata != nil {
|
||||
this.module.Error("发放资源失败!", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "err", Value: errdata.String()})
|
||||
}
|
||||
}
|
||||
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype72, 1))
|
||||
session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{
|
||||
NickName: req.NickName,
|
||||
|
@ -24,6 +24,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WTaskFinishReq) (
|
||||
completesMap map[int32]struct{} = make(map[int32]struct{})
|
||||
err error
|
||||
isfinsh bool
|
||||
tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0)
|
||||
ok bool
|
||||
)
|
||||
if errdata = this.FinishCheck(session, req); errdata != nil {
|
||||
@ -131,6 +132,10 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WTaskFinishReq) (
|
||||
wtask.Completes = append(wtask.Completes, req.Tid)
|
||||
}
|
||||
|
||||
if conf.Des == 1 {
|
||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype240, 1))
|
||||
}
|
||||
|
||||
if conf.Des == 1 && conf.IdAfter != 0 { //日常任务 自动接取下一个
|
||||
wtask.Activations = append(wtask.Activations, conf.IdAfter)
|
||||
session.SendMsg(string(this.module.GetType()), "activationschange", &pb.WTaskActivationsChangePush{Activations: wtask.Activations})
|
||||
@ -154,6 +159,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WTaskFinishReq) (
|
||||
this.module.ModuleSys.CheckOpenCond(session.Clone(), comm.OpencondTypeWorldtaskid, req.Tid)
|
||||
this.module.WriteUserLog(session.GetUserId(), comm.GMResAddType, "WTaskFinishReq", award)
|
||||
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "WTaskFinishReq", conf.TaskendRemoveitem)
|
||||
this.module.ModuleBuried.TriggerBuried(session, tasks...)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user