Explorar el Código

屏蔽调试日志

gitxsm hace 4 meses
padre
commit
9427b4d781

+ 1 - 1
script/core/InnerMsg.lua

@@ -60,7 +60,7 @@ end
 
 function readMsg(id, msg)
     if not msg then
-        Log.write(Log.LOGID_DEBUG, "[readMsg] msg参数为nil, id="..(id or "nil"))
+        -- Log.write(Log.LOGID_DEBUG, "[readMsg] msg参数为nil, id="..(id or "nil"))
         return
     end
     local template = proto_template[id]

+ 4 - 4
script/core/Monitor.lua

@@ -42,12 +42,12 @@ function handlePacket(human, container, protoId)
 	end
 	
 	-- 调试日志:检查 CG_DRILL_ONE_CLICK_SAODANG 协议
-	if protoId == 1748 or Msg.proto_name[protoId] == "CG_DRILL_ONE_CLICK_SAODANG" then
-		Log.write(Log.LOGID_DEBUG, "[Monitor.handlePacket] 收到 CG_DRILL_ONE_CLICK_SAODANG 协议, protoId="..protoId..", handler存在="..tostring(Msg.proto_handler[protoId] ~= nil))
-	end
+	-- if protoId == 1748 or Msg.proto_name[protoId] == "CG_DRILL_ONE_CLICK_SAODANG" then
+	-- 	Log.write(Log.LOGID_DEBUG, "[Monitor.handlePacket] 收到 CG_DRILL_ONE_CLICK_SAODANG 协议, protoId="..protoId..", handler存在="..tostring(Msg.proto_handler[protoId] ~= nil))
+	-- end
 	
 	if not Msg.proto_handler[protoId] then
-		Log.write(Log.LOGID_DEBUG, "[Monitor.handlePacket] WARNING: protoId="..protoId.." 没有对应的handler, protoName="..tostring(Msg.proto_name[protoId]))
+		-- Log.write(Log.LOGID_DEBUG, "[Monitor.handlePacket] WARNING: protoId="..protoId.." 没有对应的handler, protoName="..tostring(Msg.proto_name[protoId]))
 		return
 	end
 	

+ 11 - 11
script/module/absAct/AbsActLogic.lua

@@ -163,36 +163,36 @@ function isStarted(human, id)
 	end
 
     local nNowOpenDay = CommonDB.getServerOpenDay()
-    Log.write(Log.LOGID_DEBUG, "[isStarted] 开服天数检查 - 活动ID: "..tostring(id)..", 当前开服天数: "..tostring(nNowOpenDay)..", 需要开服天数: "..tostring(config.openDay))
+    -- Log.write(Log.LOGID_DEBUG, "[isStarted] 开服天数检查 - 活动ID: "..tostring(id)..", 当前开服天数: "..tostring(nNowOpenDay)..", 需要开服天数: "..tostring(config.openDay))
     
     if nNowOpenDay < config.openDay then
-        Log.write(Log.LOGID_DEBUG, "[isStarted] 开服天数不足 - 活动ID: "..tostring(id)..", 当前: "..tostring(nNowOpenDay)..", 需要: "..tostring(config.openDay))
+        -- Log.write(Log.LOGID_DEBUG, "[isStarted] 开服天数不足 - 活动ID: "..tostring(id)..", 当前: "..tostring(nNowOpenDay)..", 需要: "..tostring(config.openDay))
         return
     end
 
     local _,realEndTime,realStartTime = transTime(config)
 	local now = os.time()
-	Log.write(Log.LOGID_DEBUG, "[isStarted] 时间检查 - 活动ID: "..tostring(id)..", 当前时间: "..tostring(now)..", 开始时间: "..tostring(realStartTime)..", 结束时间: "..tostring(realEndTime))
+	-- Log.write(Log.LOGID_DEBUG, "[isStarted] 时间检查 - 活动ID: "..tostring(id)..", 当前时间: "..tostring(now)..", 开始时间: "..tostring(realStartTime)..", 结束时间: "..tostring(realEndTime))
 	
     if 0 == realEndTime or 0 == realStartTime then
-        Log.write(Log.LOGID_DEBUG, "[isStarted] 时间为0,检查循环活动 - 活动ID: "..tostring(id))
+        -- Log.write(Log.LOGID_DEBUG, "[isStarted] 时间为0,检查循环活动 - 活动ID: "..tostring(id))
        local nState, nEndTime, nBeginTime = CycleActivityLogic.isStarted(human, id)
-       Log.write(Log.LOGID_DEBUG, "[isStarted] 循环活动检查结果 - 活动ID: "..tostring(id)..", 状态: "..tostring(nState)..", 开始: "..tostring(nBeginTime)..", 结束: "..tostring(nEndTime))
+    --    Log.write(Log.LOGID_DEBUG, "[isStarted] 循环活动检查结果 - 活动ID: "..tostring(id)..", 状态: "..tostring(nState)..", 开始: "..tostring(nBeginTime)..", 结束: "..tostring(nEndTime))
        
        if true == nState and 0 < nBeginTime and 0 < nEndTime then
-            Log.write(Log.LOGID_DEBUG, "[isStarted] 循环活动判断通过 - 活动ID: "..tostring(id))
+            -- Log.write(Log.LOGID_DEBUG, "[isStarted] 循环活动判断通过 - 活动ID: "..tostring(id))
             return nState, nEndTime, nBeginTime
        else
-            Log.write(Log.LOGID_DEBUG, "[isStarted] 循环活动判断失败 - 活动ID: "..tostring(id))
+            -- Log.write(Log.LOGID_DEBUG, "[isStarted] 循环活动判断失败 - 活动ID: "..tostring(id))
        end
     end
 
     if now < realStartTime or now >= realEndTime then
-		Log.write(Log.LOGID_DEBUG, "[isStarted] 不在活动时间内 - 活动ID: "..tostring(id)..", 当前: "..tostring(now)..", 开始: "..tostring(realStartTime)..", 结束: "..tostring(realEndTime))
+		--Log.write(Log.LOGID_DEBUG, "[isStarted] 不在活动时间内 - 活动ID: "..tostring(id)..", 当前: "..tostring(now)..", 开始: "..tostring(realStartTime)..", 结束: "..tostring(realEndTime))
 		return
     end
     
-    Log.write(Log.LOGID_DEBUG, "[isStarted] 活动开启判断通过 - 活动ID: "..tostring(id))
+    --Log.write(Log.LOGID_DEBUG, "[isStarted] 活动开启判断通过 - 活动ID: "..tostring(id))
     return true, realEndTime, realStartTime
 end
 
@@ -285,7 +285,7 @@ function actDetailQuery(human, id)
     
     local config = AbsActExcel.absActivity[id]
     if config == nil then
