zhaoyang 3 years ago
parent
commit
7742a28131
1 changed files with 27 additions and 27 deletions
  1. 27 27
      GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs

+ 27 - 27
GameClient/Assets/Game/HotUpdate/ServerProxy/FriendSProxy.cs

@@ -90,7 +90,7 @@ namespace ET
     {
         protected override async ETTask Run(Session session, S2C_NoticeDeleteFriend message)
         {
-            FriendDataManager.Instance.RemoveFriend(message.RoleId);
+            FriendDataManager.Instance.RemoveFriend(message.FriendId);
             EventAgent.DispatchEvent(ConstMessage.FRIEND_REMOVE);
             await ETTask.CompletedTask;
         }
@@ -101,7 +101,7 @@ namespace ET
     {
         protected override async ETTask Run(Session session, S2C_NoticeTakeGiftStates message)
         {
-            FriendDataManager.Instance.ChangeTakeGiftStates(message.RoleId, message.TakeGiftState);
+            FriendDataManager.Instance.ChangeTakeGiftStates(message.FriendId, message.TakeGiftState);
             EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
             EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
 
@@ -151,15 +151,15 @@ namespace GFGGame
             return false;
         }
         //赠送
-        public static async ETTask<bool> ReqGiveGiftToFriend(long roleId)
+        public static async ETTask<bool> ReqGiveGiftToFriend(long friendId)
         {
             S2C_GiveGiftToFriend response = null;
-            response = (S2C_GiveGiftToFriend)await MessageHelper.SendToServer(new C2S_GiveGiftToFriend() { RoleId = roleId });
+            response = (S2C_GiveGiftToFriend)await MessageHelper.SendToServer(new C2S_GiveGiftToFriend() { FriendId = friendId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    FriendDataManager.Instance.ChangeGiveGiftStates(response.RoleId, response.GiveGiftState);
+                    FriendDataManager.Instance.ChangeGiveGiftStates(response.FriendId, response.GiveGiftState);
                     PromptController.Instance.ShowFloatTextPrompt(string.Format("赠送好友体力*{0}", GlobalCfgArray.globalCfg.onceGivePowerCount));
                     EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
                     return true;
@@ -177,13 +177,13 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    for (int i = 0; i < response.RoleIds.Count; i++)
+                    for (int i = 0; i < response.FriendIds.Count; i++)
                     {
-                        FriendDataManager.Instance.ChangeGiveGiftStates(response.RoleIds[i], response.GiveGiftStates[i]);
+                        FriendDataManager.Instance.ChangeGiveGiftStates(response.FriendIds[i], response.GiveGiftStates[i]);
                     }
-                    if (response.RoleIds.Count > 0)
+                    if (response.FriendIds.Count > 0)
                     {
-                        PromptController.Instance.ShowFloatTextPrompt(string.Format("送出{0}份体力", response.RoleIds.Count));
+                        PromptController.Instance.ShowFloatTextPrompt(string.Format("送出{0}份体力", response.FriendIds.Count));
                     }
                     else
                     {
@@ -197,15 +197,15 @@ namespace GFGGame
         }
 
         //领取并赠送赠送
-        public static async ETTask<bool> ReqTakeGiftFromFriend(long roleId)
+        public static async ETTask<bool> ReqTakeGiftFromFriend(long friendId)
         {
             S2C_TakeGiftFromFriend response = null;
-            response = (S2C_TakeGiftFromFriend)await MessageHelper.SendToServer(new C2S_TakeGiftFromFriend() { RoleId = roleId });
+            response = (S2C_TakeGiftFromFriend)await MessageHelper.SendToServer(new C2S_TakeGiftFromFriend() { FriendId = friendId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    FriendDataManager.Instance.ChangeGiveTakeGiftStates(response.RoleId, response.GiveGiftState, response.TakeGiftState);
+                    FriendDataManager.Instance.ChangeGiveTakeGiftStates(response.FriendId, response.GiveGiftState, response.TakeGiftState);
                     PromptController.Instance.ShowFloatTextPrompt(string.Format("领取成功,获得体力*{0}", GlobalCfgArray.globalCfg.onceGivePowerCount));
                     EventAgent.DispatchEvent(ConstMessage.FRIEND_REFRESH);
                     EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
@@ -224,9 +224,9 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    for (int i = 0; i < response.RoleIds.Count; i++)
+                    for (int i = 0; i < response.FriendIds.Count; i++)
                     {
-                        FriendDataManager.Instance.ChangeGiveTakeGiftStates(response.RoleIds[i], response.GiveGiftStates[i], response.TakeGiftStates[i]);
+                        FriendDataManager.Instance.ChangeGiveTakeGiftStates(response.FriendIds[i], response.GiveGiftStates[i], response.TakeGiftStates[i]);
                     }
                     if (FriendDataManager.Instance.Count >= GlobalCfgArray.globalCfg.maxGetPowerCount)
                     {
@@ -234,7 +234,7 @@ namespace GFGGame
                     }
                     else
                     {
-                        PromptController.Instance.ShowFloatTextPrompt(string.Format("已领取{0}体力", response.RoleIds.Count * GlobalCfgArray.globalCfg.onceGivePowerCount));
+                        PromptController.Instance.ShowFloatTextPrompt(string.Format("已领取{0}体力", response.FriendIds.Count * GlobalCfgArray.globalCfg.onceGivePowerCount));
                     }
                     EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     return true;
@@ -245,10 +245,10 @@ namespace GFGGame
         }
 
         //请求其他玩家详细信息
-        public static async ETTask<RoleInfoDetailData> ReqOtherRoleDetailInfo(long roleId)
+        public static async ETTask<RoleInfoDetailData> ReqOtherRoleDetailInfo(long friendId)
         {
             S2C_GetOtherRoleDetailInfo response = null;
-            response = (S2C_GetOtherRoleDetailInfo)await MessageHelper.SendToServer(new C2S_GetOtherRoleDetailInfo() { RoleId = roleId });
+            response = (S2C_GetOtherRoleDetailInfo)await MessageHelper.SendToServer(new C2S_GetOtherRoleDetailInfo() { RoleId = friendId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -324,10 +324,10 @@ namespace GFGGame
 
 
         //申请添加好友
-        public static async ETTask<bool> ReqApplyForFriend(long roleId)
+        public static async ETTask<bool> ReqApplyForFriend(long friendId)
         {
             S2C_RequestApplyForFriend response = null;
-            response = (S2C_RequestApplyForFriend)await MessageHelper.SendToServer(new C2S_RequestApplyForFriend() { RoleId = roleId });
+            response = (S2C_RequestApplyForFriend)await MessageHelper.SendToServer(new C2S_RequestApplyForFriend() { FriendId = friendId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -339,10 +339,10 @@ namespace GFGGame
         }
 
         //同意添加好友
-        public static async ETTask<bool> ReqAcceptApplyForFriend(long roleId)
+        public static async ETTask<bool> ReqAcceptApplyForFriend(long friendId)
         {
             S2C_AcceptApplyForFriend response = null;
-            response = (S2C_AcceptApplyForFriend)await MessageHelper.SendToServer(new C2S_AcceptApplyForFriend() { RoleId = roleId });
+            response = (S2C_AcceptApplyForFriend)await MessageHelper.SendToServer(new C2S_AcceptApplyForFriend() { FriendId = friendId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -355,15 +355,15 @@ namespace GFGGame
         }
 
         //拒绝添加好友
-        public static async ETTask<bool> ReqRefuseApplyForFriend(long roleId)
+        public static async ETTask<bool> ReqRefuseApplyForFriend(long friendId)
         {
             S2C_RefuseApplyForFriend response = null;
-            response = (S2C_RefuseApplyForFriend)await MessageHelper.SendToServer(new C2S_RefuseApplyForFriend() { RoleId = roleId });
+            response = (S2C_RefuseApplyForFriend)await MessageHelper.SendToServer(new C2S_RefuseApplyForFriend() { FriendId = friendId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    FriendDataManager.Instance.RemoveApplyData(roleId);
+                    FriendDataManager.Instance.RemoveApplyData(friendId);
                     EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
                     EventAgent.DispatchEvent(ConstMessage.FRIEND_APPLY_CHANGE);
 
@@ -407,15 +407,15 @@ namespace GFGGame
         }
 
         //请求删除好友
-        public static async ETTask<bool> ReqDeleteFriend(long roleId)
+        public static async ETTask<bool> ReqDeleteFriend(long friendId)
         {
             S2C_RequestDeleteFriend response = null;
-            response = (S2C_RequestDeleteFriend)await MessageHelper.SendToServer(new C2S_RequestDeleteFriend() { RoleId = roleId });
+            response = (S2C_RequestDeleteFriend)await MessageHelper.SendToServer(new C2S_RequestDeleteFriend() { FriendId = friendId });
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    FriendDataManager.Instance.RemoveFriend(response.RoleId);
+                    FriendDataManager.Instance.RemoveFriend(response.FriendId);
                     PromptController.Instance.ShowFloatTextPrompt("好友已删除");
                     EventAgent.DispatchEvent(ConstMessage.FRIEND_REMOVE);