Browse Source

Merge branch 'master' of http://10.108.64.190:3000/gfg/Client

* 'master' of http://10.108.64.190:3000/gfg/Client:
  卡牌推荐
  卡牌动画按星级显示
  拍照保存
  保存图片
  战斗失败跳转
  换装上一步下一步
Jae 2 years ago
parent
commit
6216af56fa

+ 5 - 5
FGUIProject/assets/DressUp/DressUpUI.xml

@@ -56,18 +56,18 @@
       <relation target="" sidePair="left-left,bottom-bottom"/>
       <relation target="" sidePair="left-left,bottom-bottom"/>
       <Button title="下一步" titleColor="#fdfaed" titleFontSize="54"/>
       <Button title="下一步" titleColor="#fdfaed" titleFontSize="54"/>
     </component>
     </component>
-    <component id="n27_j48o" name="btnAction" src="f4xv3o" fileName="components/Button6.xml" xy="27,1184" size="157,133" group="n34_wono" visible="false">
+    <component id="n27_j48o" name="btnAction" src="f4xv3o" fileName="components/Button6.xml" xy="27,900" size="157,133" group="n34_wono" visible="false">
       <gearDisplay controller="c2" pages="0"/>
       <gearDisplay controller="c2" pages="0"/>
       <Button icon="ui://mbo439wbj48o3x"/>
       <Button icon="ui://mbo439wbj48o3x"/>
     </component>
     </component>
-    <component id="n24_f4xv" name="btnPhoto" src="f4xv3o" fileName="components/Button6.xml" xy="56,1184" group="n34_wono">
+    <component id="n24_f4xv" name="btnPhoto" src="f4xv3o" fileName="components/Button6.xml" xy="56,900" group="n34_wono">
       <gearDisplay controller="c2" pages="0"/>
       <gearDisplay controller="c2" pages="0"/>
       <Button icon="ui://mbo439wbq08xm"/>
       <Button icon="ui://mbo439wbq08xm"/>
     </component>
     </component>
-    <component id="n20_f4xv" name="btnLastStep" src="f4xv3o" fileName="components/Button6.xml" xy="56,1464" group="n34_wono" visible="false">
+    <component id="n20_f4xv" name="btnLastStep" src="f4xv3o" fileName="components/Button6.xml" xy="56,1042" group="n34_wono">
       <Button icon="ui://mbo439wbq08x6"/>
       <Button icon="ui://mbo439wbq08x6"/>
     </component>
     </component>
-    <component id="n21_f4xv" name="btnNextStep" src="f4xv3o" fileName="components/Button6.xml" xy="56,1578" group="n34_wono" visible="false">
+    <component id="n21_f4xv" name="btnNextStep" src="f4xv3o" fileName="components/Button6.xml" xy="56,1184" group="n34_wono">
       <Button icon="ui://mbo439wbq08xl"/>
       <Button icon="ui://mbo439wbq08xl"/>
     </component>
     </component>
     <component id="n29_8lqj" name="btnHide" src="f4xv3o" fileName="components/Button6.xml" xy="56,1326" group="n34_wono">
     <component id="n29_8lqj" name="btnHide" src="f4xv3o" fileName="components/Button6.xml" xy="56,1326" group="n34_wono">
@@ -79,7 +79,7 @@
     <component id="n22_f4xv" name="btnDelete" src="f4xv3o" fileName="components/Button6.xml" xy="56,1610" group="n34_wono">
     <component id="n22_f4xv" name="btnDelete" src="f4xv3o" fileName="components/Button6.xml" xy="56,1610" group="n34_wono">
       <Button icon="ui://mbo439wbq08xn"/>
       <Button icon="ui://mbo439wbq08xn"/>
     </component>
     </component>
-    <group id="n34_wono" name="n34" xy="56,1184" size="110,536" group="n30_8lqj" advanced="true" layout="vt" lineGap="32" excludeInvisibles="true">
+    <group id="n34_wono" name="n34" xy="56,900" size="110,820" group="n30_8lqj" advanced="true" layout="vt" lineGap="32" excludeInvisibles="true">
       <relation target="" sidePair="left-left,bottom-bottom"/>
       <relation target="" sidePair="left-left,bottom-bottom"/>
     </group>
     </group>
     <group id="n30_8lqj" name="grpContent" xy="35,0" size="1275,1920" advanced="true">
     <group id="n30_8lqj" name="grpContent" xy="35,0" size="1275,1920" advanced="true">