-        Log.write(Log.LOGID_DEBUG, "[actDetailQuery] 配置不存在 - 玩家: "..tostring(human.db.name)..", 活动ID: "..tostring(id))
+        --Log.write(Log.LOGID_DEBUG, "[actDetailQuery] 配置不存在 - 玩家: "..tostring(human.db.name)..", 活动ID: "..tostring(id))
         return
     end
     
@@ -316,7 +316,7 @@ function actDetailQuery(human, id)
             human.db.absAct[id].finish = realEndTime
         end
     else
-        Log.write(Log.LOGID_DEBUG, "[actDetailQuery] 活动数据已存在 - 玩家: "..tostring(human.db.name)..", 活动ID: "..tostring(id))
+        --Log.write(Log.LOGID_DEBUG, "[actDetailQuery] 活动数据已存在 - 玩家: "..tostring(human.db.name)..", 活动ID: "..tostring(id))
     end
 
     if config.type == AbsActDefine.ABS_ACT_TYPE_1 then-- 超值礼包

+ 3 - 3
script/module/absAct/DrumBlastingLogic.lua

@@ -71,7 +71,7 @@ function getAndSendMsg(human,id,actID)
 
     local absAct = human.db.absAct[id]
     if not absAct then
-        Log.write(Log.LOGID_DEBUG, "[DrumBlastingLogic.getAndSendMsg] 活动数据不存在,创建空数据 - 活动ID: "..tostring(id))
+        -- Log.write(Log.LOGID_DEBUG, "[DrumBlastingLogic.getAndSendMsg] 活动数据不存在,创建空数据 - 活动ID: "..tostring(id))
         human.db.absAct[id] = {}
         human.db.absAct[id].finish = endTime
         absAct = human.db.absAct[id]
@@ -79,13 +79,13 @@ function getAndSendMsg(human,id,actID)
     
     -- 检查并重置损坏/过期的数据
     if absAct and not absAct.drum then
-        Log.write(Log.LOGID_DEBUG, "[DrumBlastingLogic.getAndSendMsg] 检测到数据不完整,重新初始化 - 活动ID: "..tostring(id))
+        -- Log.write(Log.LOGID_DEBUG, "[DrumBlastingLogic.getAndSendMsg] 检测到数据不完整,重新初始化 - 活动ID: "..tostring(id))
         human.db.absAct[id] = {}
         human.db.absAct[id].finish = endTime
         absAct = human.db.absAct[id]
     end
     
-    Log.write(Log.LOGID_DEBUG, "[DrumBlastingLogic.getAndSendMsg] 初始化数据 - 玩家: "..tostring(human.db.name)..", 活动ID: "..tostring(id))
+    -- Log.write(Log.LOGID_DEBUG, "[DrumBlastingLogic.getAndSendMsg] 初始化数据 - 玩家: "..tostring(human.db.name)..", 活动ID: "..tostring(id))
     initDB(human,id)
     
     local nowDay = Util.diffDay(starTime) + 1

+ 4 - 4
script/module/absAct/Handler.lua

@@ -52,15 +52,15 @@ local CommonActCharge = require("absAct.CommonActCharge")
 local CommonActFindTreasure = require("absAct.CommonActFindTreasure")
 
 function CG_ABS_ACT_DETAIL_QUERY(human, msg)
-    local Log = require("common.Log")
+    -- local Log = require("common.Log")
 
     local success, err = pcall(function()
         AbsActLogic.actDetailQuery(human,msg.id)
     end)
     
-    if not success then
-        Log.write(Log.LOGID_DEBUG, "[CG_ABS_ACT_DETAIL_QUERY] 执行失败 - 玩家: "..tostring(human.db and human.db.name or "nil")..", 活动ID: "..tostring(msg.id)..", 错误: "..tostring(err))
-    end
+    -- if not success then
+    --     Log.write(Log.LOGID_DEBUG, "[CG_ABS_ACT_DETAIL_QUERY] 执行失败 - 玩家: "..tostring(human.db and human.db.name or "nil")..", 活动ID: "..tostring(msg.id)..", 错误: "..tostring(err))
+    -- end
 end
 
 -- 盲盒成就 查询

+ 1 - 1
script/module/chat/Handler.lua

@@ -57,7 +57,7 @@ function chatReport(human, content)
     s2aParam.ip = human.db.ip
     
 	_G.thread_http.send(Define.CHAT_REPORT,Json.Encode(s2aParam))
-    Log.write(Log.LOGID_DEBUG, "chatReportSuccrss"..Define.CHAT_REPORT) 
+    -- Log.write(Log.LOGID_DEBUG, "chatReportSuccrss"..Define.CHAT_REPORT) 
 end
 
 function CG_CHAT_REPORT(human, msg)

+ 37 - 37
script/module/drill/DrillLogic.lua

@@ -466,13 +466,13 @@ function queryDrillId(human, drillData, openPanel)
 	-- 1. drillId (byte类型,范围0-255,防止溢出)
 	local drillIdValue = drillData.drillId or 1
 	if drillIdValue > 255 or drillIdValue < 0 then
-		Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: drillId溢出,原始值="..drillIdValue..",限制后="..math.min(math.max(drillIdValue, 0), 255))
+		--Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: drillId溢出,原始值="..drillIdValue..",限制后="..math.min(math.max(drillIdValue, 0), 255))
 	end
 	msgRet.drillId = math.min(math.max(drillIdValue, 0), 255)
 	-- 2. diff (byte类型,范围0-255,防止溢出)
 	local diffValue = diff or 1
 	if diffValue > 255 or diffValue < 0 then
-		Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: diff溢出,原始值="..diffValue..",限制后="..math.min(math.max(diffValue, 0), 255))
+		--Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: diff溢出,原始值="..diffValue..",限制后="..math.min(math.max(diffValue, 0), 255))
 	end
 	msgRet.diff = math.min(math.max(diffValue, 0), 255)
 	-- 3. box (数组) - 协议定义最大长度为5
@@ -485,12 +485,12 @@ function queryDrillId(human, drillData, openPanel)
 		local net = msgRet.box[k]	
 		-- index 和 needId 都是 byte 类型,防止溢出
 		if k > 255 or k < 0 then
-			Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: box index溢出,原始值="..k..",限制后="..math.min(math.max(k, 0), 255))
+			--Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: box index溢出,原始值="..k..",限制后="..math.min(math.max(k, 0), 255))
 		end
 		net.index = math.min(math.max(k, 0), 255)
 		local needIdValue = config.needDrill or 0
 		if needIdValue > 255 or needIdValue < 0 then
-			Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: box needId溢出,原始值="..needIdValue..",限制后="..math.min(math.max(needIdValue, 0), 255))
+			--Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: box needId溢出,原始值="..needIdValue..",限制后="..math.min(math.max(needIdValue, 0), 255))
 		end
 		net.needId = math.min(math.max(needIdValue, 0), 255)
 		net.state = getBoxState(drill,  k)
