Commit c6a4c4567fcbeb999beee5968d25b83d82f77287
1 parent
7e709ff0
boss挑战门票购买可以超出上限
Showing
5 changed files
with
11 additions
and
4 deletions
Show diff stats
src/actions/StoreAction.lua
... | ... | @@ -182,7 +182,7 @@ function _M.shopBuyRpc(agent , data) |
182 | 182 | |
183 | 183 | local cost = {[dataSet.icon] = dataSet.cost * count} |
184 | 184 | |
185 | - local desc = "unknown" | |
185 | + local desc = "unknowShop" | |
186 | 186 | if dataSet.shop == 1 then -- 普通商店 |
187 | 187 | desc = "dailyShop" |
188 | 188 | local dailySDD = role.dailyData:getProperty("dailySDD") | ... | ... |
src/models/Activity.lua
... | ... | @@ -884,6 +884,11 @@ function Activity:getBattleTicket(actId) |
884 | 884 | local ticketId, init, limit, duration = arr[1] or 0, arr[2] or 0, arr[3] or 0, arr[4] or 10000 |
885 | 885 | |
886 | 886 | local count = actData["ticket"] or init |
887 | + if count >= limit then | |
888 | + actData["ts"] = timeNow | |
889 | + self:updateActData("ChallengeLevel", actData) | |
890 | + return | |
891 | + end | |
887 | 892 | local add = math.max(math.floor((timeNow - startTs) / (duration * 60)), 0) |
888 | 893 | |
889 | 894 | local newCount= math.min(count + add, limit) | ... | ... |
src/models/RoleLog.lua
src/models/RolePlugin.lua
... | ... | @@ -141,7 +141,9 @@ function RolePlugin.bind(Role) |
141 | 141 | self:addPotion({id = itemId, count = count, notNotify = pms.notNotify, log = pms.log}) |
142 | 142 | end, |
143 | 143 | [ItemType.BossTicket] = function () |
144 | - if not self.activity:isOpen("ChallengeLevel") then return end | |
144 | + local isOpen, actId = self.activity:isOpen("ChallengeLevel") | |
145 | + if not isOpen then return end | |
146 | + self.activity:getBattleTicket(actId) | |
145 | 147 | local actData = self.activity:getActData("ChallengeLevel") |
146 | 148 | actData["ticket"] = (actData["ticket"] or 0) + count |
147 | 149 | self.activity:updateActData("ChallengeLevel", actData) |
... | ... | @@ -852,7 +854,6 @@ function RolePlugin.bind(Role) |
852 | 854 | if not params.notNotify then |
853 | 855 | local response = {} |
854 | 856 | table.insert(response, newSpark:data()) |
855 | - dump(response) | |
856 | 857 | SendPacket(actionCodes.Role_loadSparks, MsgPack.pack(response)) |
857 | 858 | end |
858 | 859 | --self:checkTaskEnter("AddRune", {id = params.id, type = params.type, rarity = data.rarity}, params.notNotify) | ... | ... |