diff --git a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua index 5f08a2dcbd..541fdfc39f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/GMPanel.lua @@ -146,30 +146,101 @@ function GMPanel:BindEvent() end function this.GetManyItems(text) - local list = string.split(text, "|") - local cor = coroutine.start(function() - for _, str in ipairs(list) do - local str = "1#" .. str - Log(str) - NetManager.GMEvent(str) - coroutine.wait(0.1) - end - LogGreen("物品批量生成完成") - end) + if text == "一键装备" then + local config = ConfigPairs(ConfigManager.GetConfig(ConfigName.EquipConfig)) + local cor = coroutine.start(function() + for k,v in (config) do + if v.Position < 5 then + local str = "1#" .. v.Id .."#" .. 1 + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end + end) + return + end + if text == "一键宝器" then + local config = ConfigPairs(ConfigManager.GetConfig(ConfigName.JewelConfig)) + local cor = coroutine.start(function() + for k,v in (config) do + local str = "1#" .. v.Id .."#" .. 10 + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end) + return + end + if text == "一键魂印" then + local config = ConfigPairs(ConfigManager.GetConfig(ConfigName.EquipConfig)) + local cor = coroutine.start(function() + for k,v in (config) do + if v.Position == 5 then + local str = "1#" .. v.Id .."#" .. 1 + NetManager.GMEvent(str) + coroutine.wait(0.1) + end + end + end) + return + end + if text and text ~= "" then + local list = string.split(text, "|") + local cor = coroutine.start(function() + for _, str in ipairs(list) do + local item = string.split(str, "#") + local itemid = tonumber(item[1]) + if not itemid then + local config = ConfigManager.GetConfigDataByKey(ConfigName.ItemConfig,"Name",item[1]) + if config then + itemid = config.Id + else + itemid = nil + end + end + if itemid then + local str1 = "1#" .. itemid .."#" .. item[2] + NetManager.GMEvent(str1) + coroutine.wait(0.1) + end + end + LogGreen("物品批量生成完成") + end) + end + end function this.GetManyHeros(text) - local list = string.split(text, "|") - Log(text) - local cor = coroutine.start(function() - for _, str in ipairs(list) do - str = "4#" .. str - Log(str) - NetManager.GMEvent(str) - coroutine.wait(0.1) - end - LogGreen("英雄批量生成完成") - end) + if text and text ~= "" then + local list = string.split(text, "|") + local cor = coroutine.start(function() + for _, str in ipairs(list) do + local item = string.split(str, "#") + local itemid = tonumber(item[1]) + if not itemid then + local config = ConfigManager.GetConfigDataByKey(ConfigName.HeroConfig,"ReadingName",item[1]) + if config then + itemid = config.Id + else + itemid = 0 + end + end + if itemid and itemid < 10 and itemid > 0 then + for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.HeroConfig)) do + if v.PropertyName == itemid and v.MaxRank >= tonumber(item[2]) and v.Star <= tonumber(item[2]) then + local str1 = "4#" .. v.Id .."#" .. item[2] + NetManager.GMEvent(str1) + coroutine.wait(0.1) + end + end + elseif itemid and itemid > 0 then + local str1 = "4#" .. itemid .."#" .. item[2] + NetManager.GMEvent(str1) + coroutine.wait(0.1) + end + end + LogGreen("英雄批量生成完成") + end) + end end -- 设置孙龙积分 function this.SetSunLongScroe(text) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index f90663b394..179182771d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -973,7 +973,7 @@ function this.TimeFormat() cardType = GoodsTypeDef.MONTHCARD_328 end if not cardType and isOpen_128 then - cardType = GoodsTypeDef.MONTHCARD_328 + cardType = GoodsTypeDef.MONTHCARD_128 end if cardType then local data = OperatingManager.GetGiftGoodsInfo(cardType)