From 7ad4420ac40c7f41070f4b4897697bec5b803919 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Sun, 23 Apr 2023 17:39:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=AD=BB=E5=B1=80bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/battle/controller/battle_controller.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 21229eb6..c6e3d6ff 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -1359,9 +1359,6 @@ function BattleController:getRandomGridInfo() if weight > BattleConst.MAX_ELEMENT_WIGHT then weight = BattleConst.MAX_ELEMENT_WIGHT end - if typeNum == 1 then - weight = BattleConst.MAX_ELEMENT_WIGHT - end table.insert(indexs, weight) table.insert(typeList, typeNum) end @@ -1810,7 +1807,7 @@ function BattleController:findLinkLine(posId, posIdMap, hadSkill, mainElementTyp if not posIdMap[aroundposId] then local gridEntity = self.battleData:getGridEntity(aroundposId) if gridEntity then - if gridEntity:isEmptyIdle() then + if gridEntity:canLink() and not gridEntity:getSkillId() then if not mainElementType or gridEntity:getElementType() == mainElementType then mainElementType = mainElementType or gridEntity:getElementType() local tempIdMap = GFunc.getTable(posIdMap) From eb3dfd49e8f91db2a0f16530dc1ee183c212ecdb Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Sun, 23 Apr 2023 18:33:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E4=B8=AAgm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/gm/gm_const.lua | 7 +++++++ lua/app/server/server_data_manager.lua | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/lua/app/module/gm/gm_const.lua b/lua/app/module/gm/gm_const.lua index 14ee32b4..5c3cd53e 100644 --- a/lua/app/module/gm/gm_const.lua +++ b/lua/app/module/gm/gm_const.lua @@ -37,6 +37,13 @@ arg1:英雄id Example: add_hero 1]], type = "add_hero" }, + { + title = "设置通关章节", + desc = [[添加英雄 type:pass_chapter +arg1:章节id +Example: pass_chapter 1]], + type = "pass_chapter" + }, } return GMConst \ No newline at end of file diff --git a/lua/app/server/server_data_manager.lua b/lua/app/server/server_data_manager.lua index 96374172..44586e4f 100644 --- a/lua/app/server/server_data_manager.lua +++ b/lua/app/server/server_data_manager.lua @@ -147,6 +147,12 @@ function ServerDataManager:dealGM(params, callback) 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 ServerGameData:saveData()