Commit 75acc5957b7857f89ae1b3e0033e20fae193cc30
1 parent
5226a156
修改gm添加满级英雄指令,开启特权时,加速道具效果未受影响
Showing
3 changed files
with
17 additions
and
5 deletions
Show diff stats
src/actions/GmAction.lua
... | ... | @@ -289,14 +289,15 @@ function _M.get(role, pms) |
289 | 289 | end |
290 | 290 | elseif pms.pm1 == "MAXHERO" then |
291 | 291 | -- 给英雄 |
292 | - for itemId = 400 , 700 do | |
293 | - if csvdb["itemCsv"][itemId] then | |
294 | - role:award({[itemId] = 1}, {log = {desc = "gm"}}) | |
292 | + for heroId = 100, 500 do | |
293 | + local heroCfg = csvdb["unitCsv"][heroId] | |
294 | + if heroCfg and heroCfg.open == 1 then | |
295 | + role:award({[heroId + 300] = 1}, {log = {desc = "gm"}}) | |
295 | 296 | end |
296 | 297 | end |
297 | 298 | -- 升满级 |
298 | 299 | for _, hero in ipairs(role.heros) do |
299 | - hero:updateProperty({field = "level", value = 140}) | |
300 | + _M.herol(role, {pm1 = hero:getProperty("type"), pm2 = 130}) | |
300 | 301 | hero:updateProperty({field = "wakeL", value = #csvdb["unit_wakeCsv"]}) |
301 | 302 | end |
302 | 303 | ... | ... |
src/actions/RoleAction.lua
... | ... | @@ -754,6 +754,17 @@ function _M.openSpeedUpBoxRpc(agent, data) |
754 | 754 | role:costItems({[id] = count}, {log = {desc = "speedUpBox"}}) |
755 | 755 | end |
756 | 756 | |
757 | + local doubleCoef = role.activity:isOpen("DoubleDrop") and 2 or 1 | |
758 | + -- 特权卡获取加速获得额外道具 | |
759 | + local coef = role.storeData:getProduceItemSpeedCoef() | |
760 | + if coef > 1 or doubleCoef > 1 then | |
761 | + for k, cnt in pairs(reward) do | |
762 | + if k == ItemId.Gold or k == ItemId.Exp then | |
763 | + reward[k] = math.floor(cnt * coef * doubleCoef) | |
764 | + end | |
765 | + end | |
766 | + end | |
767 | + | |
757 | 768 | local change |
758 | 769 | reward, change = role:award(reward, {log = {desc = "speedUpBox"}}) |
759 | 770 | ... | ... |