@@ -531,7 +531,7 @@ function queryDrillId(human, drillData, openPanel)
 	-- 注意:如果 maxDiff 为 0,应该视为未设置,使用默认值 1(因为 0 在 Lua 中是 truthy)
 	local maxDiffValue = (drill.maxDiff == nil or drill.maxDiff == 0) and 1 or drill.maxDiff
 	if maxDiffValue > 255 or maxDiffValue < 0 then
-		Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: maxDiff溢出,原始值="..maxDiffValue..",限制后="..math.min(math.max(maxDiffValue, 0), 255))
+		--Log.write(Log.LOGID_DEBUG, "[queryDrillId] WARNING: maxDiff溢出,原始值="..maxDiffValue..",限制后="..math.min(math.max(maxDiffValue, 0), 255))
 	end
 	msgRet.maxDiff = math.min(math.max(maxDiffValue, 0), 255)
 	-- 6. canOneClickSaodang
@@ -540,7 +540,7 @@ function queryDrillId(human, drillData, openPanel)
 	-- 检查是否购买了基金
 	local overflowState = human.db.overflow and human.db.overflow.state and human.db.overflow.state[OverflowFundLogic.OVERFLOW_TYPE_2]
 	local hasFund = overflowState ~= nil
-	Log.write(Log.LOGID_DEBUG, "[queryDrillId] 检查基金状态: overflow="..tostring(human.db.overflow ~= nil)..", state="..tostring(human.db.overflow and human.db.overflow.state ~= nil)..", overflowState[2]="..tostring(overflowState)..", hasFund="..tostring(hasFund))
+	--Log.write(Log.LOGID_DEBUG, "[queryDrillId] 检查基金状态: overflow="..tostring(human.db.overflow ~= nil)..", state="..tostring(human.db.overflow and human.db.overflow.state ~= nil)..", overflowState[2]="..tostring(overflowState)..", hasFund="..tostring(hasFund))
 	if hasFund then
 		-- 检查试炼是否开启
 		local drillOpen = isOpen(human, false)
@@ -555,19 +555,19 @@ function queryDrillId(human, drillData, openPanel)
 						-- 注意:即使 drillId=1,也显示按钮,实际扫荡时会检查是否有可扫荡的关卡
 						canOneClickSaodang = 1
 					else
-						Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: diff="..diff.." == 0")
+						--Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: diff="..diff.." == 0")
 					end
 				else
-					Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: drillData为nil")
+					--Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: drillData为nil")
 				end
 			else
-				Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: drill为nil")
+				--Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: drill为nil")
 			end
 		else
-			Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: 试炼未开启")
+			--Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: 试炼未开启")
 		end
 	else
-		Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: 未购买奢华基金(OVERFLOW_TYPE_2)")
+		--Log.write(Log.LOGID_DEBUG, "[queryDrillId] canOneClickSaodang=0: 未购买奢华基金(OVERFLOW_TYPE_2)")
 	end
 	msgRet.canOneClickSaodang = canOneClickSaodang
 	-- 7. openPanel
@@ -1803,31 +1803,31 @@ end
 
 -- 一键扫荡
 function oneClickSaodang(human)
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 收到一键扫荡请求")
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 收到一键扫荡请求")
 	
 	-- 检查是否购买了基金(购买项207)
 	if not human.db.overflow or not human.db.overflow.state or not human.db.overflow.state[OverflowFundLogic.OVERFLOW_TYPE_2] then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 未购买奢华基金(OVERFLOW_TYPE_2)")
+		--Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 未购买奢华基金(OVERFLOW_TYPE_2)")
 		return
 	end
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已购买基金,继续执行")
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已购买基金,继续执行")
 	
 	-- 检查是否开启了试炼
 	if not isOpen(human, true) then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 试炼未开启")
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 试炼未开启")
 		return
 	end
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 试炼已开启,继续执行")
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 试炼已开启,继续执行")
 	
 	local drill = human.db.drill
 	if not drill then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] drill为nil")
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] drill为nil")
 		return
 	end
 	
 	local drillData = DrillDB.getDrillDataByUuid(human.db._id)
 	if not drillData then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] drillData为nil")
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] drillData为nil")
 		return
 	end
 	
@@ -1837,25 +1837,25 @@ function oneClickSaodang(human)
 	end
 	
 	if diff == 0 then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] diff="..diff..",需要!=0")
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] diff="..diff..",需要!=0")
 		return
 	end
 	
 	---- 获取当前关卡ID
 	local currentDrillId = drillData.drillId or 1
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 当前关卡ID="..currentDrillId..", diff="..diff)
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 当前关卡ID="..currentDrillId..", diff="..diff)
 	
 	-- 获取总关卡数
 	local dirllDefConfig = DrillExcel.define[diff]
 	if not dirllDefConfig then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 难度配置不存在,diff="..diff)
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 难度配置不存在,diff="..diff)
 		return
 	end
 	local maxDrillID = dirllDefConfig.maxDrillID
 	
 	-- 如果已经通关所有关卡(drillId > maxDrillID),不允许再次扫荡
 	if currentDrillId > maxDrillID then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已通关所有关卡,不允许再次扫荡,currentDrillId="..currentDrillId..", maxDrillID="..maxDrillID)
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已通关所有关卡,不允许再次扫荡,currentDrillId="..currentDrillId..", maxDrillID="..maxDrillID)
 		Broadcast.sendErr(human, "已通关所有关卡,无法再次扫荡")
 		return
 	end
@@ -1863,17 +1863,17 @@ function oneClickSaodang(human)
 	-- 计算可扫荡的关卡数
 	-- 一键扫荡应该扫荡所有关卡(1到maxDrillID),无论当前关卡ID是多少
 	local maxSaodangId = maxDrillID
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 一键扫荡:扫荡所有关卡,maxSaodangId="..maxSaodangId..", maxDrillID="..maxDrillID)
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 一键扫荡:扫荡所有关卡,maxSaodangId="..maxSaodangId..", maxDrillID="..maxDrillID)
 	
 	if maxSaodangId < 1 then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 无可扫荡关卡,maxSaodangId="..maxSaodangId.." < 1")
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 无可扫荡关卡,maxSaodangId="..maxSaodangId.." < 1")
 		return
 	end
 	
 	-- 计算扫荡后的关卡ID
 	-- 一键扫荡后应该全部通关(newDrillId = maxDrillID + 1)
 	local newDrillId = maxDrillID + 1  -- 16表示已通关所有关卡
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 计算扫荡后关卡ID: 一键扫荡后全部通关, newDrillId="..newDrillId)
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 计算扫荡后关卡ID: 一键扫荡后全部通关, newDrillId="..newDrillId)
 	
 	-- 检查是否已经扫荡过:
 	-- 由于 newDrillId 总是等于 maxDrillID + 1(全部通关),所以:
