竞技场最大上限特权处理
This commit is contained in:
parent
64da2e66c7
commit
31c754c27c
@ -844,15 +844,16 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
PrivilegeType1 = iota + 1 //每日获得
|
PrivilegeType1 = iota + 1 //每日获得
|
||||||
PrivilegeType2 //金币商店每日免费刷新次数
|
PrivilegeType2 //金币商店每日免费刷新次数
|
||||||
PrivilegeType3 //维京远征每日可购买挑战次数
|
PrivilegeType3 //维京远征每日可购买挑战次数
|
||||||
PrivilegeType4 //狩猎每日可购买挑战次数
|
PrivilegeType4 //狩猎每日可购买挑战次数
|
||||||
PrivilegeType5 //竞技场每日可购买挑战次数
|
PrivilegeType5 //竞技场每日可购买挑战次数
|
||||||
PrivilegeType6 //梦境每日可购买挑战次数
|
PrivilegeType6 //梦境每日可购买挑战次数
|
||||||
PrivilegeType7 //巨怪商队背包容量
|
PrivilegeType7 //巨怪商队背包容量
|
||||||
PrivilegeType8 //美食馆每日最大制作时间
|
PrivilegeType8 //美食馆每日最大制作时间
|
||||||
PrivilegeType9 //武馆每日最大练功时间
|
PrivilegeType9 //武馆每日最大练功时间
|
||||||
|
PrivilegeType10 //竞技场门票存储上限
|
||||||
|
|
||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
|
@ -426,8 +426,11 @@ func (this *modelArena) recoverTicket(session comm.IUserSession, info *pb.DBAren
|
|||||||
}
|
}
|
||||||
|
|
||||||
global := this.module.ModuleTools.GetGlobalConf()
|
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))
|
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))
|
duration = configure.Now().Sub(time.Unix(info.Lastrtickettime, 0))
|
||||||
ticketNum = int32(math.Floor(duration.Minutes() / float64(global.ArenaTicketRecoveryTime)))
|
ticketNum = int32(math.Floor(duration.Minutes() / float64(global.ArenaTicketRecoveryTime)))
|
||||||
if ticketNum > 0 {
|
if ticketNum > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user