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
src/actions/HeroAction.lua
... | ... | @@ -147,9 +147,11 @@ function _M.wakeRpc(agent, data) |
147 | 147 | local oldBattleV = hero:getProperty("battleV") |
148 | 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 | 152 | if curLevel == 3 then -- 解锁cg |
152 | 153 | role:checkTaskEnter("WakeCG", {heroType = typ}) |
154 | + role:checkTaskEnter("WakeCGSum", {count = 1}) | |
153 | 155 | end |
154 | 156 | |
155 | 157 | if curLevel >= 4 then --自动觉醒技能 |
... | ... | @@ -173,6 +175,7 @@ function _M.wakeRpc(agent, data) |
173 | 175 | SendPacket(actionCodes.Hero_wakeRpc, '') |
174 | 176 | |
175 | 177 | role:checkTaskEnter("HeroStarCollect", {}) |
178 | + role:checkTaskEnter("HeroStartSum", {}) | |
176 | 179 | return true |
177 | 180 | end |
178 | 181 | |
... | ... | @@ -212,7 +215,7 @@ function _M.talentRpc(agent, data) |
212 | 215 | talent = talent:setv(1, curLevel + 1) |
213 | 216 | end |
214 | 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 | 220 | hero:updateProperty({field = "talent", value = talent}) |
218 | 221 | ... | ... |
src/models/RoleCross.lua
... | ... | @@ -167,8 +167,10 @@ RoleCross.bind = function (Role) |
167 | 167 | }) |
168 | 168 | self:checkTaskEnter("Wake", {heroType = heroId, wakeL = initData.heros.wakeL}) |
169 | 169 | self:checkTaskEnter("WakeCG", {heroType = heroId}) |
170 | - self:checkTaskEnter("WakeCGSum", {count = 1}) | |
171 | 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 | 175 | end |
174 | 176 | end | ... | ... |
src/models/RolePlugin.lua
... | ... | @@ -623,6 +623,8 @@ function RolePlugin.bind(Role) |
623 | 623 | end |
624 | 624 | self:checkTaskEnter("AddHero", {heroType = heroType, wakeL = newHero:getProperty("wakeL"), camp = unitData.camp, job = unitData.job, ssrCount = ssrCount}, params.notNotify) |
625 | 625 | self:checkTaskEnter("HeroQualityCollect", {}) |
626 | + self:checkTaskEnter("HeroStartSum", {}) | |
627 | + | |
626 | 628 | if not params.notNotify then |
627 | 629 | local heroResponse = {} |
628 | 630 | table.insert(heroResponse, newHero:data()) | ... | ... |
src/models/RoleTask.lua
... | ... | @@ -282,6 +282,7 @@ local StoreListener = { |
282 | 282 | [TaskType.RuneUp] = {{TriggerEventType.RuneUp, 1}}, |
283 | 283 | [TaskType.CostDiamond] = {{TriggerEventType.CostDiamond, f("count")}}, |
284 | 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 | 96 | self:flushWeekShop() |
97 | 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 | 106 | local function getCardItemDailyReward(self, id) |
100 | - local cur_ex = self:getSMonthCardPeriods(self, id) | |
107 | + local cur_ex = getSMonthCardPeriods(self, id) | |
101 | 108 | if cur_ex == 0 then return nil, nil end |
102 | 109 | cur_ex = cur_ex - 1 |
103 | 110 | |
... | ... | @@ -293,8 +300,8 @@ end |
293 | 300 | function Store:getSMonthCardDailyReward(id) |
294 | 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 | 307 | self:updateProperty({field = "smonthCardReceive", value = 1}) |
... | ... | @@ -330,14 +337,8 @@ function Store:firstBuySMonthCard(id) |
330 | 337 | return nil |
331 | 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 | 340 | function Store:isSMonthCardExpired(id) |
340 | - return self:getSMonthCardPeriods(id) == 0 | |
341 | + return getSMonthCardPeriods(self, id) == 0 | |
341 | 342 | end |
342 | 343 | |
343 | 344 | function Store:buySMonthCardLimit(buylimit) |
... | ... | @@ -627,7 +628,7 @@ function Store:OnTriggerLimitTimePack(eventType, param) |
627 | 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 | 632 | if typeMap[eventType] then |
632 | 633 | local dayInfo = self:getProperty("dayLimitInfo") |
633 | 634 | local info = dayInfo[eventType] or {} | ... | ... |