+ 1 - 1
FGUIProject/assets/DressUp/components/Button12.xml

@@ -4,6 +4,6 @@
   <displayList>
   <displayList>
     <loader id="n3_i3ix" name="icon" xy="0,0" size="84,84" url="ui://mbo439wbxmtl4x" autoSize="true"/>
     <loader id="n3_i3ix" name="icon" xy="0,0" size="84,84" url="ui://mbo439wbxmtl4x" autoSize="true"/>
   </displayList>
   </displayList>
-  <Button mode="Radio"/>
+  <Button/>
   <relation target="n3_i3ix" sidePair="width-width,height-height"/>
   <relation target="n3_i3ix" sidePair="width-width,height-height"/>
 </component>
 </component>

+ 7 - 7
FGUIProject/assets/Main/StoryCardChooseUI.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1639">
+<component size="1080,1468">
   <displayList>
   <displayList>
-    <image id="n7_sx2v" name="n7" src="sx2v9r" fileName="imagesStory/zd_tctcdi_1.png" xy="0,-600" size="1080,2228"/>
+    <image id="n7_sx2v" name="n7" src="sx2v9r" fileName="imagesStory/zd_tctcdi_1.png" xy="0,-530" size="1080,2228"/>
     <image id="n9_wzce" name="n9" src="sx2v9u" fileName="imagesStory/zd_tctcxian_1.png" xy="320,178"/>
     <image id="n9_wzce" name="n9" src="sx2v9u" fileName="imagesStory/zd_tctcxian_1.png" xy="320,178"/>
     <loader id="n4_cn27" name="loaScore" xy="658,114" size="58,58" aspect="true" visible="false" url="ui://eg2y0ldp842s6h" fill="scaleMatchWidth">
     <loader id="n4_cn27" name="loaScore" xy="658,114" size="58,58" aspect="true" visible="false" url="ui://eg2y0ldp842s6h" fill="scaleMatchWidth">
       <relation target="n5_cn27" sidePair="left-right"/>
       <relation target="n5_cn27" sidePair="left-right"/>
@@ -18,7 +18,7 @@
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
     </list>
-    <list id="n0_r1a9" name="listCard" xy="41,415" size="998,961" layout="flow_hz" overflow="scroll" lineGap="15" colGap="10" defaultItem="ui://mfvz4q8kr1a99f" autoClearItems="true">
+    <list id="n0_r1a9" name="listCard" xy="41,415" size="998,813" layout="flow_hz" overflow="scroll" lineGap="15" colGap="10" defaultItem="ui://mfvz4q8kr1a99f" autoClearItems="true">
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
@@ -38,13 +38,13 @@
       <item/>
       <item/>
     </list>
     </list>
     <component id="n17_ofwu" name="comSkillTips" src="ofwup2" fileName="components/ComArenaSkillTips.xml" xy="99,316" visible="false"/>
     <component id="n17_ofwu" name="comSkillTips" src="ofwup2" fileName="components/ComArenaSkillTips.xml" xy="99,316" visible="false"/>
-    <image id="n18_ebfi" name="n18" src="ebfipr" fileName="imagesStory/zd_tctcdi_1_zz.png" xy="30,1270"/>
-    <component id="n2_r1a9" name="btnCancel" src="ih7595" fileName="components/Button11.xml" pkg="mk0fwx0x" xy="129,1435" group="n12_ofwu">
+    <image id="n18_ebfi" name="n18" src="ebfipr" fileName="imagesStory/zd_tctcdi_1_zz.png" xy="51,1119"/>
+    <component id="n2_r1a9" name="btnCancel" src="ih7595" fileName="components/Button11.xml" pkg="mk0fwx0x" xy="129,1294" group="n12_ofwu">
       <Button title="取消"/>
       <Button title="取消"/>
     </component>
     </component>
