Commit 485c8c35645a894f76e3588a369703e6367d3a35
1 parent
8e892c71
活动礼包购买记录活动过期清理
Showing
4 changed files
with
21 additions
and
3 deletions
Show diff stats
src/GlobalVar.lua
| @@ -292,6 +292,10 @@ CardType = { | @@ -292,6 +292,10 @@ CardType = { | ||
| 292 | BattlePassCard = 7, -- 探索指令 | 292 | BattlePassCard = 7, -- 探索指令 |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | +ShopPackType = { | ||
| 296 | + ActShopPack = 5, -- 活动礼包 | ||
| 297 | +} | ||
| 298 | + | ||
| 295 | HeroQuality = { | 299 | HeroQuality = { |
| 296 | N = 1, | 300 | N = 1, |
| 297 | R = 2, | 301 | R = 2, |
src/models/Activity.lua
| @@ -705,5 +705,19 @@ function Activity:getBattleTicket(actId) | @@ -705,5 +705,19 @@ function Activity:getBattleTicket(actId) | ||
| 705 | end | 705 | end |
| 706 | end | 706 | end |
| 707 | 707 | ||
| 708 | +activityFunc[Activity.ActivityType.ActShopGoods] = { | ||
| 709 | + ["init"] = function(self, actType, isCrossDay, notify, actId) | ||
| 710 | + end, | ||
| 711 | + ["close"] = function(self, actType, notify) | ||
| 712 | + local rechargeRecord = self.owner.storeData:getProperty("payR") | ||
| 713 | + for id, cfg in pairs(csvdb["shop_rechargeCsv"]) do | ||
| 714 | + if cfg.shop == 3 and cfg.type == ShopPackType.ActShopPack then | ||
| 715 | + rechargeRecord[id] = nil | ||
| 716 | + end | ||
| 717 | + end | ||
| 718 | + self.owner.storeData:updateProperty({field="payR", value=rechargeRecord}) | ||
| 719 | + end, | ||
| 720 | +} | ||
| 721 | + | ||
| 708 | 722 | ||
| 709 | return Activity | 723 | return Activity |
src/models/RolePlugin.lua
| @@ -1582,9 +1582,9 @@ function RolePlugin.bind(Role) | @@ -1582,9 +1582,9 @@ function RolePlugin.bind(Role) | ||
| 1582 | end | 1582 | end |
| 1583 | 1583 | ||
| 1584 | --判断是否是活动商品 | 1584 | --判断是否是活动商品 |
| 1585 | - local actCfg = csvdb["activity_ctrlCsv"][rechargeData.actid] | 1585 | + local actCfg = csvdb["activity_ctrlCsv"][rechargeData.activity_id] |
| 1586 | if not actCfg then return "" end | 1586 | if not actCfg then return "" end |
| 1587 | - if not self.activity:isOpenById(rechargeData.actid, "ActShopGoods") then return "" end | 1587 | + if not self.activity:isOpenById(rechargeData.activity_id, "ActShopGoods") then return "" end |
| 1588 | 1588 | ||
| 1589 | local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) | 1589 | local orderId = redisproxy:hget(string.format(R_ORDERS, roleId), rechargeId) |
| 1590 | if orderId then | 1590 | if orderId then |