Sfoglia il codice sorgente

修改主线闯关怪物表2相关代码

gitxsm 2 mesi fa
parent
commit
fe8ffc59c3

+ 4 - 1
script/module/battle/BattleLogic.lua

@@ -1776,7 +1776,10 @@ function fontVideoInfo(human, net, monsterConfig)
 
                 local attrID = monsterConfig.attrID[k]
                 -- local attrConfig = MonsterExcel.monsterAttr[attrID].attrs
-                local attrConfig = BattleMonsterExcel.monsterAttr[attrID].attrs or BattleMonsterExcel2.monsterAttr[attrID].attrs
+                local attrConfig = BattleMonsterExcel.monsterAttr[attrID] and BattleMonsterExcel.monsterAttr[attrID].attrs
+                if not attrConfig then
+                    attrConfig = BattleMonsterExcel2.monsterAttr[attrID] and BattleMonsterExcel2.monsterAttr[attrID].attrs
+                end
                 if not attrConfig then
                     print("[fontVideoInfo] 根据attrID获取到的 attrConfig 为空 k = "..k.. " attrID = "..attrID)
                 end

+ 5 - 1
script/module/combat/CombatImpl.lua

@@ -193,7 +193,11 @@ function setData(pos, hero)
 	   if not obj.hurtType then
 			if BattleMonsterExcel[obj.id] or BattleMonsterExcel2[obj.id] then
 				-- obj.hurtType = BattleMonsterExcel[obj.id].hurtType or 0
-				obj.hurtType = BattleMonsterExcel[obj.id].hurtType or BattleMonsterExcel2[obj.id].hurtType or  0
+				if BattleMonsterExcel[obj.id] then
+					obj.hurtType = BattleMonsterExcel[obj.id].hurtType or 0
+				else
+					obj.hurtType = BattleMonsterExcel2[obj.id].hurtType or 0
+				end
 			else
 				obj.hurtType = 0
 			end