diff --git a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua index 622cf87986..ee3031cc7e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua @@ -57,6 +57,10 @@ local moneyList = {"1#3#999999999", "1#4#999999999", "1#5#999999999", "1#14#9999 --初始化组件(用于子类重写) function GMPanel:InitComponent() + --- + --- type 所属页签的类型 player 玩家页签 Function 功能类型 Battle 战斗相关 + --- subType 类型 Server 直接向服务器请求的GM Func 回调某个方法的GM + --- _GMConfig = { {type = GMType.Player, subType = GMSubType.Server, inputNum = 1, args = "12#0#%s", btnTip = "改名", inputTip = {"输入名称"}, callBack = nil}, {type = GMType.Player, subType = GMSubType.Server, inputNum = 1, args = "20#0#%s", btnTip = "完成", inputTip = {"输入任务ID"}, callBack = nil}, @@ -72,6 +76,7 @@ function GMPanel:InitComponent() {type = GMType.Player, subType = GMSubType.Server, inputNum = 1, args = "9#%s#0", btnTip = "通关关卡", inputTip = {"关卡id"}, callBack = nil}, {type = GMType.Player, subType = GMSubType.Server, inputNum = 1, args = "3#1#%s", btnTip = "发送邮件", inputTip = {"id,num|id,num..."}, callBack = nil}, {type = GMType.Player, subType = GMSubType.Server, inputNum = 1, args = "14#%s#0", btnTip = "跳转", inputTip = {"试炼副本层数"}, callBack = nil}, + {type = GMType.Player, subType = GMSubType.Func, inputNum = 1, args = "", btnTip = "添加圣物", inputTip = {"输入圣物ID"}, callBack = this.AddHoly}, {type = GMType.Player, subType = GMSubType.Server, inputNum = 0, args = "8#1#1", btnTip = "通关所有关卡", inputTip = {}, callBack = nil}, -- {type = GMType.Player, subType = GMSubType.Server, inputNum = 0, args = "6#0#0", btnTip = "一键物品", inputTip = {""}, callBack = nil}, -- {type = GMType.Player, subType = GMSubType.Server, inputNum = 0, args = "22#0#0", btnTip = "一键异妖", inputTip = {""}, callBack = nil}, @@ -164,6 +169,7 @@ end function this.AddHoly(text) local command = "//addholy %s %s" command = string.format(command, PlayerManager.uid, text) + Log(command) ChatManager.RequestGMCommand(command) end