购买挑战卷配置
This commit is contained in:
parent
3de993de65
commit
53b2cca605
@ -497,8 +497,16 @@ func (this *ModelItemsComp) buyTicket(session comm.IUserSession, buy int32) (inf
|
|||||||
if code = this.module.ConsumeRes(session, needs, true); code != pb.ErrorCode_Success {
|
if code = this.module.ConsumeRes(session, needs, true); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
atn := this.module.configure.GetGlobalConf().CopsBuyGet
|
||||||
|
|
||||||
|
res := &cfg.Gameatn{
|
||||||
|
A: atn.A,
|
||||||
|
T: atn.T,
|
||||||
|
N: atn.N * buy,
|
||||||
|
}
|
||||||
info.Buyunifiedticket += buy
|
info.Buyunifiedticket += buy
|
||||||
if code = this.module.DispenseRes(session, []*cfg.Gameatn{{A: comm.ItemType, T: comm.UnifiedTicket, N: buy}}, true); code != pb.ErrorCode_Success {
|
if code = this.module.DispenseRes(session, []*cfg.Gameatn{res}, true); code != pb.ErrorCode_Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
|
this.module.ModuleUser.ChangeUserExpand(session.GetUserId(), map[string]interface{}{
|
||||||
|
Loading…
Reference in New Issue
Block a user