Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
76e1b4cc06
@ -65,6 +65,18 @@ func (this *apiComp) TaskReceive(session comm.IUserSession, req *pb.ArenaTaskRec
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if err = this.module.modelArena.Change(session.GetUserId(), map[string]interface{}{
|
||||
"tasks": info.Tasks,
|
||||
}); err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_DBError,
|
||||
Title: pb.ErrorCode_DBError.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "taskreceive", &pb.ArenaTaskReceiveResp{Tid: req.Tid, Award: atno})
|
||||
return
|
||||
}
|
||||
|
@ -781,6 +781,10 @@ func (this *User) change(session comm.IUserSession, attrs map[string]int32) (atn
|
||||
change.Consumemoney += add
|
||||
default:
|
||||
err = errors.New(fmt.Sprintf("%s no supported", attr))
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
}
|
||||
atno = append(atno, temp)
|
||||
|
Loading…
Reference in New Issue
Block a user