@@ -1881,7 +1881,7 @@ function oneClickSaodang(human)
 	-- - 如果 currentDrillId > maxDrillID,说明已经全部通关了,不允许再次扫荡(这个检查已经在前面做了)
 	-- 理论上 newDrillId 不会小于或等于 currentDrillId(除非已经全部通关),但为了安全起见,保留检查
 	if newDrillId < currentDrillId then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已扫荡过,不允许再次扫荡: currentDrillId="..currentDrillId..", newDrillId="..newDrillId..", maxSaodangId="..maxSaodangId)
+		-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已扫荡过,不允许再次扫荡: currentDrillId="..currentDrillId..", newDrillId="..newDrillId..", maxSaodangId="..maxSaodangId)
 		Broadcast.sendErr(human, "已扫荡过,无法再次扫荡")
 		return
 	end
@@ -1890,13 +1890,13 @@ function oneClickSaodang(human)
 	-- 但为了安全起见,保留检查(通过标记判断是否已经扫荡过)
 	if newDrillId == currentDrillId then
 		if drill.oneClickSaodangDone then
-			Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已扫荡过(通过标记判断),不允许再次扫荡: currentDrillId="..currentDrillId..", newDrillId="..newDrillId..", maxSaodangId="..maxSaodangId)
+			--Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 已扫荡过(通过标记判断),不允许再次扫荡: currentDrillId="..currentDrillId..", newDrillId="..newDrillId..", maxSaodangId="..maxSaodangId)
 			Broadcast.sendErr(human, "已扫荡过,无法再次扫荡")
 			return
 		end
 	end
 	
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 可扫荡关卡数: maxSaodangId="..maxSaodangId..", 总关卡数="..maxDrillID)
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 可扫荡关卡数: maxSaodangId="..maxSaodangId..", 总关卡数="..maxDrillID)
 	
 	-- 双倍奖励
 	local double = RoleSystemLogic.isDouble(human, RoleSystemDefine.ROLE_SYS_ID_1204)
@@ -1949,7 +1949,7 @@ function oneClickSaodang(human)
 	end
 	msgRet.itemList[0] = len
 	
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 发送协议数据: drillId="..msgRet.drillId..", double="..msgRet.double..", itemCount="..len..", items=["..itemInfo.."]")
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 发送协议数据: drillId="..msgRet.drillId..", double="..msgRet.double..", itemCount="..len..", items=["..itemInfo.."]")
 	Msg.send(msgRet, human.fd)
 	
 	-- 更新关卡ID(已经在发放奖励前检查过了,这里直接更新)
@@ -1957,28 +1957,28 @@ function oneClickSaodang(human)
 	drillData.drillId = newDrillId
 	drill.drillId = newDrillId
 	DrillDB.updateDrillData(drillData)
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 更新关卡ID: "..currentDrillId.." -> "..newDrillId.." (drillData.drillId: "..(oldDrillId or "nil").." -> "..newDrillId..")")
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 更新关卡ID: "..currentDrillId.." -> "..newDrillId.." (drillData.drillId: "..(oldDrillId or "nil").." -> "..newDrillId..")")
 	
 	-- 检查是否全部通关
 	if newDrillId > maxDrillID then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 扫荡后已全部通关: newDrillId="..newDrillId.." > maxDrillID="..maxDrillID)
+		--Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 扫荡后已全部通关: newDrillId="..newDrillId.." > maxDrillID="..maxDrillID)
 	else
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 扫荡后未全部通关: newDrillId="..newDrillId.." <= maxDrillID="..maxDrillID..", 可以手动挑战")
+		--Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 扫荡后未全部通关: newDrillId="..newDrillId.." <= maxDrillID="..maxDrillID..", 可以手动挑战")
 	end
 	
 	-- 设置扫荡完成标记(用于防止重复扫荡)
 	drill.oneClickSaodangDone = true
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 设置扫荡完成标记: oneClickSaodangDone=true")
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 设置扫荡完成标记: oneClickSaodangDone=true")
 	
 	-- 如果通关所有关卡,触发通关回调
 	if newDrillId > maxDrillID then
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 触发通关回调: newDrillId="..newDrillId.." > maxDrillID="..maxDrillID)
+		--Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 触发通关回调: newDrillId="..newDrillId.." > maxDrillID="..maxDrillID)
 		tongGuan(human, diff)
 		ChengjiuLogic.onCallback(human, ChengjiuDefine.CJ_TASK_TYPE_17, 1)
 		HeroLogLogic.finishTaskCB(human, HeroLogLogic.HERO_LOG_TYPE_5, 1)
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 通关回调执行完成")
+		--Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 通关回调执行完成")
 	else
-		Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 未触发通关回调: newDrillId="..newDrillId.." <= maxDrillID="..maxDrillID)
+		--Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 未触发通关回调: newDrillId="..newDrillId.." <= maxDrillID="..maxDrillID)
 	end
 	
 	-- 更新数据
@@ -1999,5 +1999,5 @@ function oneClickSaodang(human)
 		TriggerLogic.PublishEvent(TriggerDefine.DRILL_KILL_SHOUWEI, human.db._id, 1)
 	end
 	
-	Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 任务进度已更新: 扫荡关卡数="..maxSaodangId)
+	-- Log.write(Log.LOGID_DEBUG, "[oneClickSaodang] 任务进度已更新: 扫荡关卡数="..maxSaodangId)
 end

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

@@ -60,7 +60,7 @@ function CG_DRILL_FIGHT_BY_DIAMON(human, msg)
 end
 
 function CG_DRILL_ONE_CLICK_SAODANG(human)
-	local Log = require("common.Log")
-	Log.write(Log.LOGID_DEBUG, "[Handler] CG_DRILL_ONE_CLICK_SAODANG 被调用")
+	-- local Log = require("common.Log")
+	-- Log.write(Log.LOGID_DEBUG, "[Handler] CG_DRILL_ONE_CLICK_SAODANG 被调用")
 	DrillLogic.oneClickSaodang(human)
 end

+ 38 - 38
script/module/fuwen/BattleWillLogic.lua

@@ -75,13 +75,13 @@ local function getBattleWillGroupIDs()
     
     -- 如果没有找到,使用默认值(兼容性处理)
     if #groupIDs == 0 then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGroupIDs] 未找到战意技能,使用默认值: {1001, 1002}")
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGroupIDs] 未找到战意技能,使用默认值: {1001, 1002}")
         return {1001, 1002}
     end
     
     -- 排序以确保一致性
     table.sort(groupIDs)
