Commit 7f29530e62e124f4fbc31ef1ab823b6a3e072cba
Merge branch 'cn/develop' of 120.26.43.151:wasteland/server into cn/develop
Showing
6 changed files
with
24 additions
and
14 deletions
Show diff stats
src/GlobalVar.lua
@@ -391,6 +391,7 @@ TriggerEventType = { | @@ -391,6 +391,7 @@ TriggerEventType = { | ||
391 | RuneUp = 12, -- 循环强化符文 | 391 | RuneUp = 12, -- 循环强化符文 |
392 | CostDiamond = 13, -- 循环消耗钻石 | 392 | CostDiamond = 13, -- 循环消耗钻石 |
393 | BuyLimitPack = 14, --购买指定id礼包 触发 | 393 | BuyLimitPack = 14, --购买指定id礼包 触发 |
394 | + HeroTalent = 15, --英雄精进 触发礼包 | ||
394 | } | 395 | } |
395 | 396 | ||
396 | DrawCardType = { | 397 | DrawCardType = { |
src/actions/HeroAction.lua
@@ -147,9 +147,11 @@ function _M.wakeRpc(agent, data) | @@ -147,9 +147,11 @@ function _M.wakeRpc(agent, data) | ||
147 | local oldBattleV = hero:getProperty("battleV") | 147 | local oldBattleV = hero:getProperty("battleV") |
148 | hero:updateProperty({field = "wakeL", delta = 1}) | 148 | hero:updateProperty({field = "wakeL", delta = 1}) |
149 | 149 | ||
150 | - role:checkTaskEnter("Wake", {heroType = typ, wakeL = curLevel + 1}) | 150 | + curLevel = curLevel + 1 |
151 | + role:checkTaskEnter("Wake", {heroType = typ, wakeL = curLevel}) | ||
151 | if curLevel == 3 then -- 解锁cg | 152 | if curLevel == 3 then -- 解锁cg |
152 | role:checkTaskEnter("WakeCG", {heroType = typ}) | 153 | role:checkTaskEnter("WakeCG", {heroType = typ}) |
154 | + role:checkTaskEnter("WakeCGSum", {count = 1}) | ||
153 | end | 155 | end |
154 | 156 | ||
155 | if curLevel >= 4 then --自动觉醒技能 | 157 | if curLevel >= 4 then --自动觉醒技能 |
@@ -173,6 +175,7 @@ function _M.wakeRpc(agent, data) | @@ -173,6 +175,7 @@ function _M.wakeRpc(agent, data) | ||
173 | SendPacket(actionCodes.Hero_wakeRpc, '') | 175 | SendPacket(actionCodes.Hero_wakeRpc, '') |
174 | 176 | ||
175 | role:checkTaskEnter("HeroStarCollect", {}) | 177 | role:checkTaskEnter("HeroStarCollect", {}) |
178 | + role:checkTaskEnter("HeroStartSum", {}) | ||
176 | return true | 179 | return true |
177 | end | 180 | end |
178 | 181 | ||
@@ -212,7 +215,7 @@ function _M.talentRpc(agent, data) | @@ -212,7 +215,7 @@ function _M.talentRpc(agent, data) | ||
212 | talent = talent:setv(1, curLevel + 1) | 215 | talent = talent:setv(1, curLevel + 1) |
213 | end | 216 | end |
214 | curStage = talent:getv(0, 1) | 217 | curStage = talent:getv(0, 1) |
215 | - role:checkTaskEnter("HeroTalent", {heroType = hero:getProperty("type"), alv = curStage}) | 218 | + role:checkTaskEnter("HeroTalent", {heroType = hero:getProperty("type"), alv = curStage, count = 1}) |
216 | 219 | ||
217 | hero:updateProperty({field = "talent", value = talent}) | 220 | hero:updateProperty({field = "talent", value = talent}) |
218 | 221 |
src/models/RoleCross.lua
@@ -167,8 +167,10 @@ RoleCross.bind = function (Role) | @@ -167,8 +167,10 @@ RoleCross.bind = function (Role) | ||
167 | }) | 167 | }) |
168 | self:checkTaskEnter("Wake", {heroType = heroId, wakeL = initData.heros.wakeL}) | 168 | self:checkTaskEnter("Wake", {heroType = heroId, wakeL = initData.heros.wakeL}) |
169 | self:checkTaskEnter("WakeCG", {heroType = heroId}) | 169 | self:checkTaskEnter("WakeCG", {heroType = heroId}) |
170 | - self:checkTaskEnter("WakeCGSum", {count = 1}) | ||
171 | self:checkTaskEnter("HeroTalent", {heroType = heroId, alv = aheadLevel}) | 170 | self:checkTaskEnter("HeroTalent", {heroType = heroId, alv = aheadLevel}) |
171 | + if initData.heros.wakeL == 3 then | ||
172 | + self:checkTaskEnter("WakeCGSum", {count = 1}) | ||
173 | + end | ||
172 | 174 | ||
173 | end | 175 | end |
174 | end | 176 | end |
src/models/RolePlugin.lua
@@ -623,6 +623,8 @@ function RolePlugin.bind(Role) | @@ -623,6 +623,8 @@ function RolePlugin.bind(Role) | ||
623 | end | 623 | end |
624 | self:checkTaskEnter("AddHero", {heroType = heroType, wakeL = newHero:getProperty("wakeL"), camp = unitData.camp, job = unitData.job, ssrCount = ssrCount}, params.notNotify) | 624 | self:checkTaskEnter("AddHero", {heroType = heroType, wakeL = newHero:getProperty("wakeL"), camp = unitData.camp, job = unitData.job, ssrCount = ssrCount}, params.notNotify) |
625 | self:checkTaskEnter("HeroQualityCollect", {}) | 625 | self:checkTaskEnter("HeroQualityCollect", {}) |
626 | + self:checkTaskEnter("HeroStartSum", {}) | ||
627 | + | ||
626 | if not params.notNotify then | 628 | if not params.notNotify then |
627 | local heroResponse = {} | 629 | local heroResponse = {} |
628 | table.insert(heroResponse, newHero:data()) | 630 | table.insert(heroResponse, newHero:data()) |
src/models/RoleTask.lua
@@ -282,6 +282,7 @@ local StoreListener = { | @@ -282,6 +282,7 @@ local StoreListener = { | ||
282 | [TaskType.RuneUp] = {{TriggerEventType.RuneUp, 1}}, | 282 | [TaskType.RuneUp] = {{TriggerEventType.RuneUp, 1}}, |
283 | [TaskType.CostDiamond] = {{TriggerEventType.CostDiamond, f("count")}}, | 283 | [TaskType.CostDiamond] = {{TriggerEventType.CostDiamond, f("count")}}, |
284 | [TaskType.BuyLimitPack] = {{TriggerEventType.BuyLimitPack, f("id")}}, | 284 | [TaskType.BuyLimitPack] = {{TriggerEventType.BuyLimitPack, f("id")}}, |
285 | + [TaskType.HeroTalent] = {{TriggerEventType.HeroTalent, f("count")}}, | ||
285 | } | 286 | } |
286 | } | 287 | } |
287 | 288 |
src/models/Store.lua
@@ -96,8 +96,15 @@ function Store:refreshWeekData(notify) | @@ -96,8 +96,15 @@ function Store:refreshWeekData(notify) | ||
96 | self:flushWeekShop() | 96 | self:flushWeekShop() |
97 | end | 97 | end |
98 | 98 | ||
99 | + | ||
100 | +local function getSMonthCardPeriods(self, id) | ||
101 | + local smonthCards = self:getProperty("smonthCards") or {} | ||
102 | + local smonthCard = smonthCards[id] or {} | ||
103 | + return smonthCard["periods"] or 0 | ||
104 | +end | ||
105 | + | ||
99 | local function getCardItemDailyReward(self, id) | 106 | local function getCardItemDailyReward(self, id) |
100 | - local cur_ex = self:getSMonthCardPeriods(self, id) | 107 | + local cur_ex = getSMonthCardPeriods(self, id) |
101 | if cur_ex == 0 then return nil, nil end | 108 | if cur_ex == 0 then return nil, nil end |
102 | cur_ex = cur_ex - 1 | 109 | cur_ex = cur_ex - 1 |
103 | 110 | ||
@@ -293,8 +300,8 @@ end | @@ -293,8 +300,8 @@ end | ||
293 | function Store:getSMonthCardDailyReward(id) | 300 | function Store:getSMonthCardDailyReward(id) |
294 | if not id then return nil end | 301 | if not id then return nil end |
295 | 302 | ||
296 | - local before_ex = self:getSMonthCardPeriods(self, id) | ||
297 | - local reward, change, cur_ex= getCardItemDailyReward(id) | 303 | + local before_ex = getSMonthCardPeriods(self, id) |
304 | + local reward, change, cur_ex= getCardItemDailyReward(self, id) | ||
298 | 305 | ||
299 | --今日特刊奖励已经领取 | 306 | --今日特刊奖励已经领取 |
300 | self:updateProperty({field = "smonthCardReceive", value = 1}) | 307 | self:updateProperty({field = "smonthCardReceive", value = 1}) |
@@ -330,14 +337,8 @@ function Store:firstBuySMonthCard(id) | @@ -330,14 +337,8 @@ function Store:firstBuySMonthCard(id) | ||
330 | return nil | 337 | return nil |
331 | end | 338 | end |
332 | 339 | ||
333 | -function Store:getSMonthCardPeriods(id) | ||
334 | - local smonthCards = self:getProperty("smonthCards") or {} | ||
335 | - local smonthCard = smonthCards[id] or {} | ||
336 | - return smonthCard["periods"] or 0 | ||
337 | -end | ||
338 | - | ||
339 | function Store:isSMonthCardExpired(id) | 340 | function Store:isSMonthCardExpired(id) |
340 | - return self:getSMonthCardPeriods(id) == 0 | 341 | + return getSMonthCardPeriods(self, id) == 0 |
341 | end | 342 | end |
342 | 343 | ||
343 | function Store:buySMonthCardLimit(buylimit) | 344 | function Store:buySMonthCardLimit(buylimit) |
@@ -627,7 +628,7 @@ function Store:OnTriggerLimitTimePack(eventType, param) | @@ -627,7 +628,7 @@ function Store:OnTriggerLimitTimePack(eventType, param) | ||
627 | if not config then return end | 628 | if not config then return end |
628 | 629 | ||
629 | -- 每日循环弹窗 | 630 | -- 每日循环弹窗 |
630 | - local typeMap = {[TriggerEventType.DrawHero] = 1, [TriggerEventType.FoodSell] = 1, [TriggerEventType.RuneUp] = 1, [TriggerEventType.CostDiamond] = 1} | 631 | + local typeMap = {[TriggerEventType.DrawHero] = 1, [TriggerEventType.FoodSell] = 1, [TriggerEventType.RuneUp] = 1, [TriggerEventType.CostDiamond] = 1, [TriggerEventType.HeroTalent] = 1} |
631 | if typeMap[eventType] then | 632 | if typeMap[eventType] then |
632 | local dayInfo = self:getProperty("dayLimitInfo") | 633 | local dayInfo = self:getProperty("dayLimitInfo") |
633 | local info = dayInfo[eventType] or {} | 634 | local info = dayInfo[eventType] or {} |