-    <component id="n3_r1a9" name="btnConfirm" src="ih7594" fileName="components/Button10.xml" pkg="mk0fwx0x" xy="571,1435" group="n12_ofwu">
+    <component id="n3_r1a9" name="btnConfirm" src="ih7594" fileName="components/Button10.xml" pkg="mk0fwx0x" xy="571,1294" group="n12_ofwu">
       <Button title="确认"/>
       <Button title="确认"/>
     </component>
     </component>
-    <group id="n12_ofwu" name="n12" xy="129,1435" size="822,105"/>
+    <group id="n12_ofwu" name="n12" xy="129,1294" size="822,105"/>
   </displayList>
   </displayList>
 </component>
 </component>

BIN
FGUIProject/assets/Main/imagesStory/zd_tctcdi_1.png


BIN
FGUIProject/assets/Main/imagesStory/zd_tctcdi_1_zz.png


+ 8 - 2
GameClient/Assets/Game/HotUpdate/Data/FightDataManager.cs

@@ -239,8 +239,12 @@ namespace GFGGame
             int leagueSkillScore = LeagueDataManager.Instance.GetAllSkillScore(scoreType);
             int leagueSkillScore = LeagueDataManager.Instance.GetAllSkillScore(scoreType);
             arrayList.Sort((CardData a, CardData b) =>
             arrayList.Sort((CardData a, CardData b) =>
             {
             {
-                double scoreA = GetSkillFightScore(itemSum, baseScore, leagueSkillScore, a.id, a.scores[scoreType], SkillDataManager.Instance.GetCardSkillLvs(a.id));
-                double scoreB = GetSkillFightScore(itemSum, baseScore, leagueSkillScore, b.id, b.scores[scoreType], SkillDataManager.Instance.GetCardSkillLvs(b.id));
+                List<int> skillLvsA = SkillDataManager.Instance.GetCardSkillLvs(a.id);
+                List<int> skillLvsB = SkillDataManager.Instance.GetCardSkillLvs(b.id);
+                double addA = a.scores[scoreType] * ConstScoreSystem.PERFECT_SCORE * ConstScoreSystem.CLICK_SCORE / ConstScoreSystem.PART_SCORE * 6d;
+                double addB = b.scores[scoreType] * ConstScoreSystem.PERFECT_SCORE * ConstScoreSystem.CLICK_SCORE / ConstScoreSystem.PART_SCORE * 6d;
+                double scoreA = GetSkillFightScore(itemSum, baseScore, leagueSkillScore, a.id, a.scores[scoreType], skillLvsA) + addA;
+                double scoreB = GetSkillFightScore(itemSum, baseScore, leagueSkillScore, b.id, b.scores[scoreType], skillLvsB) + addB;
                 if (scoreA < scoreB)
                 if (scoreA < scoreB)
                 {
                 {
                     return 1;
                     return 1;
@@ -276,6 +280,8 @@ namespace GFGGame
                 if (skillLvlCfg == null) continue;
                 if (skillLvlCfg == null) continue;
                 skillScore += skillBaseScore * ((float)skillLvlCfg.fightPowerParam / 10000f);
                 skillScore += skillBaseScore * ((float)skillLvlCfg.fightPowerParam / 10000f);
             }
             }
+            ET.Log.Debug("cardId:" + cardId);
+            ET.Log.Debug("skillScore:" + skillScore);
             return (long)Math.Ceiling(skillScore); ;
             return (long)Math.Ceiling(skillScore); ;
         }
         }
 
 

+ 43 - 117
GameClient/Assets/Game/HotUpdate/DressUp/MyDressUpHelper.cs

@@ -18,6 +18,10 @@ namespace GFGGame
                 return _dressUpObj;
                 return _dressUpObj;
             }
             }
         }
         }
+        private static int _stepIndex = -1;
+        public static int stepIndex { get { return _stepIndex; } }
+        private static List<DressUpData> _dressMemory = new List<DressUpData>();
+        public const int MAX_MEMORY_STEP = 20;//最大记录步数
 
 
         public static CustomSuitData GetCurSuitDataClone(int index)
         public static CustomSuitData GetCurSuitDataClone(int index)
         {
         {
@@ -64,7 +68,7 @@ namespace GFGGame
                 {
                 {
                     isShangYi = true;
                     isShangYi = true;
                 }
                 }
-                if(itemCfg.subType == ConstDressUpItemType.NEI_DA && itemCfg.id != ConstItemID.DEFULT_NEI_DA)
+                if (itemCfg.subType == ConstDressUpItemType.NEI_DA && itemCfg.id != ConstItemID.DEFULT_NEI_DA)
                 {
                 {
                     isShangYi = true;
                     isShangYi = true;
                 }
                 }
@@ -111,113 +115,6 @@ namespace GFGGame
             return count;
             return count;
         }
         }
 
 
