Commit 5eedb1199fd527535e9e9258de4a477f12dcc9b1

Authored by 测试
1 parent cf9eda88

战令每周积分判空

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
src/models/Activity.lua
@@ -1044,10 +1044,10 @@ activityFunc[Activity.ActivityType.BattleCommand] = { @@ -1044,10 +1044,10 @@ activityFunc[Activity.ActivityType.BattleCommand] = {
1044 local arr = actCfg.condition2:toArray(true, "=") 1044 local arr = actCfg.condition2:toArray(true, "=")
1045 local itemId, limit = arr[1], arr[2] 1045 local itemId, limit = arr[1], arr[2]
1046 if itemId == id and count > 0 then 1046 if itemId == id and count > 0 then
1047 - if actData["week"] >= limit then 1047 + if (actData["week"] or 0) >= limit then
1048 return 1048 return
1049 end 1049 end
1050 - actData["week"] = actData["week"] + count 1050 + actData["week"] = (actData["week"] or 0) + count
1051 local total = actData["sum"] + count 1051 local total = actData["sum"] + count
1052 local curLvl = actData["lvl"] or 0 1052 local curLvl = actData["lvl"] or 0
1053 if actCfg.condition == 1 then -- 代表sum需要转换为等级 1053 if actCfg.condition == 1 then -- 代表sum需要转换为等级