zhaoyang 3 tahun lalu
induk
melakukan
fe84c87ed7
30 mengubah file dengan 1022 tambahan dan 84 penghapusan
  1. 3 3
      FGUIProject/assets/Friend/FriendAddUI.xml
  2. 2 2
      FGUIProject/assets/Friend/FriendUI.xml
  3. 15 10
      FGUIProject/assets/Friend/components/ListItem.xml
  4. 9 2
      FGUIProject/assets/Friend/components/ListSearchItem.xml
  5. TEMPAT SAMPAH
      FGUIProject/assets/Friend/images/hy_dikuang_4.png
  6. 1 0
      FGUIProject/assets/Friend/package.xml
  7. 4 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs
  8. 3 0
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  9. 176 0
      GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs
  10. 35 0
      GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs
  11. 1 0
      GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs
  12. 2 2
      GameClient/Assets/Game/HotUpdate/Data/VO/CustomSuitData.cs
  13. 10 0
      GameClient/Assets/Game/HotUpdate/Data/VO/FriendInfoData.cs
  14. 11 0
      GameClient/Assets/Game/HotUpdate/Data/VO/FriendInfoData.cs.meta
  15. 17 0
      GameClient/Assets/Game/HotUpdate/Data/VO/RoleInfoData.cs
  16. 11 0
      GameClient/Assets/Game/HotUpdate/Data/VO/RoleInfoData.cs.meta
  17. 9 9
      GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs
  18. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_FriendUI.cs
  19. 5 5
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_ListItem.cs
  20. 9 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_ListSearchItem.cs
  21. 396 5
      GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs
  22. 41 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/RoleInfoSProxy.cs
  23. 11 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/RoleInfoSProxy.cs.meta
  24. 1 1
      GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpView.cs
  25. 80 19
      GameClient/Assets/Game/HotUpdate/Views/Friend/FriendAddView.cs
  26. 163 21
      GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs
  27. 1 0
      GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs
  28. 3 2
      GameClient/Assets/Game/HotUpdate/Views/MainUI/RoleInfoView.cs
  29. TEMPAT SAMPAH
      GameClient/Assets/ResIn/UI/Friend/Friend_atlas0.png
  30. TEMPAT SAMPAH
      GameClient/Assets/ResIn/UI/Friend/Friend_fui.bytes

+ 3 - 3
FGUIProject/assets/Friend/FriendAddUI.xml

@@ -14,7 +14,7 @@
     </component>
     <image id="n29_z73e" name="n29" src="z73ey" fileName="images/hy_tjhy_ssk.png" xy="101,176" group="n34_z73e"/>
     <text id="n5_pdeo" name="txtSearch" xy="126,182" size="478,65" group="n34_z73e" fontSize="44" color="#948364" ubb="true" autoSize="none" autoClearText="true" text="" input="true" prompt="[color=#BCB196]输入玩家名称[/color]"/>
-    <component id="n31_z73e" name="btnClear" src="z73e1a" fileName="components/BtnClear.xml" xy="606,182" group="n34_z73e"/>
+    <component id="n31_z73e" name="btnClear" src="z73e1a" fileName="components/BtnClear.xml" xy="620,182" group="n34_z73e"/>
     <component id="n6_pdeo" name="btnSearch" src="pdeog" fileName="components/BtnSearch.xml" xy="697,170" group="n34_z73e">
       <Button icon="ui://wez2ujnnz73e13"/>
     </component>
@@ -25,7 +25,7 @@
       <Button icon="ui://wez2ujnnz73e12"/>
     </component>
     <group id="n33_z73e" name="n33" xy="102,280" size="845,88" group="n17_pdeo"/>
-    <list id="n16_pdeo" name="listSearch" xy="78,389" size="905,702" group="n17_pdeo" overflow="hidden" lineGap="24" defaultItem="ui://wez2ujnnpdeoi">
+    <list id="n16_pdeo" name="listSearch" xy="78,389" size="905,702" group="n17_pdeo" overflow="scroll" lineGap="24" defaultItem="ui://wez2ujnnpdeoi" autoClearItems="true">
       <item/>
       <item/>
       <item/>
@@ -35,7 +35,7 @@
     <group id="n17_pdeo" name="grpSearch" xy="78,170" size="905,921" advanced="true">
       <gearDisplay controller="c1" pages="0"/>
     </group>
-    <list id="n22_pdeo" name="listApply" xy="76,177" size="910,790" group="n25_pdeo" overflow="scroll" lineGap="24" defaultItem="ui://wez2ujnnpdeoj">
+    <list id="n22_pdeo" name="listApply" xy="76,177" size="910,790" group="n25_pdeo" overflow="scroll" lineGap="24" defaultItem="ui://wez2ujnnpdeoj" autoClearItems="true">
       <gearDisplay controller="c1" pages="1"/>
       <item/>
       <item/>

+ 2 - 2
FGUIProject/assets/Friend/FriendUI.xml

@@ -7,7 +7,7 @@
     <group id="n9_z73e" name="grpCount" xy="705,100" size="317,51"/>
     <image id="n17_z73e" name="n17" src="q08xs" fileName="imagesExport/hz_xzkuang.png" pkg="eg2y0ldp" xy="200,93" group="n13_z73e"/>
     <text id="n12_z73e" name="txtName" xy="370,98" pivot="0.5,0" size="71,46" group="n13_z73e" fontSize="34" color="#fff0db" text="套装"/>
-    <group id="n13_z73e" name="grpName" xy="200,93" size="412,62"/>
+    <group id="n13_z73e" name="grpName" xy="200,93" size="412,62" advanced="true"/>
     <image id="n18_z73e" name="n18" src="z73e1c" fileName="images/dz_hz_rwdh_1.png" xy="89,1265" group="n20_z73e">
       <relation target="" sidePair="bottom-bottom"/>
     </image>
@@ -25,7 +25,7 @@
     <group id="n16_z73e" name="n16" xy="40,1393" size="112,394" advanced="true" layout="vt" lineGap="17" excludeInvisibles="true">
       <relation target="" sidePair="left-left,bottom-bottom"/>
     </group>
-    <list id="n7_pdeo" name="list" xy="652,220" size="428,1460" overflow="scroll" lineGap="25" defaultItem="ui://wez2ujnnpdeo9">
+    <list id="n7_pdeo" name="list" xy="652,220" size="428,1460" overflow="scroll" defaultItem="ui://wez2ujnnpdeo9" autoClearItems="true">
       <relation target="" sidePair="right-right,top-top,bottomext-bottom"/>
       <item/>
       <item/>

+ 15 - 10
FGUIProject/assets/Friend/components/ListItem.xml

@@ -1,22 +1,27 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="428,150">
+<component size="440,184" extention="Button">
   <controller name="c1" pages="0,可领,1,可送,2,已送,3,已领" selected="0"/>
-  <controller name="c2" pages="0,,1," selected="1"/>
+  <controller name="c2" pages="0,在线,1,离线" selected="0"/>
+  <controller name="button" pages="0,up,1,down" selected="1"/>
   <displayList>
-    <image id="n14_z73e" name="n14" src="z73em" fileName="images/hy_dikuang_3.png" xy="0,0"/>
-    <component id="n3_pdeo" name="n3" src="pdeo3" fileName="components/CompHeadWithBg.xml" xy="27,13" pivot="0.5,0.5" size="124,124"/>
-    <image id="n11_z73e" name="n11" src="z73e17" fileName="images/zjm_dj_1.png" xy="116,93" group="n13_z73e"/>
-    <text id="n12_z73e" name="txtLvl" xy="123,99" size="29,29" group="n13_z73e" fontSize="20" color="#ffffff" align="center" text="99">
+    <image id="n14_z73e" name="n14" src="z73em" fileName="images/hy_dikuang_3.png" xy="12,17"/>
+    <image id="n16_gmjo" name="n16" src="gmjo1d" fileName="images/hy_dikuang_4.png" xy="0,0">
+      <gearDisplay controller="button" pages="1"/>
+    </image>
+    <component id="n3_pdeo" name="n3" src="pdeo3" fileName="components/CompHeadWithBg.xml" xy="39,30" pivot="0.5,0.5" size="124,124"/>
+    <image id="n11_z73e" name="n11" src="z73e17" fileName="images/zjm_dj_1.png" xy="128,110" group="n13_z73e"/>
+    <text id="n12_z73e" name="txtLvl" xy="135,116" size="29,29" group="n13_z73e" fontSize="20" color="#ffffff" align="center" text="99">
       <relation target="n11_z73e" sidePair="center-center,middle-middle"/>
     </text>
