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

1.处理恶魔之塔可能出现的数据异常问题 2.屏蔽调试打印

gitxsm 1 год назад
Родитель
Сommit
b4e2e1f9c0

+ 4 - 4
script/module/hero/HeroEquip.lua

@@ -802,24 +802,24 @@ function cmpEquip(tNowequipGrid, tBagEquipGrid, heroConfig)
 
 	-- 先比较评分
 	if nScore1 ~= nScore2 then
-		print("[cmpEquip] score 不同 score1 = "..nScore1.." score2 = "..nScore2)
+		-- print("[cmpEquip] score 不同 score1 = "..nScore1.." score2 = "..nScore2)
 		return (nScore1 >= nScore2) and tNowequipGrid or tBagEquipGrid
 	end
 
 	--print("[cmpEquip] 333333")
 
 	if tConfig1.level and tConfig2.level and tConfig1.level ~= tConfig2.level then
-		print("[cmpEquip] level 不同 level1 = "..tConfig1.level.." level2 = "..tConfig2.level)
+		-- print("[cmpEquip] level 不同 level1 = "..tConfig1.level.." level2 = "..tConfig2.level)
 		return (tConfig1.level >= tConfig2.level) and tNowequipGrid or tBagEquipGrid
 	end
 
 	--print("[cmpEquip] 4444")
 	if not tNowequipGrid.quality then
-		print("当前穿戴的装备没有品级 ID1 = "..tNowequipGrid.id)
+		-- print("当前穿戴的装备没有品级 ID1 = "..tNowequipGrid.id)
 	end
 
 	if not tBagEquipGrid.quality then
-		print("当前比较的装备没有品级 ID1 = "..tBagEquipGrid.id)
+		-- print("当前比较的装备没有品级 ID1 = "..tBagEquipGrid.id)
 	end
 
 	if tNowequipGrid.quality and tBagEquipGrid.quality then

+ 7 - 0
script/module/huanjingTower/HuanjingTowerLogic.lua

@@ -121,6 +121,9 @@ function query(human)
     if human.db.tower and human.db.tower.lv then
         nowLv = human.db.tower.lv + 1
     end
+
+    nowLv = math.min(nowLv, #HuanjingTowerExcel.huanjingTower)
+
     msgRet.mylv = nowLv
     local thisTowerConfig = HuanjingTowerExcel.huanjingTower[nowLv]
     if not thisTowerConfig then
@@ -461,6 +464,10 @@ end
 
 -- 挑战
 function fight(human, args)
+    local changeLv = tonumber(args[1] or 0)
+    if changeLv > #HuanjingTowerExcel.huanjingTower then
+        return
+    end
     local isok, lv, config, count = checkCombatPos(human, args)
     if not isok then
         return