Commit 7cbf1146567ed3e19f0426b8711163cd046d16c3

Authored by 测试
2 parents 493a8b1f 1c1ea691

去除advmap monster类型

src/actions/ActivityAction.lua
@@ -612,7 +612,10 @@ function _M.endBattleRpc(agent, data) @@ -612,7 +612,10 @@ function _M.endBattleRpc(agent, data)
612 local isWin = msg.isWin 612 local isWin = msg.isWin
613 local heros = msg.heros 613 local heros = msg.heros
614 local support = msg.support 614 local support = msg.support
615 - if not role.activity:isOpenById(actid, "ChallengeLevel") then return 1 end 615 + if not role.activity:isOpenById(actid, "ChallengeLevel") then
  616 + SendPacket(actionCodes.Activity_endBattleRpc, MsgPack.pack({}))
  617 + return true
  618 + end
616 619
617 if not role.__actBattleCache then return 2 end 620 if not role.__actBattleCache then return 2 end
618 621
@@ -1179,14 +1182,13 @@ function _M.battleCommandRpc(agent, data) @@ -1179,14 +1182,13 @@ function _M.battleCommandRpc(agent, data)
1179 local flag = string.char(string.getbit(record, i)) 1182 local flag = string.char(string.getbit(record, i))
1180 if flag == "0" then 1183 if flag == "0" then
1181 record = string.setbit(record, i) 1184 record = string.setbit(record, i)
  1185 + local awd = cfg[rewardKey]
  1186 + for k, v in pairs(awd:toNumMap()) do
  1187 + award[k] = (award[k] or 0) + v
  1188 + end
1182 end 1189 end
1183 - record = string.setbit(record, i)  
1184 actData[typeKey] = record 1190 actData[typeKey] = record
1185 1191
1186 - local awd = cfg[rewardKey]  
1187 - for k, v in pairs(awd:toNumMap()) do  
1188 - award[k] = (award[k] or 0) + v  
1189 - end  
1190 end 1192 end
1191 end 1193 end
1192 else 1194 else
src/actions/AdvAction.lua
@@ -57,6 +57,15 @@ local function checkFormat(role, format, checkAdvTeam) @@ -57,6 +57,15 @@ local function checkFormat(role, format, checkAdvTeam)
57 end 57 end
58 end 58 end
59 59
  60 + -- 多队挂机 电台任务英雄也不能重用
  61 + local radioTask = role:getProperty("radioTask")
  62 + for id, taskInfo in pairs(radioTask) do
  63 + local heros = taskInfo["heros"] or {}
  64 + for _, heroId in ipairs(heros) do
  65 + hadHero[heroId] = true
  66 + end
  67 + end
  68 +
60 if not format.leader then return end 69 if not format.leader then return end
61 if format.leader2 == format.leader then return end 70 if format.leader2 == format.leader then return end
62 local hadLeader = false 71 local hadLeader = false
@@ -158,7 +167,7 @@ function _M.startAdvRpc( agent, data ) @@ -158,7 +167,7 @@ function _M.startAdvRpc( agent, data )
158 else -- 普通模式判断 167 else -- 普通模式判断
159 if layer >= chapterData.limitlevel then return 4 end 168 if layer >= chapterData.limitlevel then return 4 end
160 169
161 - local relayData = role:getAdvData():isHaveRelay(layer, chapterId) 170 + local relayData = role:getAdvData():isHaveRelay(layer, chapterId, true)
162 if not relayData then return 6 end -- 不是中继层 171 if not relayData then return 6 end -- 不是中继层
163 if layer ~= 1 then 172 if layer ~= 1 then
164 if (advPass[chapterId] or 0) < relayData.floor then return 21 end 173 if (advPass[chapterId] or 0) < relayData.floor then return 21 end
@@ -227,8 +236,10 @@ function _M.startHangRpc(agent, data) @@ -227,8 +236,10 @@ function _M.startHangRpc(agent, data)
227 actCfg = actCfg[chapterId] 236 actCfg = actCfg[chapterId]
228 if not actCfg then return 22 end 237 if not actCfg then return 22 end
229 238
230 - local st = toUnixtime(actCfg["unlockTime"]..string_format("%02x", RESET_TIME))  
231 - if st > skynet.timex() then return 23 end 239 + if actCfg["unlockTime"] ~= 0 then
  240 + local st = toUnixtime(actCfg["unlockTime"]..string_format("%02x", RESET_TIME))
  241 + if st > skynet.timex() then return 23 end
  242 + end
