Commit 0027184a2abfb69b4f5e587f53f2c81028856f14
Merge branch 'develop' into tr/qa
Showing
6 changed files
with
15 additions
and
8 deletions
Show diff stats
src/actions/RoleAction.lua
@@ -264,7 +264,8 @@ function _M.loginRpc( agent, data ) | @@ -264,7 +264,8 @@ function _M.loginRpc( agent, data ) | ||
264 | 264 | ||
265 | -- 发下缓存的世界消息 | 265 | -- 发下缓存的世界消息 |
266 | local worldChatResponse = {worldChats = {}} | 266 | local worldChatResponse = {worldChats = {}} |
267 | - local ok, msgs = pcall(skynet.call, '.globald', "lua", "getWorldMsg", role._channelIdx) | 267 | + -- local ok, msgs = pcall(skynet.call, '.globald', "lua", "getWorldMsg", role._channelIdx) |
268 | + local ok, msgs = true, {} | ||
268 | if not ok then | 269 | if not ok then |
269 | msgs = {} | 270 | msgs = {} |
270 | end | 271 | end |
@@ -945,7 +946,7 @@ function _M.chatRpc(agent, data) | @@ -945,7 +946,7 @@ function _M.chatRpc(agent, data) | ||
945 | end | 946 | end |
946 | end | 947 | end |
947 | mcast_util.pub_world(actionCodes.Role_chat, MsgPack.pack(response)) | 948 | mcast_util.pub_world(actionCodes.Role_chat, MsgPack.pack(response)) |
948 | - pcall(skynet.send, '.globald', "lua", "sendWorldMsg", role._channelIdx, response) | 949 | + -- pcall(skynet.send, '.globald', "lua", "sendWorldMsg", role._channelIdx, response) |
949 | role:mylog("role_action", {desc = "chatWorld", text1 = content}) | 950 | role:mylog("role_action", {desc = "chatWorld", text1 = content}) |
950 | end, | 951 | end, |
951 | -- 私聊 | 952 | -- 私聊 |
src/actions/TowerAction.lua
@@ -62,7 +62,7 @@ function _M.startBattleRpc(agent, data) | @@ -62,7 +62,7 @@ function _M.startBattleRpc(agent, data) | ||
62 | 62 | ||
63 | if not csvdb["tower_battleCsv"][id] then return end | 63 | if not csvdb["tower_battleCsv"][id] then return end |
64 | local curCount, nextTime = getUpdateTime(towerInfo.c, towerInfo.t) | 64 | local curCount, nextTime = getUpdateTime(towerInfo.c, towerInfo.t) |
65 | - if curCount < 1 then return end -- 没有次数返回 | 65 | + --if curCount < 1 then return end -- 没有次数返回 |
66 | 66 | ||
67 | --搞起来 | 67 | --搞起来 |
68 | towerInfo.c = curCount - 1 | 68 | towerInfo.c = curCount - 1 |
@@ -136,10 +136,15 @@ end | @@ -136,10 +136,15 @@ end | ||
136 | 136 | ||
137 | function _M.bugCountRpc(agent, data) | 137 | function _M.bugCountRpc(agent, data) |
138 | local role = agent.role | 138 | local role = agent.role |
139 | + local msg = MsgPack.unpack(data) | ||
140 | + local buyCount = msg.count | ||
139 | 141 | ||
140 | local towerInfo = role:getProperty("towerInfo") | 142 | local towerInfo = role:getProperty("towerInfo") |
141 | local curCount, nextTime = getUpdateTime(towerInfo.c, towerInfo.t) | 143 | local curCount, nextTime = getUpdateTime(towerInfo.c, towerInfo.t) |
142 | local needCount = globalCsv.tower_count_limit - curCount | 144 | local needCount = globalCsv.tower_count_limit - curCount |
145 | + if needCount > buyCount then | ||
146 | + needCount = buyCount | ||
147 | + end | ||
143 | if needCount > 0 then -- 补充 | 148 | if needCount > 0 then -- 补充 |
144 | local cost = globalCsv.tower_chance_item:toNumMap() | 149 | local cost = globalCsv.tower_chance_item:toNumMap() |
145 | for k , v in pairs(cost) do | 150 | for k , v in pairs(cost) do |
@@ -147,7 +152,7 @@ function _M.bugCountRpc(agent, data) | @@ -147,7 +152,7 @@ function _M.bugCountRpc(agent, data) | ||
147 | end | 152 | end |
148 | if not role:checkItemEnough(cost) then return end | 153 | if not role:checkItemEnough(cost) then return end |
149 | role:costItems(cost, {log = {desc = "towerCount"}}) | 154 | role:costItems(cost, {log = {desc = "towerCount"}}) |
150 | - curCount = globalCsv.tower_count_limit | 155 | + curCount = curCount + needCount |
151 | end | 156 | end |
152 | towerInfo.c = curCount | 157 | towerInfo.c = curCount |
153 | towerInfo.t = nextTime | 158 | towerInfo.t = nextTime |
src/adv/AdvPlayer.lua
@@ -670,7 +670,7 @@ function Player:effectBattleBuff() | @@ -670,7 +670,7 @@ function Player:effectBattleBuff() | ||
670 | for _, buff in ipairs(self.buffs) do | 670 | for _, buff in ipairs(self.buffs) do |
671 | if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then | 671 | if not buff:isHide() and (buff:getType() == Buff.BATTLE_BUFF or buff:getType() == Buff.BATTLE_PASSIVE) then |
672 | buff:effect() | 672 | buff:effect() |
673 | - if not buff.buffData.classify:sismember(7, " ") then -- 神器buff 不会清除 | 673 | + if not buff.buffData.classify:sismember(7, " ") and not buff.buffData.classify:sismember(8, " ") then -- 神器buff 不会清除 队长技 |
674 | buff:uncover() | 674 | buff:uncover() |
675 | end | 675 | end |
676 | end | 676 | end |
src/models/RolePlugin.lua
@@ -1196,7 +1196,8 @@ function RolePlugin.bind(Role) | @@ -1196,7 +1196,8 @@ function RolePlugin.bind(Role) | ||
1196 | end | 1196 | end |
1197 | 1197 | ||
1198 | while newExp >= csvdb["adv_level_fundCsv"][level].exp do | 1198 | while newExp >= csvdb["adv_level_fundCsv"][level].exp do |
1199 | - if csvdb["adv_level_fundCsv"][level + 1] and self:advChapterIsOpen(100 + csvdb["adv_level_fundCsv"][level + 1].chapter) then -- 有下一级 | 1199 | + --if csvdb["adv_level_fundCsv"][level + 1] and self:advChapterIsOpen(100 + csvdb["adv_level_fundCsv"][level + 1].chapter) then -- 有下一级 |
1200 | + if csvdb["adv_level_fundCsv"][level + 1] then -- 有下一级 | ||
1200 | newExp = newExp - csvdb["adv_level_fundCsv"][level].exp | 1201 | newExp = newExp - csvdb["adv_level_fundCsv"][level].exp |
1201 | level = level + 1 | 1202 | level = level + 1 |
1202 | else | 1203 | else |
src/models/RoleTask.lua
@@ -245,7 +245,7 @@ local CalendaTaskListener = { | @@ -245,7 +245,7 @@ local CalendaTaskListener = { | ||
245 | listen = { | 245 | listen = { |
246 | [TaskType.DrawHero] = {{1, 1, f("count")}}, | 246 | [TaskType.DrawHero] = {{1, 1, f("count")}}, |
247 | [TaskType.BonusPass]= {{2, 1}}, | 247 | [TaskType.BonusPass]= {{2, 1}}, |
248 | - [TaskType.AdvPass]= {{3, 1}}, | 248 | + [TaskType.AdvStart]= {{3, 1}}, |
249 | [TaskType.DinerLevelUp]= {{4, 2, f("level")}}, | 249 | [TaskType.DinerLevelUp]= {{4, 2, f("level")}}, |
250 | [TaskType.HeroLvlCollect]= {{5, 3}}, -- x名y级英雄 | 250 | [TaskType.HeroLvlCollect]= {{5, 3}}, -- x名y级英雄 |
251 | [TaskType.AdvHang]= {{6, 1}}, ---- | 251 | [TaskType.AdvHang]= {{6, 1}}, ---- |