diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index dfc10c7..03d4d9e 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -580,6 +580,14 @@ function _M.clearbag(role, pms) return "成功" end +table.insert(helpDes, {"发送跑马灯", "notice"}) +function _M.notice(role, pms) + local msg = pms.pm1 + SendPacket(actionCodes.Sys_commonNotice, MsgPack.pack({body = msg})) + + return "成功" +end + function _M.helpRpc(agent, data) SendPacket(actionCodes.Gm_helpRpc, MsgPack.pack({help = helpDes})) return true diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 28a2b0e..f10c575 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -72,6 +72,7 @@ function _M.breakRpc( agent, data ) if hero:getProperty("level") < hero:getMaxLevel() then return 2 end if hero:getProperty("breakL") >= #csvdb["unit_breakCsv"] then return 3 end local curData = csvdb["unit_breakCsv"][hero:getProperty("breakL")] + if hero:getProperty("wakeL") < curData["starLimit"] then return 4 end local cost = {[ItemId.BreakCost] = curData.cost, [ItemId.Gold] = curData.gold} if not role:checkItemEnough(cost) then return 4 end role:costItems(cost, {log = {desc = "heroBreak", int1 = msg.id, int2 = hero:getProperty("type")}}) -- libgit2 0.21.2