232 243
233 if actCfg["prepose"] ~= "" then 244 if actCfg["prepose"] ~= "" then
234 local type, cid = actCfg["prepose"]:toArray(true, "=") 245 local type, cid = actCfg["prepose"]:toArray(true, "=")
@@ -292,7 +303,8 @@ function _M.startHangRpc(agent, data) @@ -292,7 +303,8 @@ function _M.startHangRpc(agent, data)
292 + 0.226 * player["hit"] 303 + 0.226 * player["hit"]
293 + 0.26 * player["miss"] 304 + 0.26 * player["miss"]
294 305
295 - if battleV < campSiteData.idleValue then return 9 end -- 战斗力是否满足 306 + --print(math.ceil(battleV), campSiteData.idleValue)
  307 + if math.ceil(battleV) < campSiteData.idleValue then return 9 end -- 战斗力是否满足
296 308
297 local info = {} 309 local info = {}
298 info.format = {} 310 info.format = {}
src/actions/StoreAction.lua
@@ -232,6 +232,13 @@ function _M.getFreeChestRpc(agent, data) @@ -232,6 +232,13 @@ function _M.getFreeChestRpc(agent, data)
232 local config = csvdb["shop_rechargeCsv"][id] 232 local config = csvdb["shop_rechargeCsv"][id]
233 if not config then return end 233 if not config then return end
234 234
  235 + --判断是否是活动商品
  236 + if config.activity_id ~= 0 then
  237 + local actCfg = csvdb["activity_ctrlCsv"][config.activity_id]
  238 + if not actCfg then return 2 end
  239 + if not role.activity:isOpenById(config.activity_id, "ActShopGoods") then return 3 end
  240 + end
  241 +
235 local rechargeRecord = role.storeData:getProperty("payR") 242 local rechargeRecord = role.storeData:getProperty("payR")
236 local getCount = (rechargeRecord[id] or 0) 243 local getCount = (rechargeRecord[id] or 0)
237 if getCount >= config.limit then 244 if getCount >= config.limit then
@@ -62,10 +62,10 @@ function Adv:initByInfo(advInfo) @@ -62,10 +62,10 @@ function Adv:initByInfo(advInfo)
62 self:initBattle(advInfo) 62 self:initBattle(advInfo)
63 end 63 end
64 -- 找出level 是否存在中继层 64 -- 找出level 是否存在中继层
65 -function Adv:isHaveRelay(level, chapterId) 65 +function Adv:isHaveRelay(level, chapterId, force)
66 level = level or self.level 66 level = level or self.level
67 chapterId = chapterId or self.chapterId 67 chapterId = chapterId or self.chapterId
68 - if level == 1 then return end 68 + if level == 1 and not force then return end
69 69
70 local campsiteCsv = csvdb["adv_chapter_campsiteCsv"][chapterId] 70 local campsiteCsv = csvdb["adv_chapter_campsiteCsv"][chapterId]
71 for _, campsite in ipairs(campsiteCsv) do 71 for _, campsite in ipairs(campsiteCsv) do
@@ -815,7 +815,8 @@ function Adv:over(success, rewardRatio, overType) @@ -815,7 +815,8 @@ function Adv:over(success, rewardRatio, overType)
815 if not actCfg then break end 815 if not actCfg then break end
816 actCfg = actCfg[self.chapterId] 816 actCfg = actCfg[self.chapterId]
817 if not actCfg then break end 817 if not actCfg then break end
818 - itemId, scoreCoef = actCfg["transform"]:toArray(true, "=") 818 + local arr = actCfg["transform"]:toArray(true, "=")
  819 + itemId, scoreCoef = arr[1], arr[2]
819 local actData = self.owner.activity:getActData("AdvLevel") 820 local actData = self.owner.activity:getActData("AdvLevel")
820 821
821 -- 计算活动积分up 822 -- 计算活动积分up
@@ -830,6 +831,7 @@ function Adv:over(success, rewardRatio, overType) @@ -830,6 +831,7 @@ function Adv:over(success, rewardRatio, overType)
830 score = math.floor(score * (1 + upVal / 100)) 831 score = math.floor(score * (1 + upVal / 100))
831 832
832 local advInfo = actData[self.chapterId] or {} 833 local advInfo = actData[self.chapterId] or {}
  834 + --print("upVal", upVal, score, advInfo["max"], itemId, scoreCoef)
