Commit 4e9566f2769a711436ddc48b94f534b2743e70db
1 parent
4ee2fe31
电波塔加成算法解析字段方法修正
Showing
2 changed files
with
12 additions
and
8 deletions
Show diff stats
src/actions/TowerAction.lua
... | ... | @@ -213,7 +213,11 @@ function _M.activeTowerBonusRpc(agent, data) |
213 | 213 | local towerLevel = {[1] = (towerInfo.l or 1), [2] = (towerInfo.l1 or 10001), [3] = (towerInfo.l2 or 20001), [4] = (towerInfo.l3 or 30001)} |
214 | 214 | local curLevel = towerLevel[tType] |
215 | 215 | |
216 | - if curLevel - 1 < bnousData.level then return 3 end | |
216 | + if tType ~= 1 then | |
217 | + if curLevel <= globalCsv.tower_open[towerType - 1] then return 4 end | |
218 | + end | |
219 | + | |
220 | + if (curLevel % 10000) <= bnousData.floor then return 3 end | |
217 | 221 | |
218 | 222 | if not towerBnous[tType] then |
219 | 223 | towerBnous[tType] = {} | ... | ... |
src/models/RolePlugin.lua
... | ... | @@ -2185,9 +2185,9 @@ function RolePlugin.bind(Role) |
2185 | 2185 | for towerIdx, Set in pairs(towerBnous) do |
2186 | 2186 | for id, _ in pairs(Set) do |
2187 | 2187 | local data = bnousCsv[towerIdx][id] |
2188 | - local effects = data.effect:toTableArray(true) | |
2188 | + local effects = data.effect:toTableArraySec() | |
2189 | 2189 | for _, effect in pairs(effects) do |
2190 | - local pm1, pm2 = effect[1], effect[2] | |
2190 | + local pm1, pm2, pm3, pm4 = tonumber(effect[1]), tonumber(effect[2]), tonumber(effect[3]), tonumber(effect[4]) | |
2191 | 2191 | if not self.towerBnousActive[pm1] then |
2192 | 2192 | self.towerBnousActive[pm1] = {} |
2193 | 2193 | end |
... | ... | @@ -2195,19 +2195,19 @@ function RolePlugin.bind(Role) |
2195 | 2195 | if not self.towerBnousActive[pm1][pm2] then |
2196 | 2196 | self.towerBnousActive[pm1][pm2] = {} |
2197 | 2197 | end |
2198 | - table.insert(self.towerBnousActive[pm1][pm2],effect[3]) | |
2198 | + table.insert(self.towerBnousActive[pm1][pm2],pm3) | |
2199 | 2199 | elseif pm1 == SystemBnousType.Adv then |
2200 | - if not self.towerBnousActive[pm1][effect[4]] then | |
2201 | - self.towerBnousActive[pm1][effect[4]] = {} | |
2200 | + if not self.towerBnousActive[pm1][pm4] then | |
2201 | + self.towerBnousActive[pm1][pm4] = {} | |
2202 | 2202 | end |
2203 | - self.towerBnousActive[pm1][effect[4]][pm2] = (self.towerBnousActive[pm1][effect[4]][pm2] or 0) + effect[3] | |
2203 | + self.towerBnousActive[pm1][pm4][pm2] = (self.towerBnousActive[pm1][pm4][pm2] or 0) + pm3 | |
2204 | 2204 | elseif pm1 == SystemBnousType.HangTime then |
2205 | 2205 | if type(self.towerBnousActive[pm1]) == "table" then |
2206 | 2206 | self.towerBnousActive[pm1] = 0 |
2207 | 2207 | end |
2208 | 2208 | self.towerBnousActive[pm1] = self.towerBnousActive[pm1] + pm2 |
2209 | 2209 | else |
2210 | - self.towerBnousActive[pm1][pm2] = (self.towerBnousActive[pm1][pm2] or 0) + effect[3] | |
2210 | + self.towerBnousActive[pm1][pm2] = (self.towerBnousActive[pm1][pm2] or 0) + pm3 | |
2211 | 2211 | end |
2212 | 2212 | end |
2213 | 2213 | end | ... | ... |