增加一个gm
This commit is contained in:
parent
aaafadf812
commit
202e8e74c9
@ -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
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user