833 local maxScore = advInfo["max"] or 0 835 local maxScore = advInfo["max"] or 0
834 local flag = false 836 local flag = false
835 if success then 837 if success then
@@ -955,6 +957,7 @@ function Adv:over(success, rewardRatio, overType) @@ -955,6 +957,7 @@ function Adv:over(success, rewardRatio, overType)
955 }) 957 })
956 958
957 local chapterId = self.chapterId 959 local chapterId = self.chapterId
  960 + local actid = self.actid
958 self:clear() 961 self:clear()
959 self.owner:checkTaskEnter("AdvScore", {score = score}) 962 self.owner:checkTaskEnter("AdvScore", {score = score})
960 963
@@ -973,7 +976,7 @@ function Adv:over(success, rewardRatio, overType) @@ -973,7 +976,7 @@ function Adv:over(success, rewardRatio, overType)
973 scoreAward = scoreReward, 976 scoreAward = scoreReward,
974 chapterId = chapterId, 977 chapterId = chapterId,
975 backAdvCount = backAdvCount, 978 backAdvCount = backAdvCount,
976 - actid = self.actid 979 + actid = actid
977 }) 980 })
978 end 981 end
979 982
1 -Subproject commit 6c4fe16bc9b0ea28206200e893ebf0f4bf11de9b 1 +Subproject commit 9d6f538d3e33bbfa8568be9a8aabbc0e6f09d5b9
src/models/HeroPlugin.lua
@@ -53,22 +53,25 @@ function HeroPlugin.bind(Hero) @@ -53,22 +53,25 @@ function HeroPlugin.bind(Hero)
53 local talentAttrS = {} 53 local talentAttrS = {}
54 54
55 -- 四个基础属性 55 -- 四个基础属性
56 - local curData = csvdb["unit_talentCsv"][talent:getv(0, 1)]  
57 - local curTalentLvl = 0  
58 - if not curData then -- 已经满阶段了  
59 - local cfgName = "unit_talent_"..heroCfgId.."Csv"  
60 - curData = csvdb[cfgName][#csvdb[cfgName]]  
61 - else  
62 - curTalentLvl = talent:getv(1, 1)  
63 - end  
64 - for lvl, cfg in pairs(curData) do  
65 - if lvl < curTalentLvl or curTalentLvl == 0 then  
66 - if cfg.effect ~= 99 then  
67 - local curVal = talentAttrS[cfg.effect] or 0  
68 - if curVal < cfg.strength then  
69 - talentAttrS[cfg.effect] = cfg.strength 56 + local cfgName = "unit_talent_"..heroCfgId.."Csv"
  57 + local curRank = talent:getv(0, 1)
  58 + local curLv = talent:getv(1,1) - 1
  59 + for i, value in ipairs(csvdb[cfgName]) do
  60 + if i <= curRank then
  61 + for lv, cfg in ipairs(value) do
  62 + if i < curRank or lv <= curLv then
  63 + if cfg.effect ~= 99 then
  64 + if not talentAttrS[cfg.effect] then
  65 + talentAttrS[AttsEnumEx[cfg.effect]] = 0
  66 + end
  67 + talentAttrS[AttsEnumEx[cfg.effect]] = cfg.strength
  68 + end
  69 + else
  70 + break
70 end 71 end
71 end 72 end
  73 + else
  74 + break
72 end 75 end
73 end 76 end
74 77
@@ -85,7 +88,7 @@ function HeroPlugin.bind(Hero) @@ -85,7 +88,7 @@ function HeroPlugin.bind(Hero)
85 for lvl = 1, #faithConfig do 88 for lvl = 1, #faithConfig do
86 if faith >= faithConfig[lvl].exp then 89 if faith >= faithConfig[lvl].exp then
87 local add = faithConfig[lvl]["position_"..unitData.position]:toArray(true, "=") 90 local add = faithConfig[lvl]["position_"..unitData.position]:toArray(true, "=")
88 - faithAttr[add[1]] = (faithAttr[add[1]] or 0) + add[2] 91 + faithAttr[AttsEnumEx[add[1]]] = (faithAttr[AttsEnumEx[add[1]]] or 0) + add[2]
89 end 92 end
90 end 93 end
91 for _, attrName in pairs(AttsEnumEx) do 94 for _, attrName in pairs(AttsEnumEx) do
@@ -2,5 +2,5 @@ @@ -2,5 +2,5 @@
2 local skynet = require "skynet" 2 local skynet = require "skynet"
3 3
4 skynet.timex = function () 4 skynet.timex = function ()
5 - return math.floor(skynet.time()) 5 + return math.floor(skynet.time()) + 1900772 + 7 * DAY_SEC
6 end 6 end
7 \ No newline at end of file 7 \ No newline at end of file