-    Log.write(Log.LOGID_DEBUG, "[getBattleWillGroupIDs] 找到战意技能组ID: "..table.concat(groupIDs, ","))
+    -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGroupIDs] 找到战意技能组ID: "..table.concat(groupIDs, ","))
     return groupIDs
 end
 
@@ -107,82 +107,82 @@ end
 -- 战意数据存储在 heroGrid.bingshu[index] 中,需要判断 groupID == 1002
 function getBattleWillGrid(heroGrid, index)
     if not heroGrid then 
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] heroGrid为nil")
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] heroGrid为nil")
         return 
     end
     if not index then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] index为nil")
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] index为nil")
         return
     end
     -- 从bingshu中获取战意数据
     if not heroGrid.bingshu then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] heroGrid.bingshu为nil")
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] heroGrid.bingshu为nil")
         return
     end
     local bingshuGrid = heroGrid.bingshu[index]
     if not bingshuGrid then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] heroGrid.bingshu["..index.."]为nil")
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] heroGrid.bingshu["..index.."]为nil")
         return
     end
     local skillID = bingshuGrid.skillID
     if not skillID then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] skillID为nil, index="..index)
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] skillID为nil, index="..index)
         return
     end
     
     -- 检查是否是战意技能(groupID=1001"狂暴"或groupID=1002"战意")
     local skillConfig = FuwenExcel.skill[skillID]
     if not skillConfig then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] skillConfig为nil, skillID="..skillID)
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] skillConfig为nil, skillID="..skillID)
         return
     end
     if not isBattleWillSkill(skillConfig) then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] 不是战意技能, groupID="..(skillConfig.groupID or "nil")..", skillID="..skillID..", index="..index)
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] 不是战意技能, groupID="..(skillConfig.groupID or "nil")..", skillID="..skillID..", index="..index)
         return
     end
     
-    Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] 找到战意技能: index="..index..", skillID="..skillID..", level="..(skillConfig.lv or "nil"))
+    -- Log.write(Log.LOGID_DEBUG, "[getBattleWillGrid] 找到战意技能: index="..index..", skillID="..skillID..", level="..(skillConfig.lv or "nil"))
     return bingshuGrid, index
 end
 
 -- 查找战意所在的索引(遍历所有bingshu格子)
 function findBattleWillIndex(heroGrid)
     if not heroGrid or not heroGrid.bingshu then
-        Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] heroGrid或heroGrid.bingshu为nil")
+        -- Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] heroGrid或heroGrid.bingshu为nil")
         return nil
     end
     
-    Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] 开始遍历所有bingshu格子,查找战意技能(groupID=1001或1002)")
-    Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] BINGSHU_MAXCNT="..BingshuLogic.BINGSHU_MAXCNT)
+    -- Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] 开始遍历所有bingshu格子,查找战意技能(groupID=1001或1002)")
+    -- Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] BINGSHU_MAXCNT="..BingshuLogic.BINGSHU_MAXCNT)
     
     -- 遍历所有bingshu格子,查找groupID=1001或1002的技能
     for i = 1, BingshuLogic.BINGSHU_MAXCNT do
         local bingshuGrid = heroGrid.bingshu[i]
         if bingshuGrid then
             local skillID = bingshuGrid.skillID
-            Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."]存在, skillID="..(skillID or "nil"))
+            --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."]存在, skillID="..(skillID or "nil"))
             if skillID then
                 local skillConfig = FuwenExcel.skill[skillID]
                 if skillConfig then
-                    Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."] skillConfig存在, skillID="..skillID..", groupID="..(skillConfig.groupID or "nil")..", lv="..(skillConfig.lv or "nil")..", name="..(skillConfig.name or "nil"))
+                    --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."] skillConfig存在, skillID="..skillID..", groupID="..(skillConfig.groupID or "nil")..", lv="..(skillConfig.lv or "nil")..", name="..(skillConfig.name or "nil"))
                     if isBattleWillSkill(skillConfig) then
-                        Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] ✓ 找到战意: index="..i..", skillID="..skillID..", level="..(skillConfig.lv or "nil")..", name="..(skillConfig.name or "nil")..", groupID="..(skillConfig.groupID or "nil"))
+                        --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] ✓ 找到战意: index="..i..", skillID="..skillID..", level="..(skillConfig.lv or "nil")..", name="..(skillConfig.name or "nil")..", groupID="..(skillConfig.groupID or "nil"))
                         return i
                     else
-                        Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."]不是战意, groupID="..(skillConfig.groupID or "nil"))
+                        --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."]不是战意, groupID="..(skillConfig.groupID or "nil"))
                     end
                 else
-                    Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."] skillConfig为nil, skillID="..skillID)
+                    --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."] skillConfig为nil, skillID="..skillID)
                 end
             else
-                Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."] skillID为nil")
+                --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."] skillID为nil")
             end
         else
-            Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."]不存在")
+            --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] bingshu["..i.."]不存在")
         end
     end
     
-    Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] ✗ 未找到战意技能(groupID=1001或1002),已遍历所有"..BingshuLogic.BINGSHU_MAXCNT.."个格子")
+    --Log.write(Log.LOGID_DEBUG, "[findBattleWillIndex] ✗ 未找到战意技能(groupID=1001或1002),已遍历所有"..BingshuLogic.BINGSHU_MAXCNT.."个格子")
     return nil
 end
 
@@ -191,12 +191,12 @@ end
 function getBattleWillLevel(heroGrid, index)
     local grid, actualIndex = getBattleWillGrid(heroGrid, index)
     if not grid then 
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] grid为nil, index="..(index or "nil"))
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] grid为nil, index="..(index or "nil"))
         return 0 
     end
     local skillID = grid.skillID
     if not skillID then
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] skillID为nil")
+        -- Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] skillID为nil")
         return 0
     end
     
@@ -204,11 +204,11 @@ function getBattleWillLevel(heroGrid, index)
     local skillConfig = FuwenExcel.skill[skillID]
     if skillConfig and isBattleWillSkill(skillConfig) then
         local level = skillConfig.lv or 0
-        Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] 获取到等级: level="..level..", skillID="..skillID..", index="..(index or "nil"))
+        --Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] 获取到等级: level="..level..", skillID="..skillID..", index="..(index or "nil"))
         return level
     end
     
-    Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] 不是战意技能, skillID="..skillID)
+    --Log.write(Log.LOGID_DEBUG, "[getBattleWillLevel] 不是战意技能, skillID="..skillID)
     return 0
 end
 
@@ -233,11 +233,11 @@ end
 
 -- 查询回退信息
 function sendRollbackQuery(human, heroID, heroIndex, index)
-    Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 收到查询请求: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil")..", index="..(index or "nil"))
+    --Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 收到查询请求: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil")..", index="..(index or "nil"))
     
     local heroGrid = HeroLogic.getHeroGrid(human, heroID, heroIndex)
     if not heroGrid then
