|
@@ -33,7 +33,7 @@ namespace GFGGame
|
|
|
private StoryLevelCfg _levelCfg;
|
|
|
private StoryFightCfg _fightCfg;
|
|
|
private int scoreType = 0; //目标分数类型保存
|
|
|
- private bool IsTeaPart = false;
|
|
|
+ private bool _IsTeaPart = false;
|
|
|
|
|
|
private const int SORT_BY_HIGH_SCORE = 0;
|
|
|
private const int SORT_BY_LOW_SCORE = 1;
|
|
@@ -150,13 +150,15 @@ namespace GFGGame
|
|
|
|
|
|
var objData = (DressUpFightType)this.viewData;
|
|
|
|
|
|
- if (objData.teaPartID > 0) {
|
|
|
- IsTeaPart = true;
|
|
|
+ if (objData.teaPartID > 0) {
|
|
|
+ _IsTeaPart = true;
|
|
|
_TeaPartyID = objData.teaPartID;
|
|
|
}
|
|
|
+ else
|
|
|
+ _IsTeaPart = false;
|
|
|
|
|
|
_levelID = objData.levelID;
|
|
|
- if (!IsTeaPart)
|
|
|
+ if (!_IsTeaPart)
|
|
|
_ui.m_c1.selectedIndex = 0;
|
|
|
else
|
|
|
_ui.m_c1.selectedIndex = 2;
|
|
@@ -172,7 +174,7 @@ namespace GFGGame
|
|
|
_ui.m_btnAutoPlay.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
|
|
|
_ui.m_btnRecommend.visible = FunctionOpenDataManager.Instance.CheckIsFunOpenById(ConstFunctionId.FUNCTION_AUTOPLAY_FIGHT, false);
|
|
|
|
|
|
- if (!IsTeaPart) {
|
|
|
+ if (!_IsTeaPart) {
|
|
|
InstanceZonesDataManager.currentLevelCfgId = _levelID;
|
|
|
_levelCfg = StoryLevelCfgArray.Instance.GetCfg(_levelID);
|
|
|
_fightCfg = StoryFightCfgArray.Instance.GetCfg(_levelCfg.fightID);
|
|
@@ -231,14 +233,14 @@ namespace GFGGame
|
|
|
{
|
|
|
_sceneObject = PrefabManager.Instance.InstantiateSync(ResPathUtil.GetPrefabPath("SceneDressUpFight"));
|
|
|
MyDressUpHelper.dressUpObj.setSceneObj(_sceneObject, false, false);
|
|
|
- MyDressUpHelper.dressUpObj.PutOnDefaultDressUpData(IsTeaPart);
|
|
|
+ MyDressUpHelper.dressUpObj.PutOnDefaultDressUpData(_IsTeaPart);
|
|
|
}
|
|
|
_ui.m_txtDressLimit.text = string.Format("饰品穿戴限制:{0}/{1}", MyDressUpHelper.GetCurrentOrnamentCount(), GlobalCfgArray.globalCfg.dressLimitCount);
|
|
|
|
|
|
UpdateStepBtn(true);
|
|
|
UpdateScore();
|
|
|
|
|
|
- if (!IsTeaPart)
|
|
|
+ if (!_IsTeaPart)
|
|
|
SendLog();
|
|
|
else
|
|
|
{
|
|
@@ -300,7 +302,7 @@ namespace GFGGame
|
|
|
|
|
|
private void backView()
|
|
|
{
|
|
|
- if (IsTeaPart)
|
|
|
+ if (_IsTeaPart)
|
|
|
{
|
|
|
ViewManager.Show<LeagueTeaPartyView>();
|
|
|
}
|
|
@@ -328,7 +330,7 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
- if (!IsTeaPart) {
|
|
|
+ if (!_IsTeaPart) {
|
|
|
AlertUI.Show("是否确定退出?")
|
|
|
.SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
|
|
|
{
|
|
@@ -800,7 +802,6 @@ namespace GFGGame
|
|
|
}
|
|
|
private void UpdatePartsListSort()
|
|
|
{
|
|
|
-
|
|
|
if (_currentMenuType == 0) return;
|
|
|
|
|
|
if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
|
|
@@ -808,11 +809,17 @@ namespace GFGGame
|
|
|
_currentList3 = DressUpMenuSuitDataManager.GetSuitIDList();
|
|
|
if (_scoreIndex == SORT_BY_HIGH_SCORE)
|
|
|
{
|
|
|
- _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
|
|
|
+ if (!_IsTeaPart)
|
|
|
+ _currentList3 = SuitUtil.SortSuitListByHighScore(_currentList3);
|
|
|
+ else
|
|
|
+ _currentList3 = SuitUtil.SortTeaPartySuitByHighScore(_currentList3);
|
|
|
}
|
|
|
else if (_scoreIndex == SORT_BY_LOW_SCORE)
|
|
|
{
|
|
|
- _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
|
|
|
+ if (!_IsTeaPart)
|
|
|
+ _currentList3 = SuitUtil.SortSuitListByLowScore(_currentList3);
|
|
|
+ else
|
|
|
+ _currentList3 = SuitUtil.SortTeaPartySuitByLowScore(_currentList3);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -824,11 +831,17 @@ namespace GFGGame
|
|
|
_currentList3 = DressUpMenuItemDataManager.getItemDatasByType(_currentMenuType);
|
|
|
if (_scoreIndex == SORT_BY_HIGH_SCORE)
|
|
|
{
|
|
|
- _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
|
|
|
+ if (!_IsTeaPart)
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
|
|
|
+ else
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
|
|
|
}
|
|
|
else if (_scoreIndex == SORT_BY_LOW_SCORE)
|
|
|
{
|
|
|
- _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
|
|
|
+ if (!_IsTeaPart)
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
|
|
|
+ else
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -988,11 +1001,17 @@ namespace GFGGame
|
|
|
{
|
|
|
if (_scoreIndex == SORT_BY_HIGH_SCORE)
|
|
|
{
|
|
|
- _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
|
|
|
+ if (!_IsTeaPart)
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemListByHighScore(_currentList3, true);
|
|
|
+ else
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByHighScore(_currentList3);
|
|
|
}
|
|
|
else if (_scoreIndex == SORT_BY_LOW_SCORE)
|
|
|
{
|
|
|
- _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
|
|
|
+ if (!_IsTeaPart)
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemListByLowScore(_currentList3, true);
|
|
|
+ else
|
|
|
+ _currentList3 = DressUpMenuItemDataManager.SortItemTeaPartyByLowsore(_currentList3);
|
|
|
}
|
|
|
_currentMenuType = 0;
|
|
|
_ui.m_partsListSearch.m_list.numItems = _currentList3.Count; ;
|
|
@@ -1005,7 +1024,7 @@ namespace GFGGame
|
|
|
typeItem.m_txtname.text = item1.name;
|
|
|
//typeItem.m_imgTitle.url = "ui://DressUp/hz_iconzi_" + item1.id;
|
|
|
typeItem.target.data = item1.id;
|
|
|
- if (!IsTeaPart)
|
|
|
+ if (!_IsTeaPart)
|
|
|
{
|
|
|
typeItem.m_imgNeed.visible = ItemUtil.CheckMenuType1(_fightCfg.needItemId, _fightCfg.needSuitId, item1.id);
|
|
|
typeItem.m_itemType.selectedIndex = 0;
|
|
@@ -1026,7 +1045,7 @@ namespace GFGGame
|
|
|
typeItem.m_txtname.text = item2.name;
|
|
|
//typeItem.m_imgTitle.url = "ui://DressUp/hz_iconziej_" + item2.id;
|
|
|
typeItem.target.data = item2.id;
|
|
|
- if (!IsTeaPart) {
|
|
|
+ if (!_IsTeaPart) {
|
|
|
typeItem.m_itemType.selectedIndex = 0;
|
|
|
var subType = ItemUtilCS.GetItemSubType(_fightCfg.needItemId);
|
|
|
typeItem.m_imgNeed.visible = subType == item2.type;
|
|
@@ -1040,21 +1059,15 @@ namespace GFGGame
|
|
|
|
|
|
private void ListTagItem(int index, GObject item)
|
|
|
{
|
|
|
- Dictionary<int, Dictionary<string, int>> tagsArr = (Dictionary<int, Dictionary<string, int>>)item.parent.data;
|
|
|
+ string[][] tagsArr = (string[][])item.parent.data;
|
|
|
UI_ComTagItem listItem = UI_ComTagItem.Proxy(item);
|
|
|
- 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;
|
|
|
+ int tagType = TagCfgArray.Instance.GetCfg(tagsArr[index][0]).type;
|
|
|
UI.CommonGame.UI_ComTag itemTag = UI.CommonGame.UI_ComTag.Proxy(listItem.m_loaTag);
|
|
|
- itemTag.m_txtTag.text = name;
|
|
|
+ itemTag.m_txtTag.text = tagsArr[index][0];
|
|
|
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 = score;
|
|
|
+ listItem.m_txtScore.text = tagsArr[index][1];
|
|
|
UI_ComTagItem.ProxyEnd();
|
|
|
}
|
|
|
|
|
@@ -1071,7 +1084,7 @@ namespace GFGGame
|
|
|
iconRes = suitCfg.res;
|
|
|
partName = suitCfg.name;
|
|
|
listItem.m_iconSelected.visible = false;
|
|
|
- if (!IsTeaPart)
|
|
|
+ if (!_IsTeaPart)
|
|
|
{
|
|
|
listItem.m_txtScore.text = "" + SuitUtil.GetSuitScore(id);
|
|
|
listItem.m_itemType.selectedIndex = 0;
|
|
@@ -1081,9 +1094,8 @@ namespace GFGGame
|
|
|
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_ListTag.data = suitCfg.tagsArr;
|
|
|
+ listItem.m_ListTag.numItems = suitCfg.tagsArr.Length;
|
|
|
listItem.m_itemType.selectedIndex = 1;
|
|
|
}
|
|
|
|
|
@@ -1097,7 +1109,7 @@ 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;
|
|
|
}
|
|
@@ -1105,9 +1117,8 @@ namespace GFGGame
|
|
|
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_ListTag.data = itemCfg.tagsArr;
|
|
|
+ listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
|
|
|
listItem.m_itemType.selectedIndex = 1;
|
|
|
}
|
|
|
|
|
@@ -1158,7 +1169,7 @@ namespace GFGGame
|
|
|
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;
|
|
|
}
|
|
@@ -1167,9 +1178,8 @@ namespace GFGGame
|
|
|
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_ListTag.data = itemCfg.tagsArr;
|
|
|
+ listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
|
|
|
listItem.m_itemType.selectedIndex = 1;
|
|
|
}
|
|
|
|
|
@@ -1182,7 +1192,7 @@ namespace GFGGame
|
|
|
// int mainValuel;
|
|
|
// ItemDataManager.GetMainScore(id, out mainScore, out mainValuel);
|
|
|
listItem.m_ScoreType.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + scoreType);
|
|
|
- if (!IsTeaPart) {
|
|
|
+ if (!_IsTeaPart) {
|
|
|
listItem.m_txtScore.text = "" + ItemDataManager.GetItemAdditionScore(id, InstanceZonesDataManager.currentScoreType, _fightCfg.needTagsArr);
|
|
|
listItem.m_itemType.selectedIndex = 0;
|
|
|
}
|
|
@@ -1192,9 +1202,8 @@ namespace GFGGame
|
|
|
{
|
|
|
listItem.m_ListTag.itemRenderer = ListTagItem;
|
|
|
}
|
|
|
- var tagsArr = DressUpMenuItemDataManager.GetTidyTagCfgArray(itemCfg);
|
|
|
- listItem.m_ListTag.data = tagsArr;
|
|
|
- listItem.m_ListTag.numItems = tagsArr.Count;
|
|
|
+ listItem.m_ListTag.data = itemCfg.tagsArr;
|
|
|
+ listItem.m_ListTag.numItems = itemCfg.tagsArr.Length;
|
|
|
listItem.m_itemType.selectedIndex = 1;
|
|
|
}
|
|
|
|
|
@@ -1299,7 +1308,7 @@ namespace GFGGame
|
|
|
_ui.m_btnClose.visible = true;
|
|
|
_ui.m_grpTips.visible = true;
|
|
|
string str = "";
|
|
|
- if (!IsTeaPart)
|
|
|
+ if (!_IsTeaPart)
|
|
|
str = _levelCfg.hint;
|
|
|
else {
|
|
|
var teapartyRoleCfg = TeapartyRoleCfgArray.Instance.GetCfgsByid(LeagueDataManager.Instance.TeaPartyId);
|
|
@@ -1319,7 +1328,7 @@ namespace GFGGame
|
|
|
|
|
|
private void UpdateScore()
|
|
|
{
|
|
|
- if (!IsTeaPart)
|
|
|
+ if (!_IsTeaPart)
|
|
|
_ui.m_txtScore.text = "" + FightDataManager.Instance.GetScore(InstanceZonesDataManager.roleData).ToString();
|
|
|
// GuideController.TryGuideDressUpFightViewBtnNext(_ui.m_btnNext);
|
|
|
else
|
|
@@ -1328,7 +1337,10 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickBtnSearch()
|
|
|
{
|
|
|
- ViewManager.Show<DressFilterView>(false, new object[] { typeof(DressUpView).FullName});
|
|
|
+ int type = 0;
|
|
|
+ if (_IsTeaPart)
|
|
|
+ type = 1;
|
|
|
+ ViewManager.Show<DressFilterView>(new object[] { 0, 0, type}, new object[] { typeof(DressUpView).FullName});
|
|
|
}
|
|
|
private void OnClickBtnAutoPlay()
|
|
|
{
|
|
@@ -1419,7 +1431,7 @@ namespace GFGGame
|
|
|
}
|
|
|
protected override void UpdateToCheckGuide(object param)
|
|
|
{
|
|
|
- if (!ViewManager.CheckIsTopView(this.viewCom) || IsTeaPart) return;
|
|
|
+ if (!ViewManager.CheckIsTopView(this.viewCom) || _IsTeaPart) return;
|
|
|
|
|
|
int buyClothingIndex = 0;
|
|
|
int buyClothingSubIndex = 0;
|
|
@@ -1476,7 +1488,7 @@ namespace GFGGame
|
|
|
|
|
|
private void TeaPartyStatuChange()
|
|
|
{
|
|
|
- if (IsTeaPart && LeagueDataManager.Instance.TeaPartyStatus == LeagueTeaPartyStatus.YesGo)
|
|
|
+ if (_IsTeaPart && LeagueDataManager.Instance.TeaPartyStatus == LeagueTeaPartyStatus.YesGo)
|
|
|
{
|
|
|
AlertUI.Show("管理员已开启茶会,请前往挑战!")
|
|
|
.SetLeftButton(false).SetRightButton(true, "确定", (object data) =>
|