-        // public static void PutOnRecommendItems()
-        // {
-        //     List<int> recommendList = DressUpMenuItemDataManager.GetRecommendItemList();
-        //     StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
-        //     StoryFightCfg fightCfg = StoryFightCfgArray.Instance.GetCfg(levelCfg.fightID);
-        //     int liangyiqunIndex = -1;
-        //     int shangyiIndex = -1;
-        //     int xiazhuangIndex = -1;
-        //     int neidaIndex = -1;
-        //     for (int i = 0; i < recommendList.Count; i++)
-        //     {
-        //         int subType = ItemUtilCS.GetItemSubType(recommendList[i]);
-        //         if (subType == ConstDressUpItemType.LIAN_YI_QUN)
-        //         {
-        //             liangyiqunIndex = i;
-        //             continue;
-        //         }
-        //         if (subType == ConstDressUpItemType.SHANG_YI)
-        //         {
-        //             shangyiIndex = i;
-        //             continue;
-        //         }
-        //         if (subType == ConstDressUpItemType.XIA_ZHUANG)
-        //         {
-        //             xiazhuangIndex = i;
-        //             continue;
-        //         }
-        //         if (subType == ConstDressUpItemType.NEI_DA)
-        //         {
-        //             neidaIndex = i;
-        //             continue;
-
-        //         }
-        //     }
-
-        //     if (liangyiqunIndex >= 0 && (shangyiIndex >= 0 || xiazhuangIndex >= 0))
-        //     {
-        //         if (shangyiIndex < 0 && xiazhuangIndex >= 0) recommendList.RemoveAt(xiazhuangIndex);//上衣下装只有一件,则保留连衣裙
-        //         if (xiazhuangIndex < 0 && shangyiIndex >= 0) recommendList.RemoveAt(shangyiIndex);
-
-        //         if (shangyiIndex >= 0 && xiazhuangIndex >= 0)//同时拥有上衣、下装、连衣裙
-        //         {
-        //             int lianyiqunScore = ItemDataManager.GetItemAdditionScore(recommendList[liangyiqunIndex], InstanceZonesDataManager.currentScoreType);
-        //             int shangyiScore = ItemDataManager.GetItemAdditionScore(recommendList[shangyiIndex], InstanceZonesDataManager.currentScoreType);
-        //             int xiazhuangScore = ItemDataManager.GetItemAdditionScore(recommendList[xiazhuangIndex], InstanceZonesDataManager.currentScoreType);
-        //             int neidaScore = neidaIndex >= 0 ? ItemDataManager.GetItemAdditionScore(recommendList[neidaIndex], InstanceZonesDataManager.currentScoreType) : 0;
-        //             int subType = ItemUtilCS.GetItemSubType(fightCfg.needItemId);
-        //             if (fightCfg.needItemId > 0 && recommendList.IndexOf(fightCfg.needItemId) >= 0 && (subType == ConstDressUpItemType.SHANG_YI || subType == ConstDressUpItemType.XIA_ZHUANG || subType == ConstDressUpItemType.NEI_DA || subType == ConstDressUpItemType.LIAN_YI_QUN))//推荐列表里有必需品且,必需品类型为上衣或下装或连衣裙,有先穿戴必须品,其次穿戴高分服装
-        //             {
-        //                 if (subType == ConstDressUpItemType.LIAN_YI_QUN)
-        //                 {
-        //                     shangyiIndex = CheckIndex(ConstDressUpItemType.SHANG_YI, recommendList);
-        //                     if (shangyiIndex >= 0) recommendList.RemoveAt(shangyiIndex);
-        //                     xiazhuangIndex = CheckIndex(ConstDressUpItemType.XIA_ZHUANG, recommendList);
-        //                     if (xiazhuangIndex >= 0) recommendList.RemoveAt(xiazhuangIndex);
-        //                     neidaIndex = CheckIndex(ConstDressUpItemType.NEI_DA, recommendList);
-        //                     if (neidaIndex >= 0) recommendList.RemoveAt(neidaIndex);
-        //                 }
-        //                 else if (subType == ConstDressUpItemType.SHANG_YI || subType == ConstDressUpItemType.XIA_ZHUANG || subType == ConstDressUpItemType.NEI_DA)
-        //                 {
-        //                     liangyiqunIndex = CheckIndex(ConstDressUpItemType.LIAN_YI_QUN, recommendList);
-        //                     if (liangyiqunIndex >= 0) recommendList.RemoveAt(liangyiqunIndex);
-        //                 }
-        //             }
-        //             else
-        //             {
-        //                 if (lianyiqunScore > shangyiScore + xiazhuangScore + neidaScore)
-        //                 {
-        //                     shangyiIndex = CheckIndex(ConstDressUpItemType.SHANG_YI, recommendList);
-        //                     if (shangyiIndex >= 0) recommendList.RemoveAt(shangyiIndex);
-        //                     xiazhuangIndex = CheckIndex(ConstDressUpItemType.XIA_ZHUANG, recommendList);
-        //                     if (xiazhuangIndex >= 0) recommendList.RemoveAt(xiazhuangIndex);
-        //                     neidaIndex = CheckIndex(ConstDressUpItemType.NEI_DA, recommendList);
-        //                     if (neidaIndex >= 0) recommendList.RemoveAt(neidaIndex);
-        //                 }
-        //                 else
-        //                 {
-        //                     liangyiqunIndex = CheckIndex(ConstDressUpItemType.LIAN_YI_QUN, recommendList);
-        //                     if (liangyiqunIndex >= 0) recommendList.RemoveAt(liangyiqunIndex);
-        //                 }
-        //             }
-        //         }
-        //     }
-        //     //推荐搭配自动穿必穿品
-        //     if (fightCfg.needItemId > 0 && DressUpMenuItemDataManager.CheckHasItem(fightCfg.needItemId) && recommendList.IndexOf(fightCfg.needItemId) < 0)
-        //     {
-        //         int subType = ItemUtilCS.GetItemSubType(fightCfg.needItemId);
-        //         for (int i = 0; i < recommendList.Count; i++)
-        //         {
-        //             int recommendSubType = ItemUtilCS.GetItemSubType(recommendList[i]);
-        //             if (recommendSubType == subType)
-        //             {
-        //                 recommendList.RemoveAt(i);
-        //                 break;
-        //             }
-        //         }
-        //         recommendList.Add(fightCfg.needItemId);
-        //     }
-        //     else if (fightCfg.needSuitId > 0 && DressUpMenuSuitDataManager.CheckHaveSuit(fightCfg.needSuitId))
-        //     {
-        //         recommendList.Clear();
-        //         SuitCfg cfg = SuitCfgArray.Instance.GetCfg(fightCfg.needSuitId);
-        //         recommendList.AddRange(cfg.partsArr);
-        //     }
-        //     dressUpObj.PutOnItemList(recommendList);
-        // }
-
         public static void PutOnRecommendItems2()
         public static void PutOnRecommendItems2()
         {
         {
             Dictionary<int, List<int>> itemsDic = GetRecommendItems();
             Dictionary<int, List<int>> itemsDic = GetRecommendItems();
@@ -421,19 +318,48 @@ namespace GFGGame
             items.AddRange(ornamentItems);
             items.AddRange(ornamentItems);
             return items;
             return items;
         }
         }
