diff --git a/comm/const.go b/comm/const.go index 59804c587..2a3a5d470 100644 --- a/comm/const.go +++ b/comm/const.go @@ -844,15 +844,16 @@ const ( ) const ( - PrivilegeType1 = iota + 1 //每日获得 - PrivilegeType2 //金币商店每日免费刷新次数 - PrivilegeType3 //维京远征每日可购买挑战次数 - PrivilegeType4 //狩猎每日可购买挑战次数 - PrivilegeType5 //竞技场每日可购买挑战次数 - PrivilegeType6 //梦境每日可购买挑战次数 - PrivilegeType7 //巨怪商队背包容量 - PrivilegeType8 //美食馆每日最大制作时间 - PrivilegeType9 //武馆每日最大练功时间 + PrivilegeType1 = iota + 1 //每日获得 + PrivilegeType2 //金币商店每日免费刷新次数 + PrivilegeType3 //维京远征每日可购买挑战次数 + PrivilegeType4 //狩猎每日可购买挑战次数 + PrivilegeType5 //竞技场每日可购买挑战次数 + PrivilegeType6 //梦境每日可购买挑战次数 + PrivilegeType7 //巨怪商队背包容量 + PrivilegeType8 //美食馆每日最大制作时间 + PrivilegeType9 //武馆每日最大练功时间 + PrivilegeType10 //竞技场门票存储上限 ) const ( diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index c891c1956..e54363a8f 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -426,8 +426,11 @@ func (this *modelArena) recoverTicket(session comm.IUserSession, info *pb.DBAren } global := this.module.ModuleTools.GetGlobalConf() + maxTick := global.ArenaTicketMax + // 竞技场最大上限 + maxTick += this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType10) // 特权 ticket = int32(this.module.ModuleItems.QueryItemAmount(info.Uid, ticketitem.T)) - if ticket < global.ArenaTicketMax && info.Lastrtickettime > 0 { + if ticket < maxTick && info.Lastrtickettime > 0 { duration = configure.Now().Sub(time.Unix(info.Lastrtickettime, 0)) ticketNum = int32(math.Floor(duration.Minutes() / float64(global.ArenaTicketRecoveryTime))) if ticketNum > 0 {