Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev

This commit is contained in:
chenxi 2023-04-23 18:45:07 +08:00
commit 2362bb2f59
3 changed files with 14 additions and 4 deletions

View File

@ -1359,9 +1359,6 @@ function BattleController:getRandomGridInfo()
if weight > BattleConst.MAX_ELEMENT_WIGHT then if weight > BattleConst.MAX_ELEMENT_WIGHT then
weight = BattleConst.MAX_ELEMENT_WIGHT weight = BattleConst.MAX_ELEMENT_WIGHT
end end
if typeNum == 1 then
weight = BattleConst.MAX_ELEMENT_WIGHT
end
table.insert(indexs, weight) table.insert(indexs, weight)
table.insert(typeList, typeNum) table.insert(typeList, typeNum)
end end
@ -1810,7 +1807,7 @@ function BattleController:findLinkLine(posId, posIdMap, hadSkill, mainElementTyp
if not posIdMap[aroundposId] then if not posIdMap[aroundposId] then
local gridEntity = self.battleData:getGridEntity(aroundposId) local gridEntity = self.battleData:getGridEntity(aroundposId)
if gridEntity then if gridEntity then
if gridEntity:isEmptyIdle() then if gridEntity:canLink() and not gridEntity:getSkillId() then
if not mainElementType or gridEntity:getElementType() == mainElementType then if not mainElementType or gridEntity:getElementType() == mainElementType then
mainElementType = mainElementType or gridEntity:getElementType() mainElementType = mainElementType or gridEntity:getElementType()
local tempIdMap = GFunc.getTable(posIdMap) local tempIdMap = GFunc.getTable(posIdMap)

View File

@ -37,6 +37,13 @@ arg1:英雄id
Example: add_hero 1]], Example: add_hero 1]],
type = "add_hero" type = "add_hero"
}, },
{
title = "设置通关章节",
desc = [[ type:pass_chapter
arg1:id
Example: pass_chapter 1]],
type = "pass_chapter"
},
} }
return GMConst return GMConst

View File

@ -147,6 +147,12 @@ function ServerDataManager:dealGM(params, callback)
end end
end end
end end
elseif args[1] == "pass_chapter" then
local id = tonumber(args[2])
if not id then
return
end
ServerGameData.ChapterData.data.maxChapterId = id
end end
ServerGameData:saveData() ServerGameData:saveData()