GM 创建坐骑的时候对已经有的坐骑做属性更新操作
This commit is contained in:
parent
a37a48011e
commit
6343b80000
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user