-        Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 英雄不存在: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil"))
+        --Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 英雄不存在: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil"))
         return Broadcast.sendErr(human, Lang.COMMON_ARGUMENT_ERROR)
     end
     
@@ -245,27 +245,27 @@ function sendRollbackQuery(human, heroID, heroIndex, index)
     local battleWillIndex = index
     local grid = getBattleWillGrid(heroGrid, index)
     if not grid then
-        Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] index="..index.."不是战意,尝试查找战意所在位置")
+        --Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] index="..index.."不是战意,尝试查找战意所在位置")
         battleWillIndex = findBattleWillIndex(heroGrid)
         if not battleWillIndex then
-            Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 未找到战意技能")
+            -- Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 未找到战意技能")
             return Broadcast.sendErr(human, "当前战意格子为空,无法回退")
         end
         grid = heroGrid.bingshu[battleWillIndex]
     end
     
     local currentLevel = getBattleWillLevel(heroGrid, battleWillIndex)
-    Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 当前战意等级: "..currentLevel..", index="..battleWillIndex)
+    -- Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 当前战意等级: "..currentLevel..", index="..battleWillIndex)
     
     -- 检查等级是否可回退(等级0为空,不可回退)
     if currentLevel == 0 or currentLevel < 1 or currentLevel > 4 then
-        Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 当前等级不可回退: level="..currentLevel)
+        -- Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 当前等级不可回退: level="..currentLevel)
         return Broadcast.sendErr(human, "当前战意格子为空,无法回退")
     end
     
     local config = BATTLE_WILL_ROLLBACK_CONFIG[currentLevel]
     if not config then
-        Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 配置不存在: level="..currentLevel)
+        -- Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 配置不存在: level="..currentLevel)
         return Broadcast.sendErr(human, Lang.COMMON_COMFIG_ERROR)
     end
     
@@ -290,12 +290,12 @@ function sendRollbackQuery(human, heroID, heroIndex, index)
         local firstNeed = currentSkillConfig.bingshuUpNeed[1]
         if firstNeed and type(firstNeed) == "table" and #firstNeed >= 1 then
             returnBattleWillID = firstNeed[1]
-            Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 从bingshuUpNeed获取战意道具ID: "..returnBattleWillID..", groupID="..(currentSkillConfig.groupID or "nil")..", skillID="..currentSkillID)
+            --Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 从bingshuUpNeed获取战意道具ID: "..returnBattleWillID..", groupID="..(currentSkillConfig.groupID or "nil")..", skillID="..currentSkillID)
         end
     end
     
     if not returnBattleWillID then
-        Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 无法确定返还战意ID: groupID="..(currentSkillConfig and currentSkillConfig.groupID or "nil")..", skillID="..(currentSkillID or "nil")..", bingshuUpNeed="..(currentSkillConfig and currentSkillConfig.bingshuUpNeed and #currentSkillConfig.bingshuUpNeed or "nil"))
+        --Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 无法确定返还战意ID: groupID="..(currentSkillConfig and currentSkillConfig.groupID or "nil")..", skillID="..(currentSkillID or "nil")..", bingshuUpNeed="..(currentSkillConfig and currentSkillConfig.bingshuUpNeed and #currentSkillConfig.bingshuUpNeed or "nil"))
     end
     
     -- 返还物品列表
@@ -328,7 +328,7 @@ function sendRollbackQuery(human, heroID, heroIndex, index)
     
     msgRet.returnItems[0] = itemCnt
     
-    Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 发送查询结果: currentLevel="..currentLevel..", index="..battleWillIndex..", needItemCnt="..config.needItemCnt..", returnItemsCount="..itemCnt)
+    --Log.write(Log.LOGID_DEBUG, "[sendRollbackQuery] 发送查询结果: currentLevel="..currentLevel..", index="..battleWillIndex..", needItemCnt="..config.needItemCnt..", returnItemsCount="..itemCnt)
     Msg.send(msgRet, human.fd)
 end
 
@@ -392,14 +392,14 @@ function rollback(human, heroID, heroIndex, index)
     end
     
     if not returnBattleWillID then
-        Log.write(Log.LOGID_DEBUG, "[rollback] 无法确定返还战意ID: groupID="..(currentSkillConfig.groupID or "nil")..", skillID="..(currentSkillID or "nil")..", bingshuUpNeed="..(currentSkillConfig.bingshuUpNeed and #currentSkillConfig.bingshuUpNeed or "nil"))
+        --Log.write(Log.LOGID_DEBUG, "[rollback] 无法确定返还战意ID: groupID="..(currentSkillConfig.groupID or "nil")..", skillID="..(currentSkillID or "nil")..", bingshuUpNeed="..(currentSkillConfig.bingshuUpNeed and #currentSkillConfig.bingshuUpNeed or "nil"))
         return Broadcast.sendErr(human, Lang.COMMON_COMFIG_ERROR)
     end
     
     -- 检查消耗道具(回退消耗)
     local config = BATTLE_WILL_ROLLBACK_CONFIG[currentLevel]
     if not config then
-        Log.write(Log.LOGID_DEBUG, "[rollback] 回退配置不存在: level="..currentLevel)
+        --Log.write(Log.LOGID_DEBUG, "[rollback] 回退配置不存在: level="..currentLevel)
         return Broadcast.sendErr(human, Lang.COMMON_COMFIG_ERROR)
     end
     
@@ -444,7 +444,7 @@ function rollback(human, heroID, heroIndex, index)
             -- 这是战意技能,删除它
             heroGrid.bingshu[battleWillIndex] = nil
         else
-            Log.write(Log.LOGID_DEBUG, "[rollback] WARNING: bingshu["..battleWillIndex.."]不是战意技能, skillID="..(bingshuGrid.skillID or "nil"))
+            --Log.write(Log.LOGID_DEBUG, "[rollback] WARNING: bingshu["..battleWillIndex.."]不是战意技能, skillID="..(bingshuGrid.skillID or "nil"))
         end
     end
     

+ 16 - 16
script/module/fuwen/BingshuLogic.lua

@@ -190,17 +190,17 @@ end
 
 -- 升级查询
 function sendLevelUpQuery(human, heroID, heroIndex, index)
-	Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 收到查询请求: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil")..", index="..(index or "nil"))
+	--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 收到查询请求: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil")..", index="..(index or "nil"))
 	
 	local heroGrid = HeroLogic.getHeroGrid(human, heroID, heroIndex)
 	if not heroGrid then 
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 英雄不存在: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil"))
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 英雄不存在: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil"))
 		return Broadcast.sendErr(human, Lang.COMMON_ARGUMENT_ERROR)
 	end
 	
 	local grid = getBingshuGrid(heroGrid, index)
 	if not grid then 
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 兵书格子不存在: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil")..", index="..(index or "nil"))
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 兵书格子不存在: heroID="..(heroID or "nil")..", heroIndex="..(heroIndex or "nil")..", index="..(index or "nil"))
 		return Broadcast.sendErr(human, "兵书格子不存在")
 	end
 
@@ -213,13 +213,13 @@ function sendLevelUpQuery(human, heroID, heroIndex, index)
 	
 	-- 检查grid和skillID
 	if not grid or not grid.skillID then
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] ERROR: grid或grid.skillID不存在, grid="..tostring(grid)..", skillID="..(grid and grid.skillID or "nil"))
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] ERROR: grid或grid.skillID不存在, grid="..tostring(grid)..", skillID="..(grid and grid.skillID or "nil"))
 		return Broadcast.sendErr(human, "兵书数据错误")
 	end
 	
 	-- 检查技能配置
 	if not config then
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] ERROR: 技能配置不存在, skillID="..grid.skillID)
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] ERROR: 技能配置不存在, skillID="..grid.skillID)
 		return Broadcast.sendErr(human, "技能配置不存在")
 	end
 	
