|
@@ -34,7 +34,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;
|
|
@@ -152,13 +152,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;
|
|
@@ -174,7 +176,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);
|
|
@@ -233,14 +235,14 @@ namespace GFGGame
|
|
|
{
|
|
|
_sceneObject = GameObject.Instantiate(_scenePrefab);
|
|
|
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
|
|
|
{
|
|
@@ -302,7 +304,7 @@ namespace GFGGame
|
|
|
|
|
|
private void backView()
|
|
|
{
|
|
|
- if (IsTeaPart)
|
|
|
+ if (_IsTeaPart)
|
|
|
{
|
|
|
ViewManager.Show<LeagueTeaPartyView>();
|
|
|
}
|
|
@@ -330,7 +332,7 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
|
- if (!IsTeaPart) {
|
|
|
+ if (!_IsTeaPart) {
|
|
|
AlertUI.Show("是否确定退出?")
|
|
|
.SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
|
|
|
{
|
|
@@ -802,7 +804,6 @@ namespace GFGGame
|
|
|
}
|
|
|
private void UpdatePartsListSort()
|
|
|
{
|
|
|
-
|
|
|
if (_currentMenuType == 0) return;
|
|
|
|
|
|
if (_currentMenuType == (int)ConstDressUpItemType.TAO_ZHUANG)
|
|
@@ -810,11 +811,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
|
|
|
{
|
|
@@ -826,11 +833,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
|
|
|
{
|
|
@@ -990,11 +1003,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; ;
|
|
@@ -1007,7 +1026,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;
|
|
@@ -1028,7 +1047,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;
|
|
@@ -1042,21 +1061,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();
|
|
|
}
|
|
|
|
|
@@ -1073,7 +1086,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;
|
|
@@ -1083,9 +1096,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;
|
|
|
}
|
|
|
|
|
@@ -1099,7 +1111,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;
|
|
|
}
|
|
@@ -1107,9 +1119,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;
|
|
|
}
|
|
|
|
|
@@ -1160,7 +1171,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;
|
|
|
}
|
|
@@ -1169,9 +1180,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;
|
|
|
}
|
|
|
|
|
@@ -1184,7 +1194,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;
|
|
|
}
|
|
@@ -1194,9 +1204,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;
|
|
|
}
|
|
|
|
|
@@ -1301,7 +1310,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);
|
|
@@ -1321,7 +1330,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
|
|
@@ -1330,7 +1339,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()
|
|
|
{
|
|
@@ -1421,7 +1433,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;
|
|
@@ -1478,7 +1490,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) =>
|