-    <group id="n13_z73e" name="n13" xy="116,93" size="42,43"/>
-    <text id="n4_pdeo" name="txtName" xy="165,15" size="230,52" fontSize="38" color="#927a58" text="角色名七个字"/>
-    <component id="n9_pdeo" name="btnSend" src="pdeo8" fileName="components/BtnModel.xml" xy="330,76">
+    <group id="n13_z73e" name="n13" xy="128,110" size="42,43"/>
+    <text id="n4_pdeo" name="txtName" xy="177,32" size="230,51" fontSize="38" color="#927a58" text="角色名七个字"/>
+    <component id="n9_pdeo" name="btnSend" src="pdeo8" fileName="components/BtnModel.xml" xy="342,93">
       <gearIcon controller="c1" pages="0,2,3" values="ui://wez2ujnnz73ep|ui://wez2ujnnz73eo|ui://wez2ujnnz73eq" default="ui://wez2ujnnz73en"/>
       <Button icon="ui://wez2ujnnz73ep"/>
     </component>
-    <loader id="n15_z73e" name="loaState" xy="169,95" size="100,28" url="ui://wez2ujnnz73ek" autoSize="true">
+    <loader id="n15_z73e" name="loaState" xy="181,112" size="100,28" url="ui://wez2ujnnz73eu" autoSize="true">
       <gearIcon controller="c2" pages="1" values="ui://wez2ujnnz73ek" default="ui://wez2ujnnz73eu"/>
     </loader>
   </displayList>
+  <Button mode="Radio"/>
 </component>

+ 9 - 2
FGUIProject/assets/Friend/components/ListSearchItem.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="905,147">
+  <controller name="c1" pages="0,,1," selected="1"/>
+  <controller name="c2" pages="0,,1," selected="0"/>
   <displayList>
     <image id="n16_z73e" name="n16" src="z73ex" fileName="images/hy_tjhy_dk.png" xy="0,0"/>
     <component id="n17_z73e" name="n17" src="pdeo3" fileName="components/CompHeadWithBg.xml" xy="40,11" pivot="0.5,0.5" size="124,124"/>
@@ -9,10 +11,15 @@
     </text>
     <group id="n20_z73e" name="n20" xy="127,90" size="42,43"/>
     <text id="n9_pdeo" name="txtName" xy="174,10" size="295,56" fontSize="42" color="#bb996c" text="角色名字七个字"/>
-    <text id="n10_pdeo" name="txtSlogan" xy="176,77" size="490,49" fontSize="36" color="#b5a999" autoSize="none" text="暂无简介"/>
     <component id="n13_pdeo" name="btnAdd" src="jdju1" fileName="components/BtnModel1.xml" xy="738,26" size="94,94">
+      <gearDisplay controller="c1" pages="0"/>
       <Button icon="ui://wez2ujnnz73e1b"/>
     </component>
-    <image id="n21_z73e" name="n21" src="z73ez" fileName="images/hy_ysqysq.png" xy="696,40"/>
+    <image id="n21_z73e" name="n21" src="z73ez" fileName="images/hy_ysqysq.png" xy="696,40">
+      <gearDisplay controller="c1" pages="1"/>
+    </image>
+    <loader id="n22_nfg4" name="loaState" xy="180,99" size="100,28" url="ui://wez2ujnnz73eu" autoSize="true">
+      <gearIcon controller="c2" pages="1" values="ui://wez2ujnnz73ek" default="ui://wez2ujnnz73eu"/>
+    </loader>
   </displayList>
 </component>

TEMPAT SAMPAH
FGUIProject/assets/Friend/images/hy_dikuang_4.png


+ 1 - 0
FGUIProject/assets/Friend/package.xml

@@ -46,6 +46,7 @@
     <component id="z73e1a" name="BtnClear.xml" path="/components/"/>
     <image id="z73e1b" name="hyhy_tjtja.png" path="/images/"/>
     <image id="z73e1c" name="dz_hz_rwdh_1.png" path="/images/"/>
+    <image id="gmjo1d" name="hy_dikuang_4.png" path="/images/"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Friend" packageCount="2" genCode="true"/>
 </packageDescription>

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -71,5 +71,9 @@ namespace GFGGame
         public const string FINSH_GUIDE_INDEX = "FINSH_GUIDE_INDEX";//完成一步引导
         public const string RED_CHANGE = "RED_CHANGE";//红点变化,新增或删除
 
+        public const string FRIEND_REFRESH = "FRIEND_REFRESH";//刷新好友列表
+        public const string FRIEND_ADD = "FRIEND_ADD";//新增好友
+        public const string FRIEND_REMOVE = "FRIEND_REMOVE";//删除好友
+        public const string FRIEND_APPLY_CHANGE = "FRIEND_APPLY_CHANGE";//好友申请列表变化
     }
 }

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -161,6 +161,7 @@ namespace GFGGame
             DressUpMenuItemDataManager.Clear();
             GuideDataManager.Clear();
             GetSuitItemController.Clear();
+            FriendDataManager.Instance.Clear();
             GameGlobal.zoneScene.GetComponent<SessionComponent>()?.Disconnect();
             GameGlobal.zoneScene.GetComponent<ServerInfosComponent>()?.ServerInfoList?.Clear();
             GameGlobal.zoneScene.GetComponent<AccountInfoComponent>()?.Clear();
@@ -231,6 +232,8 @@ namespace GFGGame
             StudioSProxy.ReqStudioInfos().Coroutine();
             NoticeSProxy.ReqSystemNoticeList().Coroutine();
             MailSProxy.ReqMailCount().Coroutine();
+            FriendSProxy.ReqAllFriendInfos().Coroutine();
+            RoleInfoSProxy.ReqPersonalInfo().Coroutine();
 
             EquipDataCache.cacher.autoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY) <= 0 ? false : true;
             EquipDataCache.cacher.fightSpeed = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY_SPEED) <= 1 ? 1 : StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY_SPEED);

+ 176 - 0
GameClient/Assets/Game/HotUpdate/Data/FriendDataManager.cs

