diff --git a/src/GlobalVar.lua b/src/GlobalVar.lua index 8fd7554..723849f 100644 --- a/src/GlobalVar.lua +++ b/src/GlobalVar.lua @@ -434,6 +434,7 @@ SystemBnousType = { ChangeBaseCount = 16, -- 每日奖励关卡挑战卡基础数量增加 ChangeBuyCount = 17, -- 每日奖励关卡挑战卡可购买次数增加, ExtraProp = 18, -- 每次探索加速额外获得道具 + AccountLevel = 19, -- 账号等级提升角色等级上限 } -- 开箱物品类型 diff --git a/src/actions/HeroAction.lua b/src/actions/HeroAction.lua index 0b5c4d1..a065d5e 100644 --- a/src/actions/HeroAction.lua +++ b/src/actions/HeroAction.lua @@ -42,10 +42,14 @@ function _M.levelUpRpc( agent, data ) if not role:checkItemEnough(cost) then return 3 end -- 通过指定关卡后才能升级英雄等级 - local pass = globalCsv.unit_exp_level_pass[level + 1] - if pass then - if not role:checkHangPass(pass) then return 4 end - end + --local pass = globalCsv.unit_exp_level_pass[level + 1] + --if pass then + -- if not role:checkHangPass(pass) then return 4 end + --end + + --账号等级提升角色等级上限 + local accountLevel = role:getAccountLevel() + if level >= accountLevel then return 4 end role:costItems(cost, {log = {desc = "heroLevelUp", int1 = msg.id, int2 = hero:getProperty("type")}}) @@ -86,10 +90,10 @@ function _M.breakRpc( agent, data ) if not role:checkItemEnough(cost) then return 4 end -- 通过指定关卡后才能突破英雄 - local pass = globalCsv.unit_break_level_pass[breakL + 1] - if pass then - if not role:checkHangPass(pass) then return 4 end - end + --local pass = globalCsv.unit_break_level_pass[breakL + 1] + --if pass then + -- if not role:checkHangPass(pass) then return 4 end + --end role:costItems(cost, {log = {desc = "heroBreak", int1 = msg.id, int2 = hero:getProperty("type")}}) local oldAttr = hero:getTotalAttrs() diff --git a/src/models/RolePlugin.lua b/src/models/RolePlugin.lua index 5466587..44e9ca6 100644 --- a/src/models/RolePlugin.lua +++ b/src/models/RolePlugin.lua @@ -3030,6 +3030,12 @@ function RolePlugin.bind(Role) return reward end + function Role:getAccountLevel() + local levelBnous = self:getLevelBnous() + dump(levelBnous) + return levelBnous[SystemBnousType.AccountLevel] or 0 + end + function Role:getLevelBnous() local levelBnous = {} local curLevel = self:getProperty("level") @@ -3058,6 +3064,11 @@ function RolePlugin.bind(Role) levelBnous[pm1] = 0 end levelBnous[pm1] = levelBnous[pm1] + pm2 + elseif pm1 == SystemBnousType.AccountLevel then + if type(levelBnous[pm1]) == "table" then + levelBnous[pm1] = 0 + end + levelBnous[pm1] = math.max(levelBnous[pm1], pm2) else levelBnous[pm1][pm2] = (levelBnous[pm1][pm2] or 0) + pm3 end -- libgit2 0.21.2