Commit 8eaed74efbdef19ab05996347e921eb9b4bd43a6
1 parent
30f12b27
战令活动开启时清除购买记录,新增Boss挑战门票类型道具 type=20
Showing
3 changed files
with
15 additions
and
0 deletions
Show diff stats
src/GlobalVar.lua
src/models/Activity.lua
... | ... | @@ -1039,6 +1039,14 @@ activityFunc[Activity.ActivityType.BattleCommand] = { |
1039 | 1039 | ["init"] = function (self, actType, isCrossDay, notify, actId) |
1040 | 1040 | local data = {unlock = 0, freeR = "", payR = "", lvl = 0, sum = 0, week = 0} |
1041 | 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 | 1050 | end, |
1043 | 1051 | ["check"] = function(self, actType, notify, id, count) -- 检查 itemid, count |
1044 | 1052 | local isOpen, actId = self:isOpen(actType) | ... | ... |
src/models/RolePlugin.lua
... | ... | @@ -134,6 +134,12 @@ function RolePlugin.bind(Role) |
134 | 134 | [ItemType.Potion] = function () |
135 | 135 | self:addPotion({id = itemId, count = count, notNotify = pms.notNotify, log = pms.log}) |
136 | 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 | 145 | if count > 0 then | ... | ... |