@@ -1,7 +1,183 @@
+using System.Collections.Generic;
+using System.Linq;
+
 namespace GFGGame
 {
+
     public class FriendDataManager : SingletonBase<FriendDataManager>
     {
+        public void Clear()
+        {
+            _friendDic.Clear();
+            ClearRecommendDatas();
+            ClearSearchDatas();
+        }
+        private int _count = 0;
+        public int Count//今日已领体力数
+        {
+            get
+            {
+                return _count;
+            }
+            set
+            {
+                _count = value;
+            }
+        }
+
+        private Dictionary<long, FriendInfoData> _friendDic = new Dictionary<long, FriendInfoData>();//好友列表
+        private List<FriendInfoData> _list = new List<FriendInfoData>();
+        public List<FriendInfoData> FriendDatas
+        {
+            get
+            {
+                return _list;
+            }
+        }
+
+        public void AddFriend(FriendInfoData roleInfo)
+        {
+            _friendDic.Add(roleInfo.roleInfo.roleId, roleInfo);
+            UpdateFriendList();
+        }
+        public void RemoveFriend(long roleId)
+        {
+            if (_friendDic.ContainsKey(roleId))
+            {
+                _friendDic.Remove(roleId);
+                UpdateFriendList();
+            }
+        }
+        public void ChangeFriendInfo(RoleInfoData roleInfo)
+        {
+            if (_friendDic.ContainsKey(roleInfo.roleId))
+            {
+                _friendDic[roleInfo.roleId].roleInfo = roleInfo;
+                UpdateFriendList();
+            }
+        }
+        public void ChangeGiveGiftStates(long roleId, int state)
+        {
+            if (_friendDic.ContainsKey(roleId))
+            {
+                _friendDic[roleId].giveGiftState = state;
+                UpdateFriendList();
+            }
+        }
+        public void ChangeTakeGiftStates(long roleId, int state)
+        {
+            if (_friendDic.ContainsKey(roleId))
+            {
+                _friendDic[roleId].takeGiftState = state;
+                UpdateFriendList();
+            }
+        }
+        public void ChangeGiveTakeGiftStates(long roleId, int state, int takeState)
+        {
+            if (_friendDic.ContainsKey(roleId))
+            {
+                _friendDic[roleId].giveGiftState = state;
+                _friendDic[roleId].takeGiftState = takeState;
+                UpdateFriendList();
+            }
+        }
+        private void UpdateFriendList()
+        {
+            _list = _friendDic.Values.ToList<FriendInfoData>();
+            _list.Sort((FriendInfoData a, FriendInfoData b) =>
+            {
+                long count = b.roleInfo.offlineTimeSec - a.roleInfo.offlineTimeSec;
+                if (count > 0)
+                {
+                    return 1;
+                }
+                else
+                {
+                    return -1;
+                }
+            });
+        }
+
+
+        private List<RoleInfoData> _recommendDatas = new List<RoleInfoData>();//推荐列表
+        public List<RoleInfoData> RecommendDatas
+        {
+            get
+            {
+                return _recommendDatas;
+            }
+        }
+        public void AddRecommendData(RoleInfoData recommendData)
+        {
+            _recommendDatas.Add(recommendData);
+        }
+        public void ClearRecommendDatas()
+        {
+            _recommendDatas.Clear();
+        }
+
+
+        private List<RoleInfoData> _searchDatas = new List<RoleInfoData>();//搜索列表
+        public List<RoleInfoData> SearchDatas
+        {
+            get
+            {
+                return _searchDatas;
+            }
+        }
+        public void AddSearchData(RoleInfoData searchData)
+        {
+            _searchDatas.Add(searchData);
+        }
+        public void ClearSearchDatas()
+        {
+            _searchDatas.Clear();
+        }
+
+        private List<FriendInfoData> _applyDatas = new List<FriendInfoData>();//申请添加好友列表
+        public List<FriendInfoData> ApplyDatas
+        {
+            get
+            {
+                return _applyDatas;
+            }
+        }
+        public void AddApplyData(FriendInfoData applyData)
+        {
+            _applyDatas.Add(applyData);
+        }
+        public void RemoveApplyData(long roleId)
+        {
+            for (int i = _applyDatas.Count - 1; i >= 0; i--)
+            {
+                if (roleId == _applyDatas[i].roleInfo.roleId)
+                {
+                    _applyDatas.RemoveAt(i);
+                }
+            }
+        }
+        public void ClearApplyDatas()
+        {
+            _applyDatas.Clear();
+        }
+
+        public int GetGiftState(long roleId)
+        {
+            FriendInfoData friendInfo = _friendDic[roleId];
+            if (friendInfo.takeGiftState == ConstBonusStatus.CAN_GET)
+            {
+                return 0;
+            }
+            if (friendInfo.giveGiftState == (int)ConstGiveGiftStatus.CanGave)
+            {
+                return 1;
+            }
+            if (friendInfo.giveGiftState == (int)ConstGiveGiftStatus.Gave)
+            {
+                return 2;
+            }
+            return 3;
+        }
 
     }
 }

+ 35 - 0
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -91,5 +91,40 @@ namespace GFGGame
             }
             return false;
         }
+
+        /// <summary>
+        /// 好友红点
+        /// </summary>
+        /// <returns></returns>
+        public bool GetFriendRed()
+        {
+            return GetFriendApplyRed() || GetFriendGiftRed();
+        }
+        /// <summary>
+        /// 是否有好友申请
+        /// </summary>
+        /// <returns></returns>
+        public bool GetFriendApplyRed()
+        {
+            return FriendDataManager.Instance.ApplyDatas.Count > 0;
+        }
+        /// <summary>
+        /// 是否有好友可领体力
+        /// </summary>
+        /// <returns></returns>
+        public bool GetFriendGiftRed()
+        {
+            if (FriendDataManager.Instance.Count >= GlobalCfgArray.globalCfg.maxGetPowerCount) return false;
+
+            List<FriendInfoData> friendInfos = FriendDataManager.Instance.FriendDatas;
+            for (int i = 0; i < friendInfos.Count; i++)
+            {
+                if (friendInfos[i].takeGiftState == ConstBonusStatus.CAN_GET)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
     }
 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -13,6 +13,7 @@ namespace GFGGame
         public static string roleName;
         public static int rechargeTotal;
         public static int rechargeTotalMon;
+        public static string slogan;
 
         public static int power
         {

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Data/VO/CustomSuitData.cs

@@ -8,9 +8,9 @@ namespace GFGGame
             this.pos = index;
         }
         public int pos;
-        public List<int> equipDatas = new List<int>();
         public int bg;
-        public bool pic;
         public int suitId;
+        public bool pic;
+        public List<int> equipDatas = new List<int>();
     }
 }

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/FriendInfoData.cs

