Merge branch 'dev' of git.juzugame.com:b6-client/b6-lua into dev

This commit is contained in:
chenxi 2023-06-07 16:49:16 +08:00
commit 26ea46d608
3 changed files with 49 additions and 16 deletions

View File

@ -256,6 +256,18 @@ function BIReport:report(name, args)
if DataManager.PlayerData then if DataManager.PlayerData then
args.player_level = DataManager.PlayerData:getLv() args.player_level = DataManager.PlayerData:getLv()
end end
args.formation_atk = 0
args.formation_hp = 0
if DataManager.FormationData then
for matchType, heroId in pairs(DataManager.FormationData:getStageFormation()) do
local entity = DataManager.HeroData:getHeroById(heroId)
if entity then
args.formation_atk = args.formation_atk + entity:getAtk()
args.formation_hp = args.formation_hp + entity:getHp()
end
end
end
end end
args.current_version = CS.BF.BFMain.Instance.GameLaunchMgr:GetCurrentVersion() args.current_version = CS.BF.BFMain.Instance.GameLaunchMgr:GetCurrentVersion()
args.is_new_player = self.isNewPlayer args.is_new_player = self.isNewPlayer
@ -383,6 +395,14 @@ function BIReport:postGameLoginFinish()
-- is_daily_first = DataManager:getIsTodayFirstLogin(), -- is_daily_first = DataManager:getIsTodayFirstLogin(),
-- is_first = DataManager:getIsFirstLogin(), -- is_first = DataManager:getIsFirstLogin(),
} }
for heroId, entity in pairs(DataManager.HeroData:getAllHeroes()) do
if args.all_heros then
args.all_heros = args.all_heros .. "|"
else
args.all_heros = GConst.EMPTY_STRING
end
args.all_heros = args.all_heros .. heroId .. ":" .. entity:getLv()
end
self:report(EVENT_NAME_LOGIN_FINISH, args) self:report(EVENT_NAME_LOGIN_FINISH, args)
end end
@ -407,6 +427,21 @@ function BIReport:postFightBegin(battleType, wave, chapterId, maxChapter, startT
max_chapter = maxChapter, max_chapter = maxChapter,
start_times = startTimes, start_times = startTimes,
} }
local famation_level = 0
local formation = DataManager.FormationData:getStageFormation()
for matchType, heroId in pairs(formation) do
local entity = DataManager.HeroData:getHeroById(heroId)
if entity then
if args.formation then
args.formation = args.formation .. "|"
else
args.formation = GConst.EMPTY_STRING
end
args.formation = args.formation .. heroId .. ":" .. entity:getLv()
famation_level = famation_level + entity:getLv()
end
end
args.famation_level = famation_level
self:report(EVENT_NAME_FIGHT, args) self:report(EVENT_NAME_FIGHT, args)
end end
@ -444,22 +479,22 @@ function BIReport:postFightEnd(battleType, chapterId, wave, duration, totalTime,
is_first_win = isFirstWin, is_first_win = isFirstWin,
isFianlStep = isFianlStep, isFianlStep = isFianlStep,
} }
if isFianlStep then local famation_level = 0
local famation_level = 0 local formation = DataManager.FormationData:getStageFormation()
local formation = DataManager.FormationData:getStageFormation() for matchType, heroId in pairs(formation) do
for matchType, heroId in pairs(formation) do local entity = DataManager.HeroData:getHeroById(heroId)
local entity = DataManager.HeroData:getHeroById(heroId) if entity then
if entity then if args.formation then
if args.formation then args.formation = args.formation .. "|"
args.formation = args.formation .. "|" else
else args.formation = GConst.EMPTY_STRING
args.formation = GConst.EMPTY_STRING
end
args.formation = args.formation .. heroId .. ":" .. entity:getLv()
famation_level = famation_level + entity:getLv()
end end
args.formation = args.formation .. heroId .. ":" .. entity:getLv()
famation_level = famation_level + entity:getLv()
end end
args.famation_level = famation_level end
args.famation_level = famation_level
if isFianlStep then
args.maxLinkCount = maxLinkCount args.maxLinkCount = maxLinkCount
end end

View File

@ -19,7 +19,6 @@ function MaincityManager:firstEnterMainCity()
DataManager.ChapterData:setChapterId(DataManager.ChapterData.MIN_CHAPTER_ID) DataManager.ChapterData:setChapterId(DataManager.ChapterData.MIN_CHAPTER_ID)
ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.STAGE) ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.STAGE)
else else
BIReport:postGameLoginFinish()
self:showMainCityUI(true) self:showMainCityUI(true)
end end
SDKManager:doUncompletePay() SDKManager:doUncompletePay()

View File

@ -147,7 +147,6 @@ function ChapterComp:refreshChapter(force)
if needWave <= curMaxWave and not rewardGot then if needWave <= curMaxWave and not rewardGot then
objs.spineObj:setVisible(true) objs.spineObj:setVisible(true)
objs.spineObj:playAnimComplete("open", true, false, function() objs.spineObj:playAnimComplete("open", true, false, function()
objs.spineObj:setVisible(false)
ModuleManager.ChapterManager:openBox(rewardChapterId, index) ModuleManager.ChapterManager:openBox(rewardChapterId, index)
end) end)
else else