订单优化
This commit is contained in:
parent
6b1da9b2fb
commit
5ebb0daa01
@ -45,6 +45,7 @@ type LimitedTimeEventMod struct {
|
||||
LastOption []int
|
||||
BonusNum int
|
||||
First bool
|
||||
FirstReward bool
|
||||
}
|
||||
|
||||
type LTEInfo struct {
|
||||
@ -102,6 +103,9 @@ func (l *LimitedTimeEventMod) InitData(Lv int) {
|
||||
}
|
||||
l.LastOption = []int{EventId}
|
||||
}
|
||||
if !l.FirstReward {
|
||||
l.ProgressMax = 0
|
||||
}
|
||||
|
||||
if len(l.ProgressReward) == 0 {
|
||||
SelectNum := limitedTimeEventCfg.GetProgressSelectNum(Lv)
|
||||
@ -128,6 +132,9 @@ func (l *LimitedTimeEventMod) InitData(Lv int) {
|
||||
}
|
||||
|
||||
func (l *LimitedTimeEventMod) ZeroUpdate(Lv int) {
|
||||
if !l.FirstReward {
|
||||
return
|
||||
}
|
||||
l.Lv = Lv
|
||||
l.BonusNum = 0
|
||||
l.ProgressMax = limitedTimeEventCfg.GetProgressMax(Lv, l.BonusNum)
|
||||
@ -371,6 +378,7 @@ func (l *LimitedTimeEventMod) SelectProgressReward(Id, Lv int) ([]*item.Item, ma
|
||||
}
|
||||
}
|
||||
l.LastOption = r
|
||||
l.FirstReward = true
|
||||
return Item, r1, r2, nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user