上传宝箱代码
This commit is contained in:
parent
e26f48d2c8
commit
d98d6faf95
@ -762,17 +762,15 @@ func (this *ModelItemsComp) useitem(session comm.IUserSession, gid string, amoun
|
||||
Message: fmt.Sprintf("掉落组未找到:%d", itemcf.BoxId),
|
||||
}
|
||||
return
|
||||
} else {
|
||||
if errdata = this.module.AddItemforGrid(session, gid, -1*int32(amount), true); errdata != nil {
|
||||
return
|
||||
}
|
||||
if errdata = this.module.DispenseRes(session, prop, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
sale := make([]*cfg.Gameatn, 0)
|
||||
for i := int32(0); i < amount; i++ {
|
||||
sale = append(sale, RandomProps(prop).Prize...)
|
||||
}
|
||||
if errdata = this.module.AddItemforGrid(session, gid, -1*int32(amount), true); errdata != nil {
|
||||
return
|
||||
}
|
||||
if errdata = this.module.DispenseRes(session, sale, true); errdata != nil {
|
||||
return
|
||||
}
|
||||
|
||||
case itemuse_staminapotion: //体力药剂使用
|
||||
if itemcf.DecomposeGet == nil || len(itemcf.DecomposeGet) == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
|
Loading…
Reference in New Issue
Block a user