Commit c6a4c4567fcbeb999beee5968d25b83d82f77287

Authored by liuzujun
1 parent 7e709ff0

boss挑战门票购买可以超出上限

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")
... ...
1   -Subproject commit ec92ed50d3d5ff9655b1715239e7fda48f8ef5cb
  1 +Subproject commit 2499d73adbdf6ea3562ce3a815d3189e3a3aab7c
... ...
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
... ... @@ -58,6 +58,7 @@ local ItemReason = {
58 58 newSign = 142,-- 新的活动签到
59 59 advLevelStage = 143, -- 拾荒活动阶段奖励
60 60 towerBnous = 144, -- 爬塔到一定层数对某些功能的奖励
  61 + unknowShop = 145, -- 未知商店
61 62  
62 63  
63 64 advHang = 301, -- 拾荒挂机
... ...
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)
... ...