From 202e8e74c931fd4c3e5367f30aa228ebb8b2c365 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 2 Jun 2023 15:52:17 +0800 Subject: [PATCH] =?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/ui/gm/gm_tool_ui.lua | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/lua/app/module/gm/gm_const.lua b/lua/app/module/gm/gm_const.lua index 5aa68163..7460ba4b 100644 --- a/lua/app/module/gm/gm_const.lua +++ b/lua/app/module/gm/gm_const.lua @@ -91,6 +91,13 @@ arg4:buff生效对象,1己方,2敌方 Example: add_buff atkp_add 5000 2 1]], type = "add_buff" }, + { + title = "设置当前不可掉落元素", + desc = [[设置当前不可掉落元素type:set_seal_element +args:不掉落的元素类型 +Example: set_seal_element 1 2 3]], + type = "set_seal_element" + }, } return GMConst \ No newline at end of file diff --git a/lua/app/ui/gm/gm_tool_ui.lua b/lua/app/ui/gm/gm_tool_ui.lua index 593213cc..cf56575b 100644 --- a/lua/app/ui/gm/gm_tool_ui.lua +++ b/lua/app/ui/gm/gm_tool_ui.lua @@ -95,6 +95,12 @@ function GMToolUI:sendMsg(gmCommand) return end self:dealAddBuffGm(args) + elseif args.args[1] == "set_seal_element" then -- 特殊处理 + if not ModuleManager.BattleManager:isInBattle() then + Logger.logHighlight("不在战斗中") + return + end + self:dealSetSealElementGm(args.args) elseif args.args[1] == "time" then -- 特殊处理 local args1 = {} args1.args = {} @@ -133,4 +139,22 @@ function GMToolUI:dealAddBuffGm(args) self:closeUI() end +function GMToolUI:dealSetSealElementGm(args) + local battleController = ModuleManager.BattleManager.battleController + battleController.sealElementType = {} + local index = 2 + while true do + if not args[index] then + break + end + local elementType = tonumber(args[index]) + if not elementType then + break + end + battleController.sealElementType[elementType] = true + index = index + 1 + end + self:closeUI() +end + return GMToolUI