@@ -239,38 +239,38 @@ function sendLevelUpQuery(human, heroID, heroIndex, index)
 	
 	-- 检查消息格式
 	local protoID = msgRet[1]
-	Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 准备发送消息: protoID="..(protoID or "nil")..", heroID="..heroID..", heroIndex="..heroIndex..", index="..index..", skillID="..(grid.skillID or "nil")..", forgetCost="..msgRet.forgetCost)
-	Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] human.fd="..(human.fd or "nil")..", upData[0]="..(msgRet.upData[0] or "nil")..", returnItems[0]="..(msgRet.returnItems[0] or "nil"))
+	--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 准备发送消息: protoID="..(protoID or "nil")..", heroID="..heroID..", heroIndex="..heroIndex..", index="..index..", skillID="..(grid.skillID or "nil")..", forgetCost="..msgRet.forgetCost)
+	--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] human.fd="..(human.fd or "nil")..", upData[0]="..(msgRet.upData[0] or "nil")..", returnItems[0]="..(msgRet.returnItems[0] or "nil"))
 	
 	-- 检查bingshu数据
 	if msgRet.bingshu then
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.bingshu存在, index="..(msgRet.bingshu.index or "nil")..", skillID="..(msgRet.bingshu.skill and msgRet.bingshu.skill.skillID or "nil"))
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.bingshu存在, index="..(msgRet.bingshu.index or "nil")..", skillID="..(msgRet.bingshu.skill and msgRet.bingshu.skill.skillID or "nil"))
 		if msgRet.bingshu.skill then
-			Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.bingshu.skill.skillID="..(msgRet.bingshu.skill.skillID or "nil")..", skillName="..(msgRet.bingshu.skill.skillName or "nil"))
+			--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.bingshu.skill.skillID="..(msgRet.bingshu.skill.skillID or "nil")..", skillName="..(msgRet.bingshu.skill.skillName or "nil"))
 		else
-			Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] WARNING: msgRet.bingshu.skill为nil")
+			--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] WARNING: msgRet.bingshu.skill为nil")
 		end
 	else
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] WARNING: msgRet.bingshu为nil")
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] WARNING: msgRet.bingshu为nil")
 	end
 	
 	-- 检查upData数据
 	if msgRet.upData[0] > 0 and msgRet.upData[1] then
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.upData[1]存在, skillID="..(msgRet.upData[1].skill and msgRet.upData[1].skill.skillID or "nil"))
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.upData[1]存在, skillID="..(msgRet.upData[1].skill and msgRet.upData[1].skill.skillID or "nil"))
 	end
 	
 	-- 检查returnItems数据
 	if msgRet.returnItems[0] > 0 then
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.returnItems[0]="..msgRet.returnItems[0])
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.returnItems[0]="..msgRet.returnItems[0])
 		for i = 1, msgRet.returnItems[0] do
 			if msgRet.returnItems[i] then
-				Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.returnItems["..i.."]: id="..(msgRet.returnItems[i].id or "nil")..", cnt="..(msgRet.returnItems[i].cnt or "nil"))
+				--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] msgRet.returnItems["..i.."]: id="..(msgRet.returnItems[i].id or "nil")..", cnt="..(msgRet.returnItems[i].cnt or "nil"))
 			end
 		end
 	end
 	
 	if not human.fd then
-		Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] ERROR: human.fd为nil,无法发送消息")
+		--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] ERROR: human.fd为nil,无法发送消息")
 		return Broadcast.sendErr(human, "连接已断开")
 	end
 	
@@ -278,7 +278,7 @@ function sendLevelUpQuery(human, heroID, heroIndex, index)
 	-- Msg.trace(msgRet)
 	
 	Msg.send(msgRet, human.fd)
-	Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 消息已发送: protoID="..(protoID or "nil")..", heroID="..heroID..", heroIndex="..heroIndex..", index="..index)
+	--Log.write(Log.LOGID_DEBUG, "[sendLevelUpQuery] 消息已发送: protoID="..(protoID or "nil")..", heroID="..heroID..", heroIndex="..heroIndex..", index="..index)
 end
 
 -- 升级

+ 3 - 3
script/module/present/OverflowFundLogic.lua

@@ -96,7 +96,7 @@ function overflowQuery(human,type)
 end
 
 function onBuy(human,type)
-    Log.write(Log.LOGID_DEBUG, "[OverflowFundLogic.onBuy] 进入购买 type="..type)
+    -- Log.write(Log.LOGID_DEBUG, "[OverflowFundLogic.onBuy] 进入购买 type="..type)
 
     -- 已购买,不可重复购买
     if human.db.overflow and human.db.overflow.state and human.db.overflow.state[type] then
@@ -109,7 +109,7 @@ function onBuy(human,type)
     human.db.overflow.get = human.db.overflow.get or {}
     human.db.overflow.state[type] = os.time()
     human.db.overflow.get[type] = 0
-    Log.write(Log.LOGID_DEBUG, "[OverflowFundLogic.onBuy] 设置基金状态 type="..type..", state="..human.db.overflow.state[type])
+    -- Log.write(Log.LOGID_DEBUG, "[OverflowFundLogic.onBuy] 设置基金状态 type="..type..", state="..human.db.overflow.state[type])
     overflowQuery(human,type)
 	for k, v in pairs(funcID) do
 	    YunYingLogic.sendGroupUpdate(YYInfo[k], human, PanelDefine.PANEL_ID_3310)
@@ -118,7 +118,7 @@ function onBuy(human,type)
     
     -- 如果购买的是奢华基金(OVERFLOW_TYPE_2),需要更新勇者试炼的一键扫荡状态
     if type == OVERFLOW_TYPE_2 then
