【优化】优化公会和编队列表刷新规则
parent
af7e202ea9
commit
a1d52ccac0
|
|
@ -164,7 +164,7 @@ function this:BindEvent()
|
|||
else
|
||||
proId=i
|
||||
end
|
||||
this.OnClickTabBtn(proId)
|
||||
this.OnClickTabBtn(proId, true)
|
||||
end)
|
||||
end
|
||||
--推荐阵容
|
||||
|
|
@ -241,7 +241,7 @@ end
|
|||
function this:OnShow()
|
||||
this.ElementalResonanceView:OnOpen({sortOrder=self.sortingOrder})
|
||||
this.SetDrawLevel()
|
||||
this.RefreshFormation()
|
||||
this.RefreshFormation(true)
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
|
|
@ -267,7 +267,7 @@ function this:OnDestroy()
|
|||
end
|
||||
|
||||
--刷新编队
|
||||
function this.RefreshFormation()
|
||||
function this.RefreshFormation(isTop)
|
||||
proId=0
|
||||
if this.curFormationIndex == FormationTypeDef.FORMATION_ENDLESS_MAP then
|
||||
EndLessMapManager.RrefreshFormation()
|
||||
|
|
@ -301,7 +301,7 @@ function this.RefreshFormation()
|
|||
--设置上阵英雄信息
|
||||
this.SetCardsData()
|
||||
--显示英雄列表
|
||||
this.OnClickTabBtn(proId)
|
||||
this.OnClickTabBtn(proId, isTop)
|
||||
|
||||
--战力
|
||||
this.RefreshPower()
|
||||
|
|
@ -479,7 +479,7 @@ end
|
|||
|
||||
|
||||
--点击筛选
|
||||
function this.OnClickTabBtn(_proId)
|
||||
function this.OnClickTabBtn(_proId, isTop)
|
||||
local heros
|
||||
this.selectBtn:SetActive(proId ==_proId)
|
||||
this.selectBtn.transform:SetParent(tabs[_proId].transform)
|
||||
|
|
@ -501,18 +501,18 @@ function this.OnClickTabBtn(_proId)
|
|||
end
|
||||
end
|
||||
this.empty:SetActive(#heros<=0)
|
||||
this.SetRoleList(heros)
|
||||
this.SetRoleList(heros, isTop)
|
||||
end
|
||||
|
||||
|
||||
|
||||
--设置英雄列表数据
|
||||
function this.SetRoleList(_roleDatas)
|
||||
function this.SetRoleList(_roleDatas, isTop)
|
||||
this.SortHeroDatas(_roleDatas)
|
||||
-- local curFormation = FormationManager.formationList[this.curFormationIndex]
|
||||
this.scrollView:SetData(_roleDatas, function(index, go)
|
||||
this.SingleHeroDataShow(go, _roleDatas[index])
|
||||
end)
|
||||
end, not isTop)
|
||||
end
|
||||
--排序英雄数据
|
||||
function this.SortHeroDatas(_heroDatas)
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ function this.OnTabChange(index, lastIndex)
|
|||
this.RefreshBaseInfoShow()
|
||||
NetManager.RequestMyGuildInfo()
|
||||
elseif index == 2 then
|
||||
this.RefreshMembersShow()
|
||||
this.RefreshMembersShow(true)
|
||||
MyGuildManager.RequestMyGuildMembers()
|
||||
elseif index == 3 then
|
||||
this.RefreshVerifyShow()
|
||||
|
|
@ -369,7 +369,7 @@ function this.RefreshDismissTime()
|
|||
end
|
||||
|
||||
-- 刷新公会成员显示
|
||||
function this.RefreshMembersShow()
|
||||
function this.RefreshMembersShow(isTop)
|
||||
if this._CurIndex ~= 2 then return end
|
||||
-- 创建滚动
|
||||
if not this.memScrollView then
|
||||
|
|
@ -383,7 +383,7 @@ function this.RefreshMembersShow()
|
|||
local members = MyGuildManager.GetMyGuildMemList()
|
||||
this.memScrollView:SetData(members, function(index, go)
|
||||
this.MemItemAdapter(go, members[index])
|
||||
end)
|
||||
end, not isTop)
|
||||
-- 在线人数计算
|
||||
local onlineNum = 0
|
||||
for _, v in ipairs(members) do
|
||||
|
|
|
|||
Loading…
Reference in New Issue