Преглед на файлове

从合成界面跳转到服装店的时候直接跳出弹框

zhaoyang преди 3 години
родител
ревизия
276efbefb6

+ 1 - 1
FGUIProject/assets/ClothingSynthetic/ClothingSyntheticUI.xml

@@ -35,7 +35,7 @@
       <item/>
       <item/>
     </list>
-    <text id="n38_ja9w" name="n38" xy="244,1278" size="562,41" fontSize="30" color="#917960" text="* 所有材料衣服制作 后都会保留最后一件 *"/>
+    <text id="n38_ja9w" name="n38" xy="194,1278" size="691,42" fontSize="30" color="#917960" text="* 系统默认保留一件衣服,余下的才能作为合成材料*"/>
     <image id="n39_ja9w" name="n39" src="j53911" fileName="images/hc_xiant_1.png" xy="91,1487"/>
     <image id="n41_ja9w" name="n41" src="j539t" fileName="images/hc_kuang_3.png" pkg="eg2y0ldp" xy="623,1333"/>
     <text id="n42_ja9w" name="txtCost" xy="630,1336" size="160,34" fontSize="24" color="#a27b56" vars="true" text="花费{v1=1000}{v2=金币}">

+ 13 - 4
GameClient/Assets/Game/HotUpdate/Views/ClothingShop/ClothingShopView.cs

@@ -33,6 +33,7 @@ namespace GFGGame
 
         private int _selectedItemId;//打开界面时选中的物品id
         private int _selectedType = 0;//打开界面时选中的物品类型
+        private int _selectedItemCount;
         private int _selectedItemClothingId;
 
         public override void Dispose()
@@ -96,13 +97,14 @@ namespace GFGGame
 
             _storeId = ConstStoreId.CLOTHING_STORE_ID;
             _scoreType = 0;
-            _selectedItemId = -1;
+            _selectedItemId = 0;
             _selectedType = 0;
             if (this.viewData != null)
             {
                 //this.viewData[0]=storeId(商店Id)
                 //this.viewData[1]=_scoreType(服装属性:风花雪月)
                 //this.viewData[2]=_selectedItemId
+                //this.viewData[2]=_selectedItemCount
                 object[] objs = this.viewData as object[];
                 if (objs.Length > 0 && objs[0] != null)
                 {
@@ -115,6 +117,7 @@ namespace GFGGame
                 if (objs.Length > 2 && objs[2] != null)
                 {
                     _selectedItemId = (int)objs[2];//从物品来源面板跳转到商店,需要物品id方便打开界面时做选中处理
+                    _selectedItemCount = (int)objs[3];
                     ClothingShopCfg[] dataArray = ClothingShopCfgArray.Instance.dataArray;
                     for (int i = 0; i < dataArray.Length; i++)
                     {
@@ -154,7 +157,10 @@ namespace GFGGame
             {
                 _valueBarController.Controller(3);
             }
-
+            if (_selectedItemId > 0)
+            {
+                BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, _selectedItemCount, null, true, false, MAX_COUNT);
+            }
             GuideController.TryGuideClothingShopViewBtnBug(_ui.m_compItemInfo.m_btnBuy);
         }
 
@@ -171,6 +177,7 @@ namespace GFGGame
             {
                 _wrapper.wrapTarget = null;
             }
+            _selectedItemId = 0;
             EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, UpdateSelectedItemInfo);
         }
 
@@ -186,7 +193,8 @@ namespace GFGGame
         private void OnclickBtnBuy()
         {
             GuideController.HideGuide();
-            BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, INIT_COUNT, null, true, false, MAX_COUNT);
+            int count = _selectedItemId > 0 && _cfgSelected.itemID == _selectedItemId ? _selectedItemCount : INIT_COUNT;
+            BuyItemConteoller.Show(_cfgSelected.itemID, _cfgSelected.costID, INIT_COUNT, _cfgSelected.costNum, count, null, true, false, MAX_COUNT);
 
         }
         private void UpdateItemChange()
@@ -268,7 +276,7 @@ namespace GFGGame
                 {
                     itemIndex = _dataList.IndexOf(clothingShopCfg);
                     _ui.m_listShop.ScrollToView(itemIndex < 0 ? 0 : itemIndex);
-                    _selectedItemId = 0;
+                    // _selectedItemId = 0;
                 }
                 UpdateSelectedItemInfo(_ui.m_listShop.GetChildAt(itemIndex) as GComponent, tween);
             }
@@ -283,6 +291,7 @@ namespace GFGGame
 
         private void OnClickListShopItem(EventContext context)
         {
+            _selectedItemId = 0;
             UpdateSelectedItemInfo(context.data as GComponent, true);
         }
 

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/ClothingSyntheticView.cs

@@ -350,7 +350,9 @@ namespace GFGGame
             UI_Component3 groupCount = UI_Component3.Proxy(context.sender as GObject);
             UI_MateriasListItem listItem = UI_MateriasListItem.Proxy(groupCount.target.parent);
             ItemData itemData = listItem.target.data as ItemData;
-            ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemData.id, new object[] { ViewName.CLOTHING_SYNTHETIC_VIEW, this.viewData } });
+            int num = ItemDataManager.GetItemNum(itemData.id);
+
+            ViewManager.Show(ViewName.APPROACH_OF_ITEM_VIEW, new object[] { itemData.id, new object[] { ViewName.CLOTHING_SYNTHETIC_VIEW, this.viewData }, itemData.num + 1 - num });
         }
 
         private void OnItemNumChanged()

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs

@@ -102,7 +102,9 @@ namespace GFGGame
             {
                 case ConstFunctionId.FU_ZHUANG_DIAN:
                     this.Hide();
-                    ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { null, null, _itemId }, _fromeViewDatas, true, true);
+                    object[] temp = viewData as object[];
+                    int count = temp.Length > 2 ? (int)temp[2] : 1;
+                    ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { null, null, _itemId, count }, _fromeViewDatas, true, true);
                     break;
                 case ConstFunctionId.JU_QING_GUAN_QIA:
                     string value = infos[1];

BIN
GameClient/Assets/ResIn/UI/ClothingSynthetic/ClothingSynthetic_fui.bytes