-        private static int CheckIndex(int _subType, List<int> recommendList)
+
+
+        public static bool OnClickBtnLastStep()
         {
         {
-            for (int i = 0; i < recommendList.Count; i++)
-            {
-                int itemSubType = ItemUtilCS.GetItemSubType(recommendList[i]);
-                if (itemSubType == _subType)
-                {
-                    return i;
+            if (_stepIndex - 1 < 0) return false;
+            _stepIndex--;
+            MyDressUpHelper.dressUpObj.PutOnDressUpData(_dressMemory[_stepIndex]);
+            // _ui.m_comboBox.selectedIndex = _dressMemory[_stepIndex].pos;
+            // UpdateStepBtn();
+            return true;
+        }
+        public static bool OnClickBtnNextStep()
+        {
+            if (_stepIndex + 1 >= MAX_MEMORY_STEP) return false;
+            _stepIndex++;
+            MyDressUpHelper.dressUpObj.PutOnDressUpData(_dressMemory[_stepIndex]);
+            // _ui.m_comboBox.selectedIndex = _dressMemory[_stepIndex].pos;
+            // UpdateStepBtn();
+            return true;
+        }
 
 
-                }
+        public static void AddMemoryDressup()
+        {
+            _stepIndex++;
+            if (_stepIndex == MAX_MEMORY_STEP)
+            {
+                _stepIndex = MAX_MEMORY_STEP - 1;
+                _dressMemory.RemoveAt(0);
+            }
+            if (_dressMemory.Count > _stepIndex)
+            {
+                _dressMemory.RemoveRange(_stepIndex, _dressMemory.Count - _stepIndex);
             }
             }
-            return -1;
+            _dressMemory.Add(MyDressUpHelper.dressUpObj.DressUpDataClone());
+            // UpdateStepBtn();
         }
         }
 
 
