Commit 80d5c0768a8d27220e3d5a62cd5e89f0bff93651
Merge branch 'tr/bugfix' into tr/publish/release
# Conflicts: # src/csvdata
Showing
5 changed files
with
16 additions
and
9 deletions
Show diff stats
src/actions/HangAction.lua
| ... | ... | @@ -755,23 +755,23 @@ end |
| 755 | 755 | local function workWinReward(role, bonusData, rewardType, count, sweep) |
| 756 | 756 | count = count or 1 |
| 757 | 757 | local reward, change = {} |
| 758 | + | |
| 759 | + | |
| 760 | + reward = bonusData.reward:toNumMap() | |
| 761 | + for itemId, c in pairs(reward) do | |
| 762 | + reward[itemId] = c * count | |
| 763 | + end | |
| 758 | 764 | if rewardType == 2 or rewardType == 4 then |
| 759 | 765 | for k, v in pairs(bonusData.perfect_reward:toNumMap()) do |
| 760 | 766 | reward[k] = (reward[k] or 0) + v |
| 761 | 767 | end |
| 762 | 768 | end |
| 763 | - | |
| 764 | - reward = bonusData.reward:toNumMap() | |
| 765 | - for itemId, c in pairs(reward) do | |
| 766 | - reward[itemId] = (reward[itemId] or 0) + c * count | |
| 767 | - end | |
| 768 | 769 | for i = 1, count do |
| 769 | 770 | local chance = bonusData.chance:randWeight(true) |
| 770 | 771 | if chance[1] ~= 0 then |
| 771 | 772 | reward[chance[1]] = (reward[chance[1]] or 0) + chance[2] |
| 772 | 773 | end |
| 773 | 774 | end |
| 774 | - | |
| 775 | 775 | reward, change = role:award(reward, {log = {desc = "workBattle", int1 = bonusData.id}}) |
| 776 | 776 | return reward, change |
| 777 | 777 | end | ... | ... |
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) | ... | ... |