-        Log.write(Log.LOGID_DEBUG, "[OverflowFundLogic.onBuy] 购买奢华基金,更新勇者试炼状态")
+        -- Log.write(Log.LOGID_DEBUG, "[OverflowFundLogic.onBuy] 购买奢华基金,更新勇者试炼状态")
         local DrillLogic = require("drill.DrillLogic")
         -- 只刷新数据,不打开界面(openPanel = false)
         DrillLogic.queryDrillId(human, nil, false)

+ 5 - 5
script/module/xianzhi/Handler.lua

@@ -10,12 +10,12 @@ end
 function CG_XIANZHI_ZHAOHUAN_DO(human, msg)
 	local Log = require("common.Log")
 	local drawType = (msg.cnt == 10) and "10连" or ((msg.cnt == 1) and "单抽" or "未知")
-	Log.write(Log.LOGID_DEBUG, "[CG_XIANZHI_ZHAOHUAN_DO] 收到天命召唤请求("..drawType.."): uuid="..(human.db._id or "nil")..", camp="..(msg.camp or "nil")..", cnt="..(msg.cnt or "nil")..", skip="..(msg.skip or "nil"))
+	-- Log.write(Log.LOGID_DEBUG, "[CG_XIANZHI_ZHAOHUAN_DO] 收到天命召唤请求("..drawType.."): uuid="..(human.db._id or "nil")..", camp="..(msg.camp or "nil")..", cnt="..(msg.cnt or "nil")..", skip="..(msg.skip or "nil"))
 	
-	-- 验证cnt参数
-	if msg.cnt ~= 1 and msg.cnt ~= 10 then
-		Log.write(Log.LOGID_DEBUG, "[CG_XIANZHI_ZHAOHUAN_DO] WARNING: cnt值异常,不是1或10: cnt="..(msg.cnt or "nil"))
-	end
+	-- -- 验证cnt参数
+	-- if msg.cnt ~= 1 and msg.cnt ~= 10 then
+	-- 	Log.write(Log.LOGID_DEBUG, "[CG_XIANZHI_ZHAOHUAN_DO] WARNING: cnt值异常,不是1或10: cnt="..(msg.cnt or "nil"))
+	-- end
 	
 	XianzhiLogic.zhaohuanDo(human, msg.camp, msg.cnt, msg.skip)
 end

+ 10 - 10
script/module/xianzhi/XianzhiLogic.lua

@@ -176,11 +176,11 @@ function zhaohuanDo(human, camp, cnt, skip)
 		HeroGrid.makeHeroNice(msgRet.list[listIndex], id, data.cnt, data.isNew)
 		-- 日志:添加到协议显示列表
 		local heroConfig = HeroExcel.hero[id]
-		if heroConfig then
-			Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(英雄): uuid="..human.db._id..", heroID="..id..", cnt="..data.cnt..", isNew="..(data.isNew and 1 or 0))
-		else
-			Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(物品): uuid="..human.db._id..", itemID="..id..", cnt="..data.cnt)
-		end
+		-- if heroConfig then
+		-- 	Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(英雄): uuid="..human.db._id..", heroID="..id..", cnt="..data.cnt..", isNew="..(data.isNew and 1 or 0))
+		-- else
+		-- 	Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(物品): uuid="..human.db._id..", itemID="..id..", cnt="..data.cnt)
+		-- end
 	end
 	
 	BagLogic.updateMomentItem(2, xianzhiOutPutId, cnt * 1) --每次召唤获得精华1个
@@ -196,22 +196,22 @@ function zhaohuanDo(human, camp, cnt, skip)
 	if listIndex < maxListCount then
 		listIndex = listIndex + 1
 		HeroGrid.makeHeroNice(msgRet.list[listIndex], ItemDefine.ITEM_XIANZHI_ZHUFU_ID, exItemCnt1, nil)
-		Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(天命结晶): uuid="..human.db._id..", itemID="..ItemDefine.ITEM_XIANZHI_ZHUFU_ID..", cnt="..exItemCnt1)
+		--Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(天命结晶): uuid="..human.db._id..", itemID="..ItemDefine.ITEM_XIANZHI_ZHUFU_ID..", cnt="..exItemCnt1)
 	else
-		Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 协议已满,天命结晶未添加到显示列表: uuid="..human.db._id..", itemID="..ItemDefine.ITEM_XIANZHI_ZHUFU_ID..", cnt="..exItemCnt1..", listIndex="..listIndex)
+		--Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 协议已满,天命结晶未添加到显示列表: uuid="..human.db._id..", itemID="..ItemDefine.ITEM_XIANZHI_ZHUFU_ID..", cnt="..exItemCnt1..", listIndex="..listIndex)
 	end
 	
 	-- 添加珠子到协议(如果还有空间)
 	if listIndex < maxListCount then
 		listIndex = listIndex + 1
 		HeroGrid.makeHeroNice(msgRet.list[listIndex], xianzhiOutPutId, cnt * 1, nil)
-		Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(珠子): uuid="..human.db._id..", itemID="..xianzhiOutPutId..", cnt="..(cnt * 1))
+		--Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 添加到协议显示列表(珠子): uuid="..human.db._id..", itemID="..xianzhiOutPutId..", cnt="..(cnt * 1))
 	else
-		Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 协议已满,珠子未添加到显示列表: uuid="..human.db._id..", itemID="..xianzhiOutPutId..", cnt="..(cnt * 1)..", listIndex="..listIndex)
+		--Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 协议已满,珠子未添加到显示列表: uuid="..human.db._id..", itemID="..xianzhiOutPutId..", cnt="..(cnt * 1)..", listIndex="..listIndex)
 	end
 	
 	msgRet.list[0] = listIndex
-	Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 协议填充完成: uuid="..human.db._id..", 最终listIndex="..listIndex..", 协议list[0]="..msgRet.list[0])
+	--Log.write(Log.LOGID_DEBUG, "[zhaohuanDo] 协议填充完成: uuid="..human.db._id..", 最终listIndex="..listIndex..", 协议list[0]="..msgRet.list[0])
 
 	Msg.send(msgRet, human.fd)
 

+ 1 - 1
script/module/zhuanpan/ZhuanpanLogic.lua

@@ -864,7 +864,7 @@ function dailyFixedRewardGet(human, channelId)
 		Log.write(Log.LOGID_DEBUG, "[dailyFixedRewardGet] 错误: 发送查询协议失败: "..(queryErr or "unknown"))
 		-- 即使查询协议发送失败,奖励已经发放,所以不返回错误
 	end
-	Log.write(Log.LOGID_DEBUG, "[dailyFixedRewardGet] 领取完成")
+	-- Log.write(Log.LOGID_DEBUG, "[dailyFixedRewardGet] 领取完成")
 end
 
 -- 抖音渠道一次性奖励查询