+        public static void ResetMemory()
+        {
+            DressUpMenuItemDataManager.Clear();
+            _stepIndex = -1;
+            _dressMemory.Clear();
+        }
     }
     }
 }
 }

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -225,7 +225,7 @@ namespace GFGGame
                 _cardObj = null;
                 _cardObj = null;
             }
             }
             string resPath = ResPathUtil.GetCardAnimationPath(_cardData.resources[_cardData.resIndex]);
             string resPath = ResPathUtil.GetCardAnimationPath(_cardData.resources[_cardData.resIndex]);
-            if (Versions.Contains(resPath))
+            if (_cardData.itemCfg.animationCardStar > 0 && _cardData.star >= _cardData.itemCfg.animationCardStar && Versions.Contains(resPath))
             {
             {
                 SceneController.AddObjectToView(_cardObj, _wrapper, _ui.m_comCard.m_comCardHolder.m_holder, resPath, out _cardObj, out _wrapper);
                 SceneController.AddObjectToView(_cardObj, _wrapper, _ui.m_comCard.m_comCardHolder.m_holder, resPath, out _cardObj, out _wrapper);
             }
             }
@@ -733,9 +733,9 @@ namespace GFGGame
             if (result)
             if (result)
             {
             {
 
 
-                this.UpdateCommon();
-                this.UpdateUpStarView();
-
+                UpdateCommon();
+                UpdateUpStarView();
+                UpdateCardRes();
                 // this._selectTab = _comFosterBottom.m_ctrlTab.selectedIndex;
                 // this._selectTab = _comFosterBottom.m_ctrlTab.selectedIndex;
                 ViewManager.Show(ViewName.CARD_UP_VIEW, new object[] { _cardData.scores, "star", _cardData.star - 1, _cardData.star }, new object[] { ViewName.CARD_FOSTER_VIEW, _cardData });
                 ViewManager.Show(ViewName.CARD_UP_VIEW, new object[] { _cardData.scores, "star", _cardData.star - 1, _cardData.star }, new object[] { ViewName.CARD_FOSTER_VIEW, _cardData });
                 LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.CI_PAI, 2);
                 LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.CI_PAI, 2);

+ 11 - 32
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs

@@ -34,8 +34,8 @@ namespace GFGGame
         private UI_TypeItem listTypeItem_FreedomDress;
         private UI_TypeItem listTypeItem_FreedomDress;
         private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
         private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
         private int currentIndex = 0;
         private int currentIndex = 0;
