This commit is contained in:
puxuan 2025-10-09 19:57:12 +08:00
parent 838473cdcb
commit acc06f613a

View File

@ -158,23 +158,23 @@ function ChapterManager:endFightFinish(result)
-- 试玩
local fightChapterId = result.reqData.chapter_id or 0
if not reqData.win and DataManager.ShopData:getIntroductGiftTriggerTime() > 0 then -- 入门礼包触发过后, 触发试玩
if fightChapterId >= GConst.HeroConst.TRIAL_HERO_MIN_CHAPTER and fightChapterId <= GConst.HeroConst.TRIAL_HERO_MAX_CHAPTER then
DataManager.ChapterData:cacheTrailHeroIdAndChapterId(GConst.HeroConst.TRIAL_HERO_ID, fightChapterId)
else
DataManager.ChapterData:cacheTrailHeroIdAndChapterId()
end
else
DataManager.ChapterData:cacheTrailHeroIdAndChapterId()
end
-- if not reqData.win and DataManager.ShopData:getIntroductGiftTriggerTime() > 0 then -- 入门礼包触发过后, 触发试玩
-- if fightChapterId >= GConst.HeroConst.TRIAL_HERO_MIN_CHAPTER and fightChapterId <= GConst.HeroConst.TRIAL_HERO_MAX_CHAPTER then
-- DataManager.ChapterData:cacheTrailHeroIdAndChapterId(GConst.HeroConst.TRIAL_HERO_ID, fightChapterId)
-- else
-- DataManager.ChapterData:cacheTrailHeroIdAndChapterId()
-- end
-- else
-- DataManager.ChapterData:cacheTrailHeroIdAndChapterId()
-- end
-- 第二章战斗结算,触发成长礼包
if result.reqData.chapter_id == GConst.ShopConst.INTRODUCTORY_GIFT_TRIGGER_CHAPTER_ID then
DataManager.ShopData:onTriggerIntroductGift()
end
-- if result.reqData.chapter_id == GConst.ShopConst.INTRODUCTORY_GIFT_TRIGGER_CHAPTER_ID then
-- DataManager.ShopData:onTriggerIntroductGift()
-- end
if not reqData.win then
DataManager.ShopData:markPopLastChapterActGift()
-- DataManager.ShopData:markPopLastChapterActGift()
if DataManager.ChapterData:getChapterFightCount(fightChapterId) == 1 then -- 首次失败上报
BIReport:postFirstDayGradeFailEvent(fightChapterId)
end