增加一个gm

This commit is contained in:
xiekaidong 2023-06-02 15:52:17 +08:00
parent aaafadf812
commit 202e8e74c9
2 changed files with 31 additions and 0 deletions

View File

@ -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

View File

@ -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