-        private int _stepIndex = -1;
-        private List<CustomSuitData> _dressMemory = new List<CustomSuitData>();
+        // private int _stepIndex = -1;
+        // private List<DressUpData> _dressMemory = new List<DressUpData>();
         public override void Dispose()
         public override void Dispose()
         {
         {
             if (_sceneObject != null)
             if (_sceneObject != null)
@@ -206,23 +206,16 @@ namespace GFGGame
         private void Reset()
         private void Reset()
         {
         {
             DressUpMenuItemDataManager.Clear();
             DressUpMenuItemDataManager.Clear();
-            _stepIndex = -1;
-            _dressMemory.Clear();
+            MyDressUpHelper.ResetMemory();
         }
         }
         private void OnClickBtnLastStep()
         private void OnClickBtnLastStep()
         {
         {
-            if (_stepIndex - 1 < 0) return;
-            _stepIndex--;
-            MyDressUpHelper.dressUpObj.PutOnDressUpData(_dressMemory[_stepIndex].dressUpData);
-            _ui.m_comboBox.selectedIndex = _dressMemory[_stepIndex].pos;
+            if (!MyDressUpHelper.OnClickBtnLastStep()) return;
             UpdateStepBtn();
             UpdateStepBtn();
         }
         }
         private void OnClickBtnNextStep()
         private void OnClickBtnNextStep()
         {
         {
-            if (_stepIndex + 1 >= MAX_MEMORY_STEP) return;
-            _stepIndex++;
-            MyDressUpHelper.dressUpObj.PutOnDressUpData(_dressMemory[_stepIndex].dressUpData);
-            _ui.m_comboBox.selectedIndex = _dressMemory[_stepIndex].pos;
+            if (!MyDressUpHelper.OnClickBtnNextStep()) return;
             UpdateStepBtn();
             UpdateStepBtn();
 
 
         }
         }
@@ -336,7 +329,7 @@ namespace GFGGame
                     MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
                     MyDressUpHelper.dressUpObj.AddOrRemove(id, true);
                 }
                 }
             }
             }
-
+            MyDressUpHelper.AddMemoryDressup();
             UpdateListPartsSelected(id);
             UpdateListPartsSelected(id);
             UpdateListSuitPartsSelected();
             UpdateListSuitPartsSelected();
             // AddMemoryDressup();
             // AddMemoryDressup();
@@ -391,29 +384,14 @@ namespace GFGGame
             {
             {
                 MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(id);
                 MyDressUpHelper.dressUpObj.PutOnOrTakeOffAction(id);
             }
             }
-
+            MyDressUpHelper.AddMemoryDressup();
             UpdateListSuitPartsSelected();
             UpdateListSuitPartsSelected();
         }
         }
-        private void AddMemoryDressup()
-        {
-            _stepIndex++;
-            if (_stepIndex == MAX_MEMORY_STEP)
-            {
-                _stepIndex = MAX_MEMORY_STEP - 1;
-                _dressMemory.RemoveAt(0);
-            }
-            if (_dressMemory.Count > _stepIndex)
-            {
-                _dressMemory.RemoveRange(_stepIndex, _dressMemory.Count - _stepIndex);
-            }
-            CustomSuitData suitSavedData = MyDressUpHelper.GetCurSuitDataClone(_ui.m_comboBox.selectedIndex);
-            _dressMemory.Add(suitSavedData);
-            UpdateStepBtn();
-        }
+
         private void UpdateStepBtn()
         private void UpdateStepBtn()
         {
         {
-            _ui.m_btnLastStep.enabled = _stepIndex > 0;
-            _ui.m_btnNextStep.enabled = _stepIndex < _dressMemory.Count - 1;
+            _ui.m_btnLastStep.enabled = MyDressUpHelper.stepIndex > 0;
+            _ui.m_btnNextStep.enabled = MyDressUpHelper.stepIndex < MyDressUpHelper.MAX_MEMORY_STEP - 1;
         }
         }
 
 
         private void OnLongPress(EventContext context)
         private void OnLongPress(EventContext context)
@@ -468,6 +446,7 @@ namespace GFGGame
             UpdateBtnAction();
             UpdateBtnAction();
             _ui.m_partsList.m_list.numItems = _currentList3.Count;
             _ui.m_partsList.m_list.numItems = _currentList3.Count;
             _ui.m_partsList2.m_list.numItems = _currentList4.Count;
             _ui.m_partsList2.m_list.numItems = _currentList4.Count;
+            MyDressUpHelper.AddMemoryDressup();
         }
         }
 
 
         private void OnClickBtnSave()
         private void OnClickBtnSave()

