Commit 09da2d40673fa1cb3542d43874fc9f0901dcc44b
Merge branch 'tr/develop' into tr/bugfix-qa
Showing
3 changed files
with
15 additions
and
0 deletions
Show diff stats
src/GlobalVar.lua
@@ -80,6 +80,7 @@ ItemType = { | @@ -80,6 +80,7 @@ ItemType = { | ||
80 | SpeedBox = 16, -- 加速箱子 | 80 | SpeedBox = 16, -- 加速箱子 |
81 | SelectItemBox = 17, -- 自选箱子 | 81 | SelectItemBox = 17, -- 自选箱子 |
82 | CommonPaster = 18, -- 万能贴纸 | 82 | CommonPaster = 18, -- 万能贴纸 |
83 | + BossTicket = 20, -- boss挑战门票 | ||
83 | } | 84 | } |
84 | 85 | ||
85 | --在这个里面的会记录的是功能开放 对应类型open 而不是 ID | 86 | --在这个里面的会记录的是功能开放 对应类型open 而不是 ID |
src/models/Activity.lua
@@ -1039,6 +1039,14 @@ activityFunc[Activity.ActivityType.BattleCommand] = { | @@ -1039,6 +1039,14 @@ activityFunc[Activity.ActivityType.BattleCommand] = { | ||
1039 | ["init"] = function (self, actType, isCrossDay, notify, actId) | 1039 | ["init"] = function (self, actType, isCrossDay, notify, actId) |
1040 | local data = {unlock = 0, freeR = "", payR = "", lvl = 0, sum = 0, week = 0} | 1040 | local data = {unlock = 0, freeR = "", payR = "", lvl = 0, sum = 0, week = 0} |
1041 | self:updateActData(actType, data, not notify) | 1041 | self:updateActData(actType, data, not notify) |
1042 | + | ||
1043 | + local rechargeRecord = self.owner.storeData:getProperty("payR") | ||
1044 | + for id, cfg in pairs(csvdb["shop_rechargeCsv"]) do | ||
1045 | + if cfg.shop == 2 and cfg.type == CardType.ActBattleCommandCard then | ||
1046 | + rechargeRecord[id] = nil | ||
1047 | + end | ||
1048 | + end | ||
1049 | + self.owner.storeData:updateProperty({field="payR", value=rechargeRecord}) | ||
1042 | end, | 1050 | end, |
1043 | ["check"] = function(self, actType, notify, id, count) -- 检查 itemid, count | 1051 | ["check"] = function(self, actType, notify, id, count) -- 检查 itemid, count |
1044 | local isOpen, actId = self:isOpen(actType) | 1052 | local isOpen, actId = self:isOpen(actType) |
src/models/RolePlugin.lua
@@ -134,6 +134,12 @@ function RolePlugin.bind(Role) | @@ -134,6 +134,12 @@ function RolePlugin.bind(Role) | ||
134 | [ItemType.Potion] = function () | 134 | [ItemType.Potion] = function () |
135 | self:addPotion({id = itemId, count = count, notNotify = pms.notNotify, log = pms.log}) | 135 | self:addPotion({id = itemId, count = count, notNotify = pms.notNotify, log = pms.log}) |
136 | end, | 136 | end, |
137 | + [ItemType.BossTicket] = function () | ||
138 | + if not self.activity:isOpen("ChallengeLevel") then return end | ||
139 | + local actData = self.activity:getActData("ChallengeLevel") | ||
140 | + actData["ticket"] = (actData["ticket"] or 0) + count | ||
141 | + self.activity:updateActData("ChallengeLevel", actData) | ||
142 | + end, | ||
137 | } | 143 | } |
138 | 144 | ||
139 | if count > 0 then | 145 | if count > 0 then |