@@ -0,0 +1,10 @@
+namespace GFGGame
+{
+    public class FriendInfoData
+    {
+        public RoleInfoData roleInfo;
+        public int type;//好友关系类型,由FriendType枚举
+        public int giveGiftState;//赠送状态,由ConstGiveGiftStatus枚举
+        public int takeGiftState;//领取赠送状态,由ConstBonusStatus枚举
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/FriendInfoData.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a61a03e4cbb866846b972b2faec880b7
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 17 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/RoleInfoData.cs

@@ -0,0 +1,17 @@
+namespace GFGGame
+{
+    public class RoleInfoData
+    {
+        public long roleId;
+        public string roleName;
+        public int roleLv;
+        public long offlineTimeSec;//离线时间戳,单位秒,0表示在线
+
+    }
+
+    public class RoleInfoDetailData
+    {
+        public string slogan;
+        public CustomSuitData customSuitData;
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/RoleInfoData.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1b0386dbad8741147b3fd4b6b6ef5316
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 9
GameClient/Assets/Game/HotUpdate/DressUp/DressUpObjDataCache.cs

@@ -516,15 +516,15 @@ namespace GFGGame
             checkDefaultItem();
             UpdatePicAction();
         }
-        public CustomSuitData GetCurSuitData(int index)
-        {
-            CustomSuitData suitSavedData = new CustomSuitData(index);
-            suitSavedData.equipDatas = EquipDataCache.cacher.equipDatas;
-            suitSavedData.bg = EquipDataCache.cacher.bgId;
-            suitSavedData.pic = EquipDataCache.cacher.picStatus;
-            suitSavedData.suitId = EquipDataCache.cacher.suitId;
-            return suitSavedData;
-        }
+        // public CustomSuitData GetCurSuitData(int index)
+        // {
+        //     CustomSuitData suitSavedData = new CustomSuitData(index);
+        //     suitSavedData.equipDatas = EquipDataCache.cacher.equipDatas;
+        //     suitSavedData.bg = EquipDataCache.cacher.bgId;
+        //     suitSavedData.pic = EquipDataCache.cacher.picStatus;
+        //     suitSavedData.suitId = EquipDataCache.cacher.suitId;
+        //     return suitSavedData;
+        // }
         public void PutOnSuitSaved(int index)
         {
 

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_FriendUI.cs

@@ -10,6 +10,7 @@ namespace UI.Friend
         public GButton m_btnBack;
         public GTextField m_txtCount;
         public GTextField m_txtName;
+        public GGroup m_grpName;
         public GTextField m_txtSlogan;
         public GGroup m_grpSlogan;
         public GButton m_btnSolgan;
@@ -67,6 +68,7 @@ namespace UI.Friend
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_txtCount = (GTextField)comp.GetChild("txtCount");
             m_txtName = (GTextField)comp.GetChild("txtName");
+            m_grpName = (GGroup)comp.GetChild("grpName");
             m_txtSlogan = (GTextField)comp.GetChild("txtSlogan");
             m_grpSlogan = (GGroup)comp.GetChild("grpSlogan");
             m_btnSolgan = (GButton)comp.GetChild("btnSolgan");
@@ -80,6 +82,7 @@ namespace UI.Friend
             m_btnBack = null;
             m_txtCount = null;
             m_txtName = null;
+            m_grpName = null;
             m_txtSlogan = null;
             m_grpSlogan = null;
             m_btnSolgan = null;

+ 5 - 5
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_ListItem.cs

@@ -6,7 +6,7 @@ namespace UI.Friend
 {
     public partial class UI_ListItem
     {
-        public GComponent target;
+        public GButton target;
         public Controller m_c1;
         public Controller m_c2;
         public GTextField m_txtLvl;
@@ -22,9 +22,9 @@ namespace UI.Friend
         {
             var ui = new UI_ListItem();
             if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
-            	ui.target =  (GComponent)gObject;
+            	ui.target =  (GButton)gObject;
             ui.Init(ui.target);
             return ui;
         }
@@ -37,9 +37,9 @@ namespace UI.Friend
             }
             var ui = _proxy;
             if(gObject == null)
-            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            	ui.target =  (GButton)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
             else
-            	ui.target =  (GComponent)gObject;
+            	ui.target =  (GButton)gObject;
             ui.Init(ui.target);
             return ui;
         }

+ 9 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Friend/UI_ListSearchItem.cs

@@ -7,10 +7,12 @@ namespace UI.Friend
     public partial class UI_ListSearchItem
     {
         public GComponent target;
+        public Controller m_c1;
+        public Controller m_c2;
         public GTextField m_txtLvl;
         public GTextField m_txtName;
-        public GTextField m_txtSlogan;
         public GButton m_btnAdd;
+        public GLoader m_loaState;
         public const string URL = "ui://wez2ujnnpdeoi";
         public const string PACKAGE_NAME = "Friend";
         public const string RES_NAME = "ListSearchItem";
@@ -58,17 +60,21 @@ namespace UI.Friend
 
         private void Init(GComponent comp)
         {
+            m_c1 = comp.GetController("c1");
+            m_c2 = comp.GetController("c2");
             m_txtLvl = (GTextField)comp.GetChild("txtLvl");
             m_txtName = (GTextField)comp.GetChild("txtName");
-            m_txtSlogan = (GTextField)comp.GetChild("txtSlogan");
             m_btnAdd = (GButton)comp.GetChild("btnAdd");
+            m_loaState = (GLoader)comp.GetChild("loaState");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_c1 = null;
+            m_c2 = null;
             m_txtLvl = null;
             m_txtName = null;
-            m_txtSlogan = null;
             m_btnAdd = null;
+            m_loaState = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 396 - 5
GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs

@@ -1,25 +1,416 @@
 using System.Collections.Generic;
-using ET;
 using GFGGame;
+using ET;
+namespace ET
+{
+    //推送其他玩家信息变化
+    public class NoticeRoleInfoChanged : AMHandler<S2C_NoticeFriendInfo>
+    {
+        protected override async ETTask Run(Session session, S2C_NoticeFriendInfo message)
+        {
+            RoleInfoData roleInfo = new RoleInfoData();
+            roleInfo.roleId = message.RoleInfo.RoleId;
+            roleInfo.roleLv = message.RoleInfo.RoleLvl;
+            roleInfo.roleName = message.RoleInfo.RoleName;
+            roleInfo.offlineTimeSec = message.RoleInfo.OfflineTimeSec;
+
+            FriendDataManager.Instance.ChangeFriendInfo(roleInfo);
+            EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
+
+            await ETTask.CompletedTask;
+        }
+
+    }
+    //推送申请添加好友信息
+    public class NoticeApplyForFriend : AMHandler<S2C_NoticeApplyForFriend>
+    {
+        protected override async ETTask Run(Session session, S2C_NoticeApplyForFriend message)
+        {
+            RoleInfoData roleInfo = new RoleInfoData();
+            roleInfo.roleId = message.FriendInfo.RoleInfo.RoleId;
+            roleInfo.roleName = message.FriendInfo.RoleInfo.RoleName;
+            roleInfo.roleLv = message.FriendInfo.RoleInfo.RoleLvl;
+            roleInfo.offlineTimeSec = message.FriendInfo.RoleInfo.OfflineTimeSec;
 
+            FriendInfoData friendInfo = new FriendInfoData();
+            friendInfo.roleInfo = roleInfo;
+            friendInfo.type = message.FriendInfo.Type;
+            friendInfo.giveGiftState = message.FriendInfo.GiveGiftState;
+            friendInfo.takeGiftState = message.FriendInfo.TakeGiftState;
 
+            FriendDataManager.Instance.AddApplyData(friendInfo);
+            EventAgent.DispatchEvent(ConstMessage.FRIEND_APPLY_CHANGE);
+
+            await ETTask.CompletedTask;
+        }
+    }
+
+    //推送新增好友
+    public class NoticeAddFriends : AMHandler<S2C_NoticeAddFriends>
+    {
+        protected override async ETTask Run(Session session, S2C_NoticeAddFriends message)
+        {
+            for (int i = 0; i < message.FriendList.Count; i++)
+            {
+                RoleInfoData roleInfo = new RoleInfoData();
+                roleInfo.roleId = message.FriendList[i].RoleInfo.RoleId;
+                roleInfo.roleName = message.FriendList[i].RoleInfo.RoleName;
+                roleInfo.roleLv = message.FriendList[i].RoleInfo.RoleLvl;
+                roleInfo.offlineTimeSec = message.FriendList[i].RoleInfo.OfflineTimeSec;
+
+                FriendInfoData friendInfo = new FriendInfoData();
+                friendInfo.roleInfo = roleInfo;
+                friendInfo.type = message.FriendList[i].Type;
+                friendInfo.giveGiftState = message.FriendList[i].GiveGiftState;
+                friendInfo.takeGiftState = message.FriendList[i].TakeGiftState;
+                FriendDataManager.Instance.AddFriend(friendInfo);
+                FriendDataManager.Instance.RemoveApplyData(message.FriendList[i].RoleInfo.RoleId);
+            }
+            EventAgent.DispatchEvent(ConstMessage.FRIEND_ADD);
+            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+
+            await ETTask.CompletedTask;
+        }
+    }
+
+    //推送删除好友
+    public class NoticeDeleteFriend : AMHandler<S2C_NoticeDeleteFriend>
+    {
+        protected override async ETTask Run(Session session, S2C_NoticeDeleteFriend message)
+        {
+            FriendDataManager.Instance.RemoveFriend(message.RoleId);
+            EventAgent.DispatchEvent(ConstMessage.FRIEND_REMOVE);
+
+            await ETTask.CompletedTask;
+        }
+    }
+
+    //推送领取赠送状态
+    public class NoticeTakeGiftStates : AMHandler<S2C_NoticeTakeGiftStates>
+    {
+        protected override async ETTask Run(Session session, S2C_NoticeTakeGiftStates message)
+        {
+            FriendDataManager.Instance.ChangeTakeGiftStates(message.RoleId, message.TakeGiftState);
+            EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
+            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+
+            await ETTask.CompletedTask;
+        }
+    }
+}
 namespace GFGGame
 {
     public static class FriendSProxy
     {
-        public static async ETTask<bool> ClothingDecompose(List<int> itemIds, List<int> itemNums)
+        //请求所有好友信息
+        public static async ETTask<bool> ReqAllFriendInfos()
+        {
+            S2C_GetAllFriendInfos response = null;
+            response = (S2C_GetAllFriendInfos)await MessageHelper.SendToServer(new C2S_GetAllFriendInfos());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    for (int i = 0; i < response.FriendList.Count; i++)
+                    {
+
+                        RoleInfoData roleInfo = new RoleInfoData();
+                        roleInfo.roleId = response.FriendList[i].RoleInfo.RoleId;
+                        roleInfo.roleName = response.FriendList[i].RoleInfo.RoleName;
+                        roleInfo.roleLv = response.FriendList[i].RoleInfo.RoleLvl;
+                        roleInfo.offlineTimeSec = response.FriendList[i].RoleInfo.OfflineTimeSec;
+
+                        FriendInfoData friendInfo = new FriendInfoData();
+                        friendInfo.roleInfo = roleInfo;
+                        friendInfo.type = response.FriendList[i].Type;
+                        friendInfo.giveGiftState = response.FriendList[i].GiveGiftState;
+                        friendInfo.takeGiftState = response.FriendList[i].TakeGiftState;
+                        if (response.FriendList[i].Type == FriendType.Good)
+                        {
+                            FriendDataManager.Instance.AddFriend(friendInfo);
+                        }
+                        else if (response.FriendList[i].Type == FriendType.Apply)
+                        {
+                            FriendDataManager.Instance.AddApplyData(friendInfo);
+                        }
+                    }
+                    return true;
+                }
+            }
+            return false;
+        }
+        //赠送
+        public static async ETTask<bool> ReqGiveGiftToFriend(long roleId)
+        {
+            S2C_GiveGiftToFriend response = null;
+            response = (S2C_GiveGiftToFriend)await MessageHelper.SendToServer(new C2S_GiveGiftToFriend() { RoleId = roleId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    FriendDataManager.Instance.ChangeGiveGiftStates(response.RoleId, response.GiveGiftState);
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("赠送好友体力*{0}", GlobalCfgArray.globalCfg.onceGivePowerCount));
+                    EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //一键赠送
+        public static async ETTask<bool> ReqGiveGiftToAllFriend()
+        {
+            S2C_GiveGiftToAllFriends response = null;
+            response = (S2C_GiveGiftToAllFriends)await MessageHelper.SendToServer(new C2S_GiveGiftToAllFriends());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    for (int i = 0; i < response.RoleIds.Count; i++)
+                    {
+                        FriendDataManager.Instance.ChangeGiveGiftStates(response.RoleIds[i], response.GiveGiftStates[i]);
+                    }
+                    if (response.RoleIds.Count > 0)
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt(string.Format("送出{0}份体力", response.RoleIds.Count));
+                    }
+                    else
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt("无好友可赠送体力");
+                    }
+                    EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //领取并赠送赠送
+        public static async ETTask<bool> ReqTakeGiftFromFriend(long roleId)
         {
-            M2C_ClothingDecompose response = null;
-            response = (M2C_ClothingDecompose)await MessageHelper.SendToServer(new C2M_ClothingDecompose() { itemIds = itemIds, itemNums = itemNums });
+            S2C_TakeGiftFromFriend response = null;
+            response = (S2C_TakeGiftFromFriend)await MessageHelper.SendToServer(new C2S_TakeGiftFromFriend() { RoleId = roleId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.bonusList));
+                    FriendDataManager.Instance.ChangeGiveTakeGiftStates(response.RoleId, response.GiveGiftState, response.TakeGiftState);
+                    PromptController.Instance.ShowFloatTextPrompt(string.Format("领取成功,获得体力*{0}", GlobalCfgArray.globalCfg.onceGivePowerCount));
+                    EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     return true;
                 }
             }
             return false;
         }
+
+        //一键领取并赠送
+        public static async ETTask<bool> ReqTakeGiftFromAllFriend()
+        {
+            S2C_TakeGiftFromAllFriend response = null;
+            response = (S2C_TakeGiftFromAllFriend)await MessageHelper.SendToServer(new C2S_TakeGiftFromAllFriend());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    for (int i = 0; i < response.RoleIds.Count; i++)
+                    {
+                        FriendDataManager.Instance.ChangeGiveTakeGiftStates(response.RoleIds[i], response.GiveGiftStates[i], response.TakeGiftStates[i]);
+                    }
+                    if (FriendDataManager.Instance.Count >= GlobalCfgArray.globalCfg.maxGetPowerCount)
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt("今日体力已全部领取");
+                    }
+                    else
+                    {
+                        PromptController.Instance.ShowFloatTextPrompt(string.Format("已领取{0}体力", response.RoleIds.Count * GlobalCfgArray.globalCfg.onceGivePowerCount));
+                    }
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+                    return true;
+                }
+            }
+            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+            return false;
+        }
+
+        //请求其他玩家详细信息
+        public static async ETTask<RoleInfoDetailData> ReqOtherRoleDetailInfo(long roleId)
+        {
+            S2C_GetOtherRoleDetailInfo response = null;
+            response = (S2C_GetOtherRoleDetailInfo)await MessageHelper.SendToServer(new C2S_GetOtherRoleDetailInfo() { RoleId = roleId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    RoleInfoDetailData roleInfoDetail = new RoleInfoDetailData();
+                    roleInfoDetail.slogan = response.Signature;
+                    roleInfoDetail.customSuitData.pos = response.CustomSuit.Pos;
+                    roleInfoDetail.customSuitData.bg = response.CustomSuit.BgId;
+                    roleInfoDetail.customSuitData.suitId = response.CustomSuit.SuitId;
+                    roleInfoDetail.customSuitData.equipDatas = response.CustomSuit.EquipIds;
+                    roleInfoDetail.customSuitData.pic = response.CustomSuit.Pic;
+
+                    return roleInfoDetail;
+                }
+            }
+            return null;
+        }
+
+        //请求搜索其他玩家
+        public static async ETTask<bool> ReqSearchRole(string roleName)
+        {
+            S2C_SearchRole response = null;
+            response = (S2C_SearchRole)await MessageHelper.SendToServer(new C2S_SearchRole() { RoleName = roleName });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    FriendDataManager.Instance.ClearSearchDatas();
+                    for (int i = 0; i < response.RoleList.Count; i++)
+                    {
+
+                        RoleInfoData roleInfo = new RoleInfoData();
+                        roleInfo.roleId = response.RoleList[i].RoleId;
+                        roleInfo.roleName = response.RoleList[i].RoleName;
+                        roleInfo.roleLv = response.RoleList[i].RoleLvl;
+                        roleInfo.offlineTimeSec = response.RoleList[i].OfflineTimeSec;
+                        FriendDataManager.Instance.AddSearchData(roleInfo);
+                    }
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //请求推荐好友
+        public static async ETTask<bool> ReqRecommendFriends()
+        {
+            S2C_GetRecommendFriends response = null;
+            response = (S2C_GetRecommendFriends)await MessageHelper.SendToServer(new C2S_GetRecommendFriends());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    FriendDataManager.Instance.ClearRecommendDatas();
+                    for (int i = 0; i < response.RoleList.Count; i++)
+                    {
+                        RoleInfoData roleInfo = new RoleInfoData();
+                        roleInfo.roleId = response.RoleList[i].RoleId;
+                        roleInfo.roleName = response.RoleList[i].RoleName;
+                        roleInfo.roleLv = response.RoleList[i].RoleLvl;
+                        roleInfo.offlineTimeSec = response.RoleList[i].OfflineTimeSec;
+                        FriendDataManager.Instance.AddRecommendData(roleInfo);
+                    }
+                    return true;
+                }
+            }
+            return false;
+        }
+
+
+
+        //申请添加好友
+        public static async ETTask<bool> ReqApplyForFriend(long roleId)
+        {
+            S2C_RequestApplyForFriend response = null;
+            response = (S2C_RequestApplyForFriend)await MessageHelper.SendToServer(new C2S_RequestApplyForFriend() { RoleId = roleId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //同意添加好友
+        public static async ETTask<bool> ReqAcceptApplyForFriend(long roleId)
+        {
+            S2C_AcceptApplyForFriend response = null;
+            response = (S2C_AcceptApplyForFriend)await MessageHelper.SendToServer(new C2S_AcceptApplyForFriend() { RoleId = roleId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    // FriendDataManager.Instance.RemoveApplyData(roleId);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //拒绝添加好友
+        public static async ETTask<bool> ReqRefuseApplyForFriend(long roleId)
+        {
+            S2C_RefuseApplyForFriend response = null;
+            response = (S2C_RefuseApplyForFriend)await MessageHelper.SendToServer(new C2S_RefuseApplyForFriend() { RoleId = roleId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    FriendDataManager.Instance.RemoveApplyData(roleId);
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+                    EventAgent.DispatchEvent(ConstMessage.FRIEND_APPLY_CHANGE);
+
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //一键同意添加好友
+        public static async ETTask<bool> ReqAcceptAllApplyForFriend()
+        {
+            S2C_AcceptAllApplyForFriend response = null;
+            response = (S2C_AcceptAllApplyForFriend)await MessageHelper.SendToServer(new C2S_AcceptAllApplyForFriend());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //一键拒绝添加好友
+        public static async ETTask<bool> ReqRefuseAllApplyForFriend()
+        {
+            S2C_RefuseAllApplyForFriend response = null;
+            response = (S2C_RefuseAllApplyForFriend)await MessageHelper.SendToServer(new C2S_RefuseAllApplyForFriend());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    FriendDataManager.Instance.ClearApplyDatas();
+                    EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+                    EventAgent.DispatchEvent(ConstMessage.FRIEND_APPLY_CHANGE);
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //请求删除好友
+        public static async ETTask<bool> ReqDeleteFriend(long roleId)
+        {
+            S2C_RequestDeleteFriend response = null;
+            response = (S2C_RequestDeleteFriend)await MessageHelper.SendToServer(new C2S_RequestDeleteFriend() { RoleId = roleId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    FriendDataManager.Instance.RemoveFriend(response.RoleId);
+                    PromptController.Instance.ShowFloatTextPrompt("好友已删除");
+                    EventAgent.DispatchEvent(ConstMessage.FRIEND_REMOVE);
+
+                    return true;
+                }
+            }
+            return false;
+        }
+
+
     }
 }

+ 41 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/RoleInfoSProxy.cs

@@ -0,0 +1,41 @@
+using System.Collections.Generic;
+using ET;
+
+namespace GFGGame
+{
+    public static class RoleInfoSProxy
+    {
+        //请求个人信息
+        public static async ETTask<bool> ReqPersonalInfo()
+        {
+            S2C_GetPersonalInfo response = null;
+            response = (S2C_GetPersonalInfo)await MessageHelper.SendToServer(new C2S_GetPersonalInfo());
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    RoleDataManager.slogan = response.Signature;
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        //修改个人签名
+        public static async ETTask<string> ReqModifySlogan(string slogan)
+        {
+            S2C_ModifySignature response = null;
+            response = (S2C_ModifySignature)await MessageHelper.SendToServer(new C2S_ModifySignature() { Signature = slogan });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    RoleDataManager.slogan = response.Signature;
+                    return RoleDataManager.slogan;
+                }
+            }
+            return RoleDataManager.slogan;
+        }
+
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/RoleInfoSProxy.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 35b66a3b33716a9439a9b4dca4e2bfca
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -295,7 +295,7 @@ namespace GFGGame
             {
                 _dressMemory.RemoveRange(_stepIndex, _dressMemory.Count - _stepIndex);
             }
-            CustomSuitData suitSavedData = EquipDataCache.cacher.GetCurSuitData(_ui.m_comboBox.selectedIndex);
+            CustomSuitData suitSavedData = CustomSuitDataManager.GetSuitList(CustomSuitDataManager.currentIndex);
             _dressMemory.Add(suitSavedData);
             UpdateStepBtn();
         }

+ 80 - 19
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendAddView.cs

@@ -9,7 +9,7 @@ namespace GFGGame
     {
         private UI_FriendAddUI _ui;
 
-        private List<int> _searchDatas = new List<int>();
+        private List<RoleInfoData> _searchDatas = new List<RoleInfoData>();
         public override void Dispose()
         {
             if (_ui != null)
@@ -50,6 +50,9 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
+            EventAgent.AddEventListener(ConstMessage.FRIEND_APPLY_CHANGE, UpdateApplyList);
+            EventAgent.AddEventListener(ConstMessage.FRIEND_ADD, UpdateApplyList);
+            EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdaterRed);
 
         }
         protected override void OnShown()
@@ -58,8 +61,8 @@ namespace GFGGame
             _ui.m_c1.selectedIndex = 0;
             _ui.m_txtSearch.text = "";
             _ui.m_btnClear.visible = false;
-            // OnCtrlChange();
             OnBtnRefreshClick();
+            UpdateApplyList();
         }
 
         protected override void OnHide()
@@ -69,42 +72,69 @@ namespace GFGGame
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-
+            EventAgent.RemoveEventListener(ConstMessage.FRIEND_APPLY_CHANGE, UpdateApplyList);
+            EventAgent.RemoveEventListener(ConstMessage.FRIEND_ADD, UpdateApplyList);
+            EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdaterRed);
         }
 
         /**************************************************好友搜索***********************************************/
 
         private void RenderListSearchItem(int index, GObject obj)
         {
+            RoleInfoData roleInfoData = _searchDatas[index];
+
             UI_ListSearchItem item = UI_ListSearchItem.Proxy(obj);
+            item.m_txtName.text = roleInfoData.roleName;
+            item.m_txtLvl.text = roleInfoData.roleLv.ToString();
+            item.m_c1.selectedIndex = 0;
+            item.m_c2.selectedIndex = roleInfoData.offlineTimeSec == 0 ? 0 : 1;
             if (item.m_btnAdd.data == null)
             {
                 item.m_btnAdd.onClick.Add(OnBtnAddClick);
             }
+            item.target.data = roleInfoData.roleId;
             UI_ListSearchItem.ProxyEnd();
         }
 
         //添加好友
-        private void OnBtnAddClick(EventContext context)
+        private async void OnBtnAddClick(EventContext context)
         {
             GObject obj = context.data as GObject;
+            int roleId = (int)obj.data;
+            bool result = await FriendSProxy.ReqApplyForFriend(roleId);
+            if (result)
+            {
+                UI_ListSearchItem item = UI_ListSearchItem.Proxy();
+                item.m_c1.selectedIndex = 1;
+                UI_ListSearchItem.ProxyEnd();
+            }
         }
 
         //搜索好友
-        private void OnBtnSearchClick()
+        private async void OnBtnSearchClick()
         {
+            if (_ui.m_txtSearch.text.Length == 0)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("查无此人");
+                return;
+            }
             if (_ui.m_txtSearch.text.Length < 2)
             {
                 PromptController.Instance.ShowFloatTextPrompt("请输入至少两个字符");
                 return;
             }
-            bool result = true;
+            bool result = await FriendSProxy.ReqSearchRole(_ui.m_txtSearch.text);
             if (result)
             {
                 _ui.m_txtTips.text = "搜索结果";
                 _ui.m_btnClear.visible = true;
-                _searchDatas = null;
-                _ui.m_listSearch.numItems = 0;
+                _searchDatas = FriendDataManager.Instance.SearchDatas;
+                _ui.m_listSearch.numItems = _searchDatas.Count;
+                if (_searchDatas.Count == 0)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("查无此人");
+                    return;
+                }
             }
         }
 
@@ -117,60 +147,91 @@ namespace GFGGame
         }
 
         //刷新好友列表
-        private void OnBtnRefreshClick()
+        private async void OnBtnRefreshClick()
         {
             _ui.m_txtTips.text = "推荐好友";
-            bool result = true;
+            bool result = await FriendSProxy.ReqRecommendFriends();
             if (result)
             {
-                _searchDatas = null;
-                _ui.m_listSearch.numItems = 0;
+                _searchDatas = FriendDataManager.Instance.RecommendDatas;
+                _ui.m_listSearch.numItems = _searchDatas.Count;
             }
         }
 
         /**************************************************好友申请***********************************************/
-
+        private void UpdateApplyList()
+        {
+            _ui.m_listApply.numItems = FriendDataManager.Instance.ApplyDatas.Count;
+        }
         private void RenderListApplyItem(int index, GObject obj)
         {
-            int data = _searchDatas[index];
+            FriendInfoData data = FriendDataManager.Instance.ApplyDatas[index];
             UI_ListApplyItem item = UI_ListApplyItem.Proxy();
+            item.m_txtName.text = data.roleInfo.roleName;
+            item.m_txtLvl.text = data.roleInfo.roleLv.ToString();
             if (item.m_btnAgree.data == null)
             {
                 item.m_btnAgree.onClick.Add(OnBtnAgreeClick);
             }
+            item.m_btnAgree.data = data.roleInfo.roleId;
+
             if (item.m_btnRefuse.data == null)
             {
                 item.m_btnRefuse.onClick.Add(OnBtnRefuseClick);
             }
+            item.m_btnRefuse.data = data.roleInfo.roleId;
+
             UI_ListApplyItem.ProxyEnd();
         }
         //通过好友申请
-        private void OnBtnAgreeClick(EventContext context)
+        private async void OnBtnAgreeClick(EventContext context)
         {
             GObject obj = context.data as GObject;
+            int roleId = (int)obj.data;
+            bool result = await FriendSProxy.ReqAcceptApplyForFriend(roleId);
+            if (result)
+            {
+                _ui.m_listApply.numItems = FriendDataManager.Instance.ApplyDatas.Count;
+            }
         }
 
         //拒绝好友申请
-        private void OnBtnRefuseClick(EventContext context)
+        private async void OnBtnRefuseClick(EventContext context)
         {
             GObject obj = context.data as GObject;
-
+            int roleId = (int)obj.data;
+            bool result = await FriendSProxy.ReqRefuseApplyForFriend(roleId);
+            if (result)
+            {
+                _ui.m_listApply.numItems = FriendDataManager.Instance.ApplyDatas.Count;
+            }
         }
 
         //一键通过好友申请
         private void OnBtnAgreeAllClick()
         {
+            if (FriendDataManager.Instance.ApplyDatas.Count == 0) return;
 
+            FriendSProxy.ReqAcceptAllApplyForFriend().Coroutine();
         }
 
         //一键拒绝好友申请
         private void OnBtnRefuseAllClick()
         {
-            AlertUI.Show("是否拒绝所有好友申请?").SetLeftButton(true).SetRightButton(true, "确定", (object data) =>
+            if (FriendDataManager.Instance.ApplyDatas.Count == 0) return;
+            AlertUI.Show("是否拒绝所有好友申请?").SetLeftButton(true).SetRightButton(true, "确定", async (object data) =>
             {
-
+                bool result = await FriendSProxy.ReqRefuseAllApplyForFriend();
+                if (result)
+                {
+                    _ui.m_listApply.numItems = 0;
+                }
             });
         }
 
+        private void UpdaterRed()
+        {
+            RedDotController.Instance.SetComRedDot(_ui.m_btnTabApply, RedDotDataManager.Instance.GetFriendGiftRed());
+        }
     }
 }

+ 163 - 21
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -11,6 +11,8 @@ namespace GFGGame
         private GameObject _scenePrefab;
         private GameObject _sceneObject;
 
+        private FriendInfoData _curSelectedInfo;
+
         public override void Dispose()
         {
             if (_sceneObject != null)
@@ -43,6 +45,7 @@ namespace GFGGame
             _ui.m_btnSolgan.onClick.Add(OnBtnSloganClick);
             _ui.m_btnDelete.onClick.Add(OnBtnDeleteClick);
             _ui.m_btnAdd.onClick.Add(OnBtnAddClick);
+            _ui.m_btnSendAll.onClick.Add(OnBtnSendAllClick);
         }
 
         protected override void OnInit()
@@ -53,20 +56,29 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
+            EventAgent.AddEventListener(ConstMessage.FRIEND_REFRESH, RefreshView);
+            EventAgent.AddEventListener(ConstMessage.FRIEND_REMOVE, RefreshRemoveFriend);
+            EventAgent.AddEventListener(ConstMessage.FRIEND_ADD, RefreshAddFriend);
+            EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdaterRed);
         }
         protected override void OnShown()
         {
             base.OnShown();
             _ui.m_grpSlogan.visible = false;
 
-            UpdateList();
-            CustomSuitData suitSavedData = CustomSuitDataManager.GetCurrentSuitList();
-            // if (_ui.m_list.numItems > 0)
-            // {
-            //     _ui.m_list.selectedIndex = 0;
-            //     suitSavedData = _ui.m_list.GetChildAt(0).asCom.data as CustomSuitData;
-            // }
-            UpdateScene(suitSavedData);
+            _ui.m_list.numItems = FriendDataManager.Instance.FriendDatas.Count;
+
+            if (_ui.m_list.numItems > 0)
+            {
+                _ui.m_list.selectedIndex = 0;
+                ReqFriendDetialInfo(0);
+            }
+            else
+            {
+                ReqFriendDetialInfo(-1);
+            }
+
+            RefreshView();
         }
 
         protected override void OnHide()
@@ -76,56 +88,186 @@ namespace GFGGame
                 GameObject.Destroy(_sceneObject);
                 _sceneObject = null;
             }