+ 9 - 6
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographSaveView.cs

@@ -47,9 +47,9 @@ namespace GFGGame
         {
         {
             base.OnHide();
             base.OnHide();
             _ui.m_btnSave.selected = false;
             _ui.m_btnSave.selected = false;
-            _ui.m_btnSave.touchable = true;
+            _ui.m_btnSave.enabled = true;
             _ui.m_btnSavePhoto.selected = false;
             _ui.m_btnSavePhoto.selected = false;
-            _ui.m_btnSavePhoto.touchable = true;
+            _ui.m_btnSavePhoto.enabled = true;
             Timers.inst.Remove(CheckGuide);
             Timers.inst.Remove(CheckGuide);
         }
         }
 
 
@@ -91,8 +91,11 @@ namespace GFGGame
                 };
                 };
                 Permission.RequestUserPermission(Permission.ExternalStorageWrite, permissionCallbacks);
                 Permission.RequestUserPermission(Permission.ExternalStorageWrite, permissionCallbacks);
             }
             }
-            LocalCache.SetBool(GameConst.WRITE_EXTERNAL_STORAGE_FORBIDDEN, false);
-            TrySavePicturoToLocal();
+            else
+            {
+                LocalCache.SetBool(GameConst.WRITE_EXTERNAL_STORAGE_FORBIDDEN, false);
+                TrySavePicturoToLocal();
+            }
         }
         }
 
 
         private void TrySavePicturoToLocal()
         private void TrySavePicturoToLocal()
@@ -101,7 +104,7 @@ namespace GFGGame
             {
             {
                 string fileName = "wsj" + TimeHelper.ServerNowSecs + ".jpg";
                 string fileName = "wsj" + TimeHelper.ServerNowSecs + ".jpg";
                 PhotographUtil.Instance.SavePicturoToLocal(bytes, fileName);
                 PhotographUtil.Instance.SavePicturoToLocal(bytes, fileName);
-                _ui.m_btnSave.touchable = false;
+                _ui.m_btnSave.enabled = false;
             }
             }
         }
         }
 
 
@@ -140,7 +143,7 @@ namespace GFGGame
                 }
                 }
             }
             }
 
 
-            _ui.m_btnSavePhoto.touchable = false;
+            _ui.m_btnSavePhoto.enabled = false;
 
 
         }
         }
 
 

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightFailView.cs

@@ -55,6 +55,7 @@ namespace GFGGame
         {
         {
             base.OnHide();
             base.OnHide();
             _cfgs.Clear();
             _cfgs.Clear();
+            if (_ui.m_list.numItems > 0) _ui.m_list.ScrollToView(0);
         }
         }
 
 
         protected override void RemoveEventListener()
         protected override void RemoveEventListener()
@@ -91,11 +92,14 @@ namespace GFGGame
             {
             {
                 param[i] = cfg.jumpParamArr[i];
                 param[i] = cfg.jumpParamArr[i];
             }
             }
-            // ViewManager.Hide<StroyFightResultView>();
+            if (cfg.jumpId != nameof(FirstChargeBonusView))
+            {
 
 
+                ViewManager.Hide<StroyFightResultView>();
+                Hide();
+            }
             ViewManager.JumpToView(cfg.jumpId, param, null);
             ViewManager.JumpToView(cfg.jumpId, param, null);
             // ViewManager.Show<MainUIView>();
             // ViewManager.Show<MainUIView>();
-            //  Hide();
 
 
         }
         }
     }
     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StroyFightResultView.cs

@@ -215,8 +215,8 @@ namespace GFGGame
                 if (!this._resultData.Result) ViewManager.Show<StoryFightFailView>();
                 if (!this._resultData.Result) ViewManager.Show<StoryFightFailView>();
 
 
                 InstanceZonesDataManager.isResultFighting = false;
                 InstanceZonesDataManager.isResultFighting = false;
+                _ui.m_btnClose.enabled = true;
             });
             });
-            _ui.m_btnClose.enabled = true;
 
 
             UpdateToCheckGuide(null);
             UpdateToCheckGuide(null);
         }
         }

BIN
GameClient/Assets/ResIn/UI/DressUp/DressUp_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_4!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_4.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes