Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev
This commit is contained in:
commit
d280b4ef3d
@ -2216,26 +2216,34 @@ function BattleController:resetGrids(posList)
|
||||
return
|
||||
end
|
||||
|
||||
local canRandomElmentList = {}
|
||||
if not self.canRandomElmentList then
|
||||
self.canRandomElmentList = {}
|
||||
end
|
||||
|
||||
for i = #self.canRandomElmentList, 1, -1 do
|
||||
table.remove(self.canRandomElmentList)
|
||||
end
|
||||
|
||||
local elementCount = 0
|
||||
for typeName, typeNum in pairs(BattleConst.ELEMENT_TYPE) do
|
||||
if not lockElementMap[typeNum] and not self:getSealElementType()[typeNum] and self.battleData:getSkillEntityByElement(typeNum) then
|
||||
table.insert(canRandomElmentList, typeNum)
|
||||
table.insert(self.canRandomElmentList, typeNum)
|
||||
elementCount = elementCount + 1
|
||||
end
|
||||
end
|
||||
|
||||
if not canRandomElmentList[1] then
|
||||
if elementCount <= 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local elementCount = #canRandomElmentList
|
||||
local mainElement = canRandomElmentList[math.random(1, elementCount)]
|
||||
local mainElement = self.canRandomElmentList[math.random(1, elementCount)]
|
||||
|
||||
for typeNum, _ in pairs(lockElementMap) do
|
||||
table.insert(canRandomElmentList, typeNum)
|
||||
table.insert(self.canRandomElmentList, typeNum)
|
||||
elementCount = elementCount + 1
|
||||
end
|
||||
|
||||
local resetPosInfo = self:_dealResetGridsDataFunc2(useMap, emptySnapList, mainElement, backupSkill, keepSnapList, posMap, canRandomElmentList, elementCount, lockElementMap)
|
||||
local resetPosInfo = self:_dealResetGridsDataFunc2(useMap, emptySnapList, mainElement, backupSkill, keepSnapList, posMap, self.canRandomElmentList, elementCount, lockElementMap)
|
||||
|
||||
return resetPosInfo
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user