Commit 702a376925749ab88336b310ef026a54c1efb171
1 parent
12a26ade
跑马灯gm指令, 突破时候检测星级要求
Showing
2 changed files
with
9 additions
and
0 deletions
Show diff stats
src/actions/GmAction.lua
| @@ -580,6 +580,14 @@ function _M.clearbag(role, pms) | @@ -580,6 +580,14 @@ function _M.clearbag(role, pms) | ||
| 580 | return "成功" | 580 | return "成功" |
| 581 | end | 581 | end |
| 582 | 582 | ||
| 583 | +table.insert(helpDes, {"发送跑马灯", "notice"}) | ||
| 584 | +function _M.notice(role, pms) | ||
| 585 | + local msg = pms.pm1 | ||
| 586 | + SendPacket(actionCodes.Sys_commonNotice, MsgPack.pack({body = msg})) | ||
| 587 | + | ||
| 588 | + return "成功" | ||
| 589 | +end | ||
| 590 | + | ||
| 583 | function _M.helpRpc(agent, data) | 591 | function _M.helpRpc(agent, data) |
| 584 | SendPacket(actionCodes.Gm_helpRpc, MsgPack.pack({help = helpDes})) | 592 | SendPacket(actionCodes.Gm_helpRpc, MsgPack.pack({help = helpDes})) |
| 585 | return true | 593 | return true |
src/actions/HeroAction.lua
| @@ -72,6 +72,7 @@ function _M.breakRpc( agent, data ) | @@ -72,6 +72,7 @@ function _M.breakRpc( agent, data ) | ||
| 72 | if hero:getProperty("level") < hero:getMaxLevel() then return 2 end | 72 | if hero:getProperty("level") < hero:getMaxLevel() then return 2 end |
| 73 | if hero:getProperty("breakL") >= #csvdb["unit_breakCsv"] then return 3 end | 73 | if hero:getProperty("breakL") >= #csvdb["unit_breakCsv"] then return 3 end |
| 74 | local curData = csvdb["unit_breakCsv"][hero:getProperty("breakL")] | 74 | local curData = csvdb["unit_breakCsv"][hero:getProperty("breakL")] |
| 75 | + if hero:getProperty("wakeL") < curData["starLimit"] then return 4 end | ||
| 75 | local cost = {[ItemId.BreakCost] = curData.cost, [ItemId.Gold] = curData.gold} | 76 | local cost = {[ItemId.BreakCost] = curData.cost, [ItemId.Gold] = curData.gold} |
| 76 | if not role:checkItemEnough(cost) then return 4 end | 77 | if not role:checkItemEnough(cost) then return 4 end |
| 77 | role:costItems(cost, {log = {desc = "heroBreak", int1 = msg.id, int2 = hero:getProperty("type")}}) | 78 | role:costItems(cost, {log = {desc = "heroBreak", int1 = msg.id, int2 = hero:getProperty("type")}}) |