+            _ui.m_list.numItems = 0;
             ViewManager.GoBackFrom(typeof(FriendView).FullName);
         }
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
+            EventAgent.RemoveEventListener(ConstMessage.FRIEND_REFRESH, RefreshView);
+            EventAgent.RemoveEventListener(ConstMessage.FRIEND_REMOVE, RefreshRemoveFriend);
+            EventAgent.RemoveEventListener(ConstMessage.FRIEND_ADD, RefreshAddFriend);
+            EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdaterRed);
+
         }
 
-        private void UpdateList()
+        private void RefreshView()
         {
-            _ui.m_list.numItems = 20;
+            _ui.m_list.RefreshVirtualList();
+            _ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
+            _ui.m_btnSendAll.text = RedDotDataManager.Instance.GetFriendGiftRed() ? "一键领取并赠送" : "一键赠送";
         }
 
+
         private void RenderListItem(int index, GObject obj)
         {
+            FriendInfoData friendInfo = FriendDataManager.Instance.FriendDatas[index];
+
             UI_ListItem item = UI_ListItem.Proxy(obj);
+            item.m_txtName.text = friendInfo.roleInfo.roleName;
+            item.m_txtLvl.text = friendInfo.roleInfo.roleLv.ToString();
+            item.m_c2.selectedIndex = friendInfo.roleInfo.offlineTimeSec == 0 ? 0 : 1;
+            item.m_c1.selectedIndex = FriendDataManager.Instance.GetGiftState(friendInfo.roleInfo.roleId);
+            if (item.m_btnSend.data == null)
+            {
+                item.m_btnSend.onClick.Add(OnClickBtnSend);
+            }
+            item.m_btnSend.data = friendInfo;
+            item.target.data = index;
 
             UI_ListItem.ProxyEnd();
         }
