gm 提交

dev_chengFeng
jiaoyangna 2021-03-17 17:34:14 +08:00
parent adb3a1e750
commit d6b008742b
2 changed files with 93 additions and 22 deletions

View File

@ -146,30 +146,101 @@ function GMPanel:BindEvent()
end end
function this.GetManyItems(text) function this.GetManyItems(text)
local list = string.split(text, "|") if text == "一键装备" then
local cor = coroutine.start(function() local config = ConfigPairs(ConfigManager.GetConfig(ConfigName.EquipConfig))
for _, str in ipairs(list) do local cor = coroutine.start(function()
local str = "1#" .. str for k,v in (config) do
Log(str) if v.Position < 5 then
NetManager.GMEvent(str) local str = "1#" .. v.Id .."#" .. 1
coroutine.wait(0.1) NetManager.GMEvent(str)
end coroutine.wait(0.1)
LogGreen("物品批量生成完成") end
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 end
function this.GetManyHeros(text) function this.GetManyHeros(text)
local list = string.split(text, "|") if text and text ~= "" then
Log(text) local list = string.split(text, "|")
local cor = coroutine.start(function() local cor = coroutine.start(function()
for _, str in ipairs(list) do for _, str in ipairs(list) do
str = "4#" .. str local item = string.split(str, "#")
Log(str) local itemid = tonumber(item[1])
NetManager.GMEvent(str) if not itemid then
coroutine.wait(0.1) local config = ConfigManager.GetConfigDataByKey(ConfigName.HeroConfig,"ReadingName",item[1])
end if config then
LogGreen("英雄批量生成完成") itemid = config.Id
end) 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 end
-- 设置孙龙积分 -- 设置孙龙积分
function this.SetSunLongScroe(text) function this.SetSunLongScroe(text)

View File

@ -973,7 +973,7 @@ function this.TimeFormat()
cardType = GoodsTypeDef.MONTHCARD_328 cardType = GoodsTypeDef.MONTHCARD_328
end end
if not cardType and isOpen_128 then if not cardType and isOpen_128 then
cardType = GoodsTypeDef.MONTHCARD_328 cardType = GoodsTypeDef.MONTHCARD_128
end end
if cardType then if cardType then
local data = OperatingManager.GetGiftGoodsInfo(cardType) local data = OperatingManager.GetGiftGoodsInfo(cardType)