|
@@ -128,6 +128,7 @@ namespace GFGGame
|
|
|
EventAgent.AddEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
|
|
|
EventAgent.AddEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
|
|
|
EventAgent.AddEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.TEA_PARTY_STATU, TeaPartyStatuChange);
|
|
|
// EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
|
|
|
}
|
|
|
|
|
@@ -139,6 +140,7 @@ namespace GFGGame
|
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.TEA_PARTY_STATU, TeaPartyStatuChange);
|
|
|
// EventAgent.RemoveEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
|
|
|
}
|
|
|
|
|
@@ -240,11 +242,12 @@ namespace GFGGame
|
|
|
SendLog();
|
|
|
else
|
|
|
{
|
|
|
- var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(1); //LeagueDataManager.Instance.TeaPartyId
|
|
|
+ var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
|
|
|
_ui.m_txtTeaPartyName.text = teapartyRoleCfg[objData.teaPartID - 1].name;
|
|
|
}
|
|
|
|
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
|
+ TeaPartyStatuChange();
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
@@ -325,14 +328,26 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
- AlertUI.Show("是否确定退出?")
|
|
|
- .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
|
|
|
- {
|
|
|
- backView();
|
|
|
- });
|
|
|
+ if (!IsTeaPart) {
|
|
|
+ AlertUI.Show("是否确定退出?")
|
|
|
+ .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
|
|
|
+ {
|
|
|
+ backView();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ AlertUI.Show("当期搭配未保存,是否放弃提交搭配?")
|
|
|
+ .SetLeftButton(true, "放弃搭配", (object data) =>
|
|
|
+ {
|
|
|
+ backView();
|
|
|
+ }).SetRightButton(true, "提交搭配", (object data) =>
|
|
|
+ {
|
|
|
+ ChangeTeapartyDressup();
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- //ViewManager.Show<StoryChapterView>(StoryDataManager.currentChapter);
|
|
|
- }
|
|
|
+ //ViewManager.Show<StoryChapterView>(StoryDataManager.currentChapter);
|
|
|
+ }
|
|
|
|
|
|
private void OnClickBtnHome()
|
|
|
{
|
|
@@ -1026,16 +1041,21 @@ namespace GFGGame
|
|
|
|
|
|
private void ListTagItem(int index, GObject item)
|
|
|
{
|
|
|
- ItemCfg itemCfg = (ItemCfg)item.parent.data;
|
|
|
+ Dictionary<int, Dictionary<string, int>> tagsArr = (Dictionary<int, Dictionary<string, int>>)item.parent.data;
|
|
|
UI_ComTagItem listItem = UI_ComTagItem.Proxy(item);
|
|
|
- string name = itemCfg.tagsArr[index][0].ToString();
|
|
|
+ string name = "";
|
|
|
+ string score = "";
|
|
|
+ foreach (var info in tagsArr[index].Keys) {
|
|
|
+ name = info;
|
|
|
+ score = tagsArr[index][info].ToString();
|
|
|
+ }
|
|
|
int tagType = TagCfgArray.Instance.GetCfg(name).type;
|
|
|
UI.CommonGame.UI_ComTag itemTag = UI.CommonGame.UI_ComTag.Proxy(listItem.m_loaTag);
|
|
|
itemTag.m_txtTag.text = name;
|
|
|
itemTag.m_loaTag.url = ResPathUtil.GetCommonGameResPath("fzd_bqbq_" + tagType);
|
|
|
itemTag.m_loaTag.scale = new Vector2(0.8f, 0.8f);
|
|
|
UI.CommonGame.UI_ComTag.ProxyEnd();
|
|
|
- listItem.m_txtScore.text = itemCfg.tagsArr[index][1];
|
|
|
+ listItem.m_txtScore.text = score;
|
|
|
UI_ComTagItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
@@ -1052,7 +1072,22 @@ namespace GFGGame
|
|
|
iconRes = suitCfg.res;
|
|
|
partName = suitCfg.name;
|
|
|
listItem.m_iconSelected.visible = false;
|
|
|
- listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
|
|
|
+ if (!IsTeaPart)
|
|
|
+ {
|
|
|
+ listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
|
|
|
+ listItem.m_itemType.selectedIndex = 0;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (listItem.m_ListTag.data == null)
|
|
|
+ listItem.m_ListTag.itemRenderer = ListTagItem;
|
|
|
+
|
|
|
+ var tagCfg = DressUpMenuSuitDataManager.GetSuitTagCfgArray(id);
|
|
|
+ listItem.m_ListTag.data = tagCfg;
|
|
|
+ listItem.m_ListTag.numItems = tagCfg.Count;
|
|
|
+ listItem.m_itemType.selectedIndex = 1;
|
|
|
+ }
|
|
|
+
|
|
|
RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false, true);
|
|
|
listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + suitCfg.rarity;
|
|
|
listItem.m_imgNew.visible = false;
|
|
@@ -1063,15 +1098,18 @@ namespace GFGGame
|
|
|
iconRes = itemCfg.res;
|
|
|
partName = itemCfg.name;
|
|
|
listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
|
|
|
- if (!IsTeaPart)
|
|
|
+ if (!IsTeaPart) {
|
|
|
listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
|
|
|
+ listItem.m_itemType.selectedIndex = 0;
|
|
|
+ }
|
|
|
else {
|
|
|
if (listItem.m_ListTag.data == null)
|
|
|
- {
|
|
|
listItem.m_ListTag.itemRenderer = ListTagItem;
|
|
|
- }
|
|
|
- listItem.m_ListTag.data = itemCfg;
|
|
|
- listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
|
|
|
+
|
|
|
+ var tagsArr = DressUpMenuItemDataManager.GetTidyTagCfgArray(itemCfg);
|
|
|
+ listItem.m_ListTag.data = tagsArr;
|
|
|
+ listItem.m_ListTag.numItems = tagsArr.Count;
|
|
|
+ listItem.m_itemType.selectedIndex = 1;
|
|
|
}
|
|
|
|
|
|
listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
|
|
@@ -1092,11 +1130,6 @@ namespace GFGGame
|
|
|
_listLongPress.Add(longPressGesture);
|
|
|
}
|
|
|
|
|
|
- if (!IsTeaPart)
|
|
|
- listItem.m_itemType.selectedIndex = 0;
|
|
|
- else
|
|
|
- listItem.m_itemType.selectedIndex = 1;
|
|
|
-
|
|
|
listItem.m_btnAni.visible = false;
|
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
|
|
|
listItem.m_ScoreType.url = "ui://CommonGame/kp_sx_" + scoreType;
|
|
@@ -1125,6 +1158,22 @@ namespace GFGGame
|
|
|
iconRes = itemCfg.res;
|
|
|
partName = itemCfg.name;
|
|
|
listItem.m_iconSelected.visible = MyDressUpHelper.dressUpObj.CheckDressUpItemIsOn(id);
|
|
|
+
|
|
|
+ if (!IsTeaPart) {
|
|
|
+ listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
|
|
|
+ listItem.m_itemType.selectedIndex = 0;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (listItem.m_ListTag.data == null)
|
|
|
+ listItem.m_ListTag.itemRenderer = ListTagItem;
|
|
|
+
|
|
|
+ var tagsArr = DressUpMenuItemDataManager.GetTidyTagCfgArray(itemCfg);
|
|
|
+ listItem.m_ListTag.data = tagsArr;
|
|
|
+ listItem.m_ListTag.numItems = tagsArr.Count;
|
|
|
+ listItem.m_itemType.selectedIndex = 1;
|
|
|
+ }
|
|
|
+
|
|
|
listItem.m_loaBorder.url = "ui://DressUp/hz_kuangk_" + itemCfg.rarity;
|
|
|
RarityIconController.UpdateRarityIcon(listItem.m_rarity, id, false);
|
|
|
ext = ItemUtil.GetItemResExt(itemCfg.itemType, itemCfg.subType, true);
|
|
@@ -1134,7 +1183,21 @@ namespace GFGGame
|
|
|
// int mainValuel;
|
|
|
// ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
|
|
|
listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + scoreType);
|
|
|
- listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, scoreType, _fightCfg.needTagsArr);
|
|
|
+ if (!IsTeaPart) {
|
|
|
+ listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
|
|
|
+ listItem.m_itemType.selectedIndex = 0;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (listItem.m_ListTag.data == null)
|
|
|
+ {
|
|
|
+ listItem.m_ListTag.itemRenderer = ListTagItem;
|
|
|
+ }
|
|
|
+ var tagsArr = DressUpMenuItemDataManager.GetTidyTagCfgArray(itemCfg);
|
|
|
+ listItem.m_ListTag.data = tagsArr;
|
|
|
+ listItem.m_ListTag.numItems = tagsArr.Count;
|
|
|
+ listItem.m_itemType.selectedIndex = 1;
|
|
|
+ }
|
|
|
|
|
|
listItem.m_icon.url = ResPathUtil.GetIconPath(iconRes, ext);
|
|
|
listItem.m_txtTitle.text = partName;
|
|
@@ -1236,7 +1299,15 @@ namespace GFGGame
|
|
|
{
|
|
|
_ui.m_btnClose.visible = true;
|
|
|
_ui.m_grpTips.visible = true;
|
|
|
- _ui.m_txtHint.text = _levelCfg.hint;
|
|
|
+ string str = "";
|
|
|
+ if (!IsTeaPart)
|
|
|
+ str = _levelCfg.hint;
|
|
|
+ else {
|
|
|
+ var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
|
|
|
+ str = teapartyRoleCfg[_TeaPartyID - 1].hint;
|
|
|
+ }
|
|
|
+ _ui.m_txtHint.text = str;
|
|
|
+
|
|
|
if (this._ui.m_txtHint.textHeight > this._ui.m_txtHint.textFormat.size * 2)
|
|
|
{
|
|
|
this._ui.m_txtHint.align = AlignType.Left;
|
|
@@ -1349,8 +1420,7 @@ namespace GFGGame
|
|
|
}
|
|
|
protected override void UpdateToCheckGuide(object param)
|
|
|
{
|
|
|
-
|
|
|
- if (!ViewManager.CheckIsTopView(this.viewCom)) return;
|
|
|
+ if (!ViewManager.CheckIsTopView(this.viewCom) || IsTeaPart) return;
|
|
|
|
|
|
int buyClothingIndex = 0;
|
|
|
int buyClothingSubIndex = 0;
|
|
@@ -1404,5 +1474,17 @@ namespace GFGGame
|
|
|
base.TryCompleteGuide();
|
|
|
// GuideController.TryCompleteGuide(ConstGuideId.START_FIGHT, 5);
|
|
|
}
|
|
|
+
|
|
|
+ private void TeaPartyStatuChange()
|
|
|
+ {
|
|
|
+ if (IsTeaPart && LeagueDataManager.Instance.TeaPartyStatus == LeagueTeaPartyStatus.YesGo)
|
|
|
+ {
|
|
|
+ AlertUI.Show("管理员已开启茶会,请前往挑战!")
|
|
|
+ .SetLeftButton(false).SetRightButton(true, "确定", (object data) =>
|
|
|
+ {
|
|
|
+ ViewManager.Show<LeagueTeaPartyView>();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|