+        private void OnClickBtnSend(EventContext context)
+        {
+            GObject item = context.data as GObject;
+            FriendInfoData friendInfo = item.data as FriendInfoData;
+            if (friendInfo.takeGiftState == ConstBonusStatus.CAN_GET)
+            {
+                if (FriendDataManager.Instance.Count >= GlobalCfgArray.globalCfg.maxGetPowerCount)
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("今日体力已全部领取");
+                    return;
+                }
+                FriendSProxy.ReqTakeGiftFromFriend(friendInfo.roleInfo.roleId).Coroutine();
+            }
+            else if (friendInfo.giveGiftState == (int)ConstGiveGiftStatus.CanGave)
+            {
+                FriendSProxy.ReqGiveGiftToFriend(friendInfo.roleInfo.roleId).Coroutine();
+            }
+        }
         private void OnListItemClick(EventContext context)
         {
             GObject item = context.data as GObject;
-            CustomSuitData suitSavedData = item.data as CustomSuitData;
-            UpdateScene(suitSavedData);
+            int index = (int)item.data;
+            ReqFriendDetialInfo(index);
+        }
+
+
+
+
+        private void OnBtnSendAllClick()
+        {
+            if (RedDotDataManager.Instance.GetFriendGiftRed() && FriendDataManager.Instance.Count < GlobalCfgArray.globalCfg.maxGetPowerCount)
+            {
+                FriendSProxy.ReqTakeGiftFromAllFriend().Coroutine();
+            }
+            else
+            {
+                FriendSProxy.ReqGiveGiftToAllFriend().Coroutine();
+            }
+        }
+
+        private void OnBtnDeleteClick()
+        {
+            if (_ui.m_list.numItems == 0)
+            {
+                PromptController.Instance.ShowFloatTextPrompt("暂无好友可删除");
+                return;
+            }
+
+            AlertUI.Show("是否删除好友?").SetLeftButton(true).SetRightButton(true, "确定", (object data) =>
+            {
+                int index = _ui.m_list.selectedIndex;
+                long roleId = FriendDataManager.Instance.FriendDatas[index].roleInfo.roleId;
+                FriendSProxy.ReqDeleteFriend(roleId).Coroutine();
+            });
+        }
+
+        private void RefreshRemoveFriend()
+        {
+            int index = _ui.m_list.selectedIndex;
+            _ui.m_list.numItems = FriendDataManager.Instance.FriendDatas.Count;
+            if (FriendDataManager.Instance.FriendDatas.Count > 0)
+            {
+                if (index >= FriendDataManager.Instance.FriendDatas.Count)
+                {
+                    index = FriendDataManager.Instance.FriendDatas.Count - 1;//选中最后一个
+                }
+                _ui.m_list.selectedIndex = index;
+            }
+            else
+            {
+                index = -1;//无好友
+            }
+            ReqFriendDetialInfo(index);
+            _ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
+        }
+
+
+        private void RefreshAddFriend()
+        {
+            int childIndex = _ui.m_list.ItemIndexToChildIndex(_ui.m_list.selectedIndex);
+            GButton item = _ui.m_list.GetChildAt(childIndex).asButton.GetChild("btnSend").asButton;
+            FriendInfoData friendInfo = item.data as FriendInfoData;
+            int selectedIndex = FriendDataManager.Instance.FriendDatas.IndexOf(friendInfo);
+            _ui.m_list.numItems = FriendDataManager.Instance.FriendDatas.Count;
+            _ui.m_list.selectedIndex = selectedIndex;
+            ReqFriendDetialInfo(selectedIndex);
+
+            _ui.m_txtCount.text = string.Format("好友数:{0}/{1}", _ui.m_list.numItems, GlobalCfgArray.globalCfg.maxFriendCount);
+        }
+
+        private async void ReqFriendDetialInfo(int index)
+        {
+            if (index >= 0)
+            {
+                long roleId = FriendDataManager.Instance.FriendDatas[index].roleInfo.roleId;
+                RoleInfoDetailData roleInfoDetail = await FriendSProxy.ReqOtherRoleDetailInfo(roleId);
+                if (roleInfoDetail != null)
+                {
+                    UpdateScene(roleInfoDetail.customSuitData);
+                    _ui.m_txtSlogan.text = roleInfoDetail.slogan;
+                }
+            }
+            else
+            {
+                CustomSuitData customSuit = CustomSuitDataManager.GetSuitList(CustomSuitDataManager.currentIndex);
+                UpdateScene(customSuit);
+                _ui.m_txtSlogan.text = RoleDataManager.slogan;
+            }
         }
         private void UpdateScene(CustomSuitData suitSavedData)
         {
             if (_sceneObject == null)
             {
+                _ui.m_txtName.text = string.Format("我的套装{0}", NumberUtil.GetChiniseNumberText(suitSavedData.pos + 1));
                 _sceneObject = GameObject.Instantiate(_scenePrefab);
                 EquipDataCache.cacher.setSceneObj(_sceneObject);
             }
-            EquipDataCache.cacher.PutOnSuitMemory(suitSavedData);
+            if (suitSavedData != null)
+            {
+                EquipDataCache.cacher.PutOnSuitMemory(suitSavedData);
+            }
+            else
+            {
+                EquipDataCache.cacher.PutOnDefaultSuitSaved();
+            }
         }
 
+
         private void OnBtnSloganClick()
         {
             _ui.m_grpSlogan.visible = !_ui.m_grpSlogan.visible;
         }
-
-        private void OnBtnDeleteClick()
+        private void OnBtnAddClick()
         {
-            AlertUI.Show("是否删除好友?").SetLeftButton(true).SetRightButton(true, "确定", (object data) =>
-            {
-
-            });
+            ViewManager.Show<FriendAddView>();
         }
 
-        private void OnBtnAddClick()
+        private void UpdaterRed()
         {
-            ViewManager.Show<FriendAddView>();
+            RedDotController.Instance.SetComRedDot(_ui.m_btnAdd, RedDotDataManager.Instance.GetFriendApplyRed());
+            RedDotController.Instance.SetComRedDot(_ui.m_btnSendAll, RedDotDataManager.Instance.GetFriendGiftRed());
         }
     }
 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -432,6 +432,7 @@ namespace GFGGame
             RedDotController.Instance.SetComRedDot(_ui.m_btnDailyLogin.target, RedDotDataManager.Instance.GetDailyLoginRed());
             RedDotController.Instance.SetComRedDot(_btnYouJian, RedDotDataManager.Instance.GetMailRed());
             RedDotController.Instance.SetComRedDot(_btnTuJian, RedDotDataManager.Instance.GetFieldGuideRed());
+            RedDotController.Instance.SetComRedDot(_btnHaoYou, RedDotDataManager.Instance.GetFriendRed());
         }
 
         private void CheckGuide(object param)

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/MainUI/RoleInfoView.cs

@@ -27,6 +27,7 @@ namespace GFGGame
             this.modal = true;
 
             _ui.m_txtVersion.text = GameGlobal.version;
+            _ui.m_txtSlogan.maxLength = GlobalCfgArray.globalCfg.maxSloganWordsCount;
 
             _ui.m_btnExit.onClick.Add(OnClickBtnExit);
             _ui.m_btnLogout.onClick.Add(OnClickBtnLogout);
@@ -106,9 +107,9 @@ namespace GFGGame
             }
         }
 
-        private void OnFocuseOut()
+        private async void OnFocuseOut()
         {
-
+            _ui.m_txtSlogan.text = await RoleInfoSProxy.ReqModifySlogan(_ui.m_txtSlogan.text);
         }
     }
 }

TEMPAT SAMPAH
GameClient/Assets/ResIn/UI/Friend/Friend_atlas0.png


TEMPAT SAMPAH
GameClient/Assets/ResIn/UI/Friend/Friend_fui.bytes