Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

dev_chengFeng
ZhangBiao 2020-08-31 16:07:04 +08:00
commit a9098b6bc7
5 changed files with 49 additions and 51 deletions

View File

@ -109,6 +109,7 @@ function this:BindEvent()
for i = 1, #msg.drop.Hero do
HeroManager.UpdateHeroDatas(msg.drop.Hero[i])
ExpeditionManager.InitHeroHpValue(msg.drop.Hero[i].id)
end
curSelectHero = HeroManager.GetSingleHeroData(msg.drop.Hero[1].id)
this.ShowCurrPosHeroReplace(curIndex)

View File

@ -432,6 +432,22 @@ function this.AllFormationDeleCurHeroId(heroDid)
end
end
end
-- 归元时检测无尽 和 大闹天宫阵容是否需要下阵
function this.ResolvDownBattleCurHeroId(heroDid)
for i, team in pairs(this.formationList) do
local removeIndex
if i == FormationTypeDef.EXPEDITION or i == FormationTypeDef.FORMATION_ENDLESS_MAP then
for j = 1, #team.teamHeroInfos do
if team.teamHeroInfos[j] and team.teamHeroInfos[j].heroId == heroDid then
removeIndex = j
end
end
if removeIndex then
table.remove( team.teamHeroInfos, removeIndex)
end
end
end
end
-- 获取当前光环的加成数据 type 编队类型
function this.GetCurFormationElementAdd(teamHeroInfos)

View File

@ -147,6 +147,9 @@ function this.GetCurBoss()
return curBoss
end
function this.GetBlood()
if blood < 0 then
blood = 10000
end
return blood
end
function this.GetCanSweep()

View File

@ -2910,6 +2910,7 @@ function this.ResetHero(dynamicloadId)
heroDatas[dynamicloadId].lv = 1
heroDatas[dynamicloadId].breakId = 0
end
FormationManager.ResolvDownBattleCurHeroId(dynamicloadId)
end
--神将合成
function this.ByCompoundHeroGetAllHeros()

View File

@ -25,11 +25,6 @@ local allMissionDailyBoxItemPres = {}
local myGo
function this:InitComponent(gameObject)
myGo = gameObject
--this.grid = Util.GetGameObject(gameObject, "infoOb/rect/grid")
--for i = 1, 9 do
-- allMissionDailyPres[i] = Util.GetGameObject(gameObject, "infoOb/rect/grid/dayMissionPre ("..i..")")
-- allMissionDailyItemPres[i] = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(allMissionDailyPres[i].transform, "itemRect/itemGrid").transform)
--end
this.rectMask=Util.GetGameObject(gameObject,"rect"):GetComponent("Image")
this.rewardPre = Util.GetGameObject(gameObject, "rewardPre")
local v = Util.GetGameObject(gameObject, "rect"):GetComponent("RectTransform").rect
@ -101,12 +96,10 @@ function this.OnShowData()
curDailyMissionBoxData = {}
for i, v in pairs(TaskManager.GetTypeTaskList(TaskTypeDef.DayTask)) do
if v.missionId < 10000 then
--if this.GetCurIsOpen(dailyTasksConfig[v.missionId].OpenLevel) then
if dailyTasksConfig[v.missionId].OpenLevel or ActTimeCtrlManager.SingleFuncState(dailyTasksConfig[v.missionId].OpenLevel) then
table.insert(curDailyMissionData,v)
end
else
--if this.GetCurIsOpen(dailyTasksConfig[v.missionId].OpenLevel) then
if dailyTasksConfig[v.missionId].OpenLevel or ActTimeCtrlManager.SingleFuncState(dailyTasksConfig[v.missionId].OpenLevel) then
table.insert(curDailyMissionBoxData,v)
end
@ -120,66 +113,50 @@ function this.OnShowData()
end
end)
local AllData = TaskManager.GetTypeTaskList(TaskTypeDef.Achievement)
--LogError(" ``````````` "..LengthOfTable(AllData))
this.ScrollView:SetData(curDailyMissionData, function (index, go)
--this.SingleDataShow(go, curDailyMissionData[index])
this.SingleMissionDatasDataShow(go,curDailyMissionData[index])
end)
--this.SetDailyMission(curDailyMissionData)
this.SetDailyMissionBox(curDailyMissionBoxData)
end
function this.SetDailyMission(_missionDatas)
for i = 1, math.max(#_missionDatas, #allMissionDailyPres) do
local go = allMissionDailyPres[i]
if not go then
go = newObject(allMissionDailyPres[1])
go.transform:SetParent(this.grid.transform)
go.name = "dayMissionPre ("..i..")"
go.transform.localScale = Vector3.one
go.transform.localPosition = Vector3.zero
allMissionDailyPres[i] = go
Util.ClearChild(Util.GetGameObject(allMissionDailyPres[i].transform, "itemRect/itemGrid").transform)
local goItemPres = SubUIManager.Open(SubUIConfig.ItemView, Util.GetGameObject(allMissionDailyPres[i].transform, "itemRect/itemGrid").transform)
--goItemPres.transform:SetParent(allMissionDailyPres[i].transform)
goItemPres.transform.localScale = Vector3.one
goItemPres.transform.localPosition = Vector3.zero
allMissionDailyItemPres[i] = goItemPres
end
go.gameObject:SetActive(false)
end
for i = 1, #_missionDatas do
allMissionDailyPres[i]:SetActive(true)
this.SingleMissionDatasDataShow(allMissionDailyPres[i],allMissionDailyItemPres[i],_missionDatas[i])
end
end
function this.SingleMissionDatasDataShow(_go,_missionData)
local missionData = _missionData
local missionConfigData = dailyTasksConfig[missionData.missionId]
local reward = {}
if missionConfigData and #missionConfigData.Reward then
for i = 1, #missionConfigData.Reward do
table.insert(reward,{reward = {missionConfigData.Reward[i][1],missionConfigData.Reward[i][2]},type = 1})
end
end
if missionConfigData and #missionConfigData.MazePoint then
for i = 1, #missionConfigData.MazePoint do
table.insert(reward,{reward = {missionConfigData.MazePoint[i][1],missionConfigData.MazePoint[i][2]},type = 2})
end
end
_go:SetActive(true)
local titleText = Util.GetGameObject(_go, "titleImage/titleText"):GetComponent("Text")
titleText.text =string.format(missionConfigData.Desc,missionConfigData.Values[2][1])
local itemGroup = Util.GetGameObject(_go, "content")
--滚动条复用重设itemview
if this.NoviceItemList[_go] then
for i = 1, 4 do
this.NoviceItemList[_go][i].gameObject:SetActive(false)
end
for i = 1, #missionConfigData.Reward do
if this.NoviceItemList[_go][i] then
this.NoviceItemList[_go][i]:OnOpen(false, {missionConfigData.Reward[i][1],missionConfigData.Reward[i][2]}, 0.9,false,false,false,sortingOrder)
this.NoviceItemList[_go][i].gameObject:SetActive(true)
end
end
else
this.NoviceItemList[_go]={}
for i = 1, 4 do
if not this.NoviceItemList[_go] then
this.NoviceItemList[_go] = {}
end
for i = 1, #reward do
if not this.NoviceItemList[_go][i] then
this.NoviceItemList[_go][i] = SubUIManager.Open(SubUIConfig.ItemView, itemGroup.transform)
this.NoviceItemList[_go][i].gameObject:SetActive(false)
end
for i = 1, #missionConfigData.Reward do
this.NoviceItemList[_go][i]:OnOpen(false, {missionConfigData.Reward[i][1],missionConfigData.Reward[i][2]}, 0.9,false,false,false,sortingOrder)
this.NoviceItemList[_go][i].gameObject:SetActive(false)
end
local show
for i = 1, #reward do
show = false
if (reward[i].type == 2 and ActivityGiftManager.GetActivityOpenStatus(ActivityTypeDef.TreasureOfSomeBody) and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.SUNLONG))
or reward[i].type == 1 then
show = true
end
if show then
this.NoviceItemList[_go][i]:OnOpen(false, reward[i].reward, 0.9,false,false,false,sortingOrder)
this.NoviceItemList[_go][i].gameObject:SetActive(true)
end
end