Просмотр исходного кода

1.处理荣宝进程宝箱无法领取问题 2.屏蔽调试打印

gitxsm 5 месяцев назад
Родитель
Сommit
4539c51fa3
2 измененных файлов с 22 добавлено и 2 удалено
  1. 20 0
      script/module/dailyTask/HonorJourney.lua
  2. 2 2
      script/module/scene/Handler.lua

+ 20 - 0
script/module/dailyTask/HonorJourney.lua

@@ -105,6 +105,26 @@ local function HonorJourneyTask_GetTaskDB(human)
         HonorJourneyTask_CreateDB(human)
     end
 
+    local tTaskPointPrize = human.db.HonorJourney and human.db.HonorJourney.TaskPointPrize
+
+    if tTaskPointPrize and #tTaskPointPrize < #HonorJourneyExcel.Reward then
+        -- local nNowPoint = HonorJourney_GetTaskPoint(human)
+        local nNowPoint = human.db.HonorJourney and human.db.HonorJourney.nPoint or 0
+
+        for i=#tTaskPointPrize+1, #HonorJourneyExcel.Reward do
+            if not tTaskPointPrize[i] then
+                tTaskPointPrize[i] = CommonDefine.COMMON_PRIZE_STATE_NOGET
+                local boxCfg = HonorJourneyExcel.Reward[i]
+                if boxCfg and nNowPoint >= boxCfg.needcnt then
+                    tTaskPointPrize[i] = CommonDefine.COMMON_PRIZE_STATE_CANGET
+                end
+            else
+                print("[HonorJourneyTask_CreateDB] 配置了重复的奖励ID nID = "..i)
+            end
+        end
+    end
+
+
     return human.db.HonorJourney
 end
 

+ 2 - 2
script/module/scene/Handler.lua

@@ -40,14 +40,14 @@ end
 
 --在线玩家列表不再从 ObjHuman.onlineAccount 获取, 改为从 ObjHuman.onlineNewUniqueTag 获取
 function CG_TEST_PROTO(fd,msg)
-	print("============ CG_TEST_PROTO============", msg.param)
+	-- print("============ CG_TEST_PROTO============", msg.param)
 	local param = Json.Decode(msg.param)
 	local uTag
 	if param.type == "UseCDKV2" or param.type == "UseCDK" or param.type == "UseFixCDK" then
 		uTag = RoleDBLogic.Generateuuid(param.channel_id, msg.account, msg.serverTag)
 	end
 
-	Util.printTable(param)
+	-- Util.printTable(param)
 
 	if param.type == "UseCDKV2" then
 		-- local human = ObjHuman.onlineAccount[msg.account]