bug修复
This commit is contained in:
parent
8dbefbe3d9
commit
37bb6f8a70
@ -279,6 +279,9 @@ func (l *LimitedTimeEventMod) GetSceneDashReward() (int, []*item.Item, error) {
|
||||
if !ok {
|
||||
return 0, nil, fmt.Errorf("sence dash not active")
|
||||
}
|
||||
if limitInfo.Info == nil {
|
||||
return 0, nil, fmt.Errorf("sence dash info error")
|
||||
}
|
||||
times := GoUtil.Int(limitInfo.Info["Times"])
|
||||
if times <= 0 {
|
||||
return 0, nil, fmt.Errorf("no dash times")
|
||||
@ -555,9 +558,13 @@ func (l *LimitedTimeEventMod) GetCatDaySaleEndTime() int64 {
|
||||
}
|
||||
|
||||
func (l *LimitedTimeEventMod) AddSenceDashTimes() bool {
|
||||
if _, ok := l.EventList[EVENT_TYPE_SENCE_DASH]; !ok {
|
||||
SenceInfo, ok := l.EventList[EVENT_TYPE_SENCE_DASH]
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
l.EventList[EVENT_TYPE_SENCE_DASH].Info["Times"] = GoUtil.Int(l.EventList[EVENT_TYPE_SENCE_DASH].Info["Times"]) + 1
|
||||
if SenceInfo.Info == nil {
|
||||
return false
|
||||
}
|
||||
SenceInfo.Info["Times"] = GoUtil.Int(SenceInfo.Info["Times"]) + 1
|
||||
return true
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user