|
@@ -12,6 +12,7 @@ namespace GFGGame
|
|
|
private UI_LeagueTeaPartyUI _ui;
|
|
|
private List<TeapartyRoleCfg> teapartyRoleCfg;
|
|
|
private List<GObject> TeaPartyItemObj = new List<GObject>();
|
|
|
+ Dictionary<int, int> TeapartyRoleIdList = new Dictionary<int, int>();
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
@@ -123,15 +124,18 @@ namespace GFGGame
|
|
|
|
|
|
string strAlertText = "";
|
|
|
var roleContainerList = LeagueDataManager.Instance.RoleContainerList;
|
|
|
- List<int> TeapartyRoleIdList = new List<int>();
|
|
|
+ int countRoleId = 0;
|
|
|
+ TeapartyRoleIdList.Clear();
|
|
|
foreach (var info in roleContainerList) {
|
|
|
- if (info.PerNum <= 0)
|
|
|
- TeapartyRoleIdList.Add(info.TeapartyRoleId);
|
|
|
+ if (info.PerNum <= 0) {
|
|
|
+ TeapartyRoleIdList.Add(countRoleId,info.TeapartyRoleId);
|
|
|
+ countRoleId += 1;
|
|
|
+ }
|
|
|
}
|
|
|
if (TeapartyRoleIdList.Count > 0) {
|
|
|
string strRoleName = "";
|
|
|
- for (int index = 1; index < TeapartyRoleIdList.Count; index++) {
|
|
|
- strRoleName = strRoleName + teapartyRoleCfg[index].name;
|
|
|
+ for (int index = 0; index < TeapartyRoleIdList.Count; index++) {
|
|
|
+ strRoleName = strRoleName + teapartyRoleCfg[TeapartyRoleIdList[index]-1].name;
|
|
|
if (index < TeapartyRoleIdList.Count - 1)
|
|
|
strRoleName = strRoleName + "、";
|
|
|
}
|
|
@@ -152,6 +156,7 @@ namespace GFGGame
|
|
|
bool result = await LeagueSproxy.TeapartyStartChallenge(RoleDataManager.roleId);
|
|
|
if (result)
|
|
|
{
|
|
|
+ _ui.m_btnChallenge.grayed = LeagueDataManager.Instance.TeaPartyStatus != LeagueTeaPartyStatus.YesOpen;
|
|
|
TeaPartyStatuChange();
|
|
|
}
|
|
|
}
|
|
@@ -163,7 +168,7 @@ namespace GFGGame
|
|
|
|
|
|
private void OnBtnBackClick()
|
|
|
{
|
|
|
- ViewManager.GoBackFrom(typeof(LeagueView).FullName);
|
|
|
+ ViewManager.GoBackFrom(typeof(LeagueTeaPartyView).FullName);
|
|
|
}
|
|
|
|
|
|
private void OnBtnDetailClick(EventContext context)
|