Ver Fonte

更新2

zhanwencai há 1 ano atrás
pai
commit
2a9204abb9
2 ficheiros alterados com 3 adições e 3 exclusões
  1. 1 1
      script/module/hero/HeroGrid.lua
  2. 2 2
      script/module/role/RoleAttr.lua

+ 1 - 1
script/module/hero/HeroGrid.lua

@@ -87,7 +87,7 @@ function getCacheHeroGrid(id, star, others)
 		local grid = createHeroGrid(id, star)
         if others then
 		   grid.lv = others.lv and others.lv or grid.lv
-		   grid.xLv = others.xLv and others.xLv or grid.xLv
+		   grid.xLv = others.xLv and others.xLv or (grid.xLv or 0)
 		   grid.quality = others.quality and others.quality or grid.quality
            grid.star = others.star and others.star or grid.star
         end

+ 2 - 2
script/module/role/RoleAttr.lua

@@ -67,9 +67,9 @@ function cleanHeroAttrCache(human)
 end
 
 -- 重算英雄属性
-function doCalcHero(human, index)
+function doCalcHero(human, index, heroAttrs)
 	local heroGrid = human.db.heroBag[index]
-	local attrs = calcHeroGrid(heroGrid, index, human)	
+	local attrs = calcHeroGrid(heroGrid, index, human,heroAttrs)	
 	if not attrs then return end
     
     RoleStrongLogic.doCalcMoShouPingFen(human, attrs)