Przeglądaj źródła

飞花令问题战力问题修复

zhangyuqian 1 rok temu
rodzic
commit
f24e903d68
17 zmienionych plików z 285 dodań i 13 usunięć
  1. 3 3
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityAfternoonTea/UI_RewardTips.cs
  2. 18 3
      GameClient/Assets/Game/HotUpdate/ServerProxy/ArenaSproxy.cs
  3. 2 1
      GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaDressInfoView.cs
  4. 12 2
      GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaView.cs
  5. 7 1
      GameClient/Assets/Game/HotUpdate/Views/DressUp/ArenaDressUpFightView.cs
  6. 3 3
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs
  7. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0!a.png
  8. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0.png
  9. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_1!a.png
  10. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_1.png
  11. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_2!a.png
  12. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_2.png
  13. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3!a.png
  14. 120 0
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3!a.png.meta
  15. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3.png
  16. 120 0
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3.png.meta
  17. BIN
      GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_fui.bytes

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ActivityAfternoonTea/UI_RewardTips.cs

@@ -8,10 +8,10 @@ namespace UI.ActivityAfternoonTea
     {
         public GComponent target;
         public GLoader m_btnBack;
-        public GTextField m_name;
         public GTextField m_desc;
         public GList m_rewardList;
         public GImage m_back;
+        public GTextField m_name;
         public GGraph m_effect1;
         public GGraph m_effect2;
         public const string URL = "ui://wpsqkdbzqbf41v";
@@ -62,20 +62,20 @@ namespace UI.ActivityAfternoonTea
         private void Init(GComponent comp)
         {
             m_btnBack = (GLoader)comp.GetChild("btnBack");
-            m_name = (GTextField)comp.GetChild("name");
             m_desc = (GTextField)comp.GetChild("desc");
             m_rewardList = (GList)comp.GetChild("rewardList");
             m_back = (GImage)comp.GetChild("back");
+            m_name = (GTextField)comp.GetChild("name");
             m_effect1 = (GGraph)comp.GetChild("effect1");
             m_effect2 = (GGraph)comp.GetChild("effect2");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_btnBack = null;
-            m_name = null;
             m_desc = null;
             m_rewardList = null;
             m_back = null;
+            m_name = null;
             m_effect1 = null;
             m_effect2 = null;
             if(disposeTarget && target != null)

+ 18 - 3
GameClient/Assets/Game/HotUpdate/ServerProxy/ArenaSproxy.cs

@@ -142,18 +142,17 @@ namespace GFGGame
         }
 
         //更换搭配
-        public static async ETTask<bool> ReqChangeArenaDressup(int index, int cardId, List<int> itemList)
+        public static async ETTask<bool> ReqChangeArenaDressup(int index, int cardId, List<int> itemList,List<long> scoreList = null)
         {
 
             S2C_ChangeArenaDressup response = null;
-            response = (S2C_ChangeArenaDressup)await MessageHelper.SendToServer(new C2S_ChangeArenaDressup() { Index = index, CardId = cardId, EquipIds = itemList });
+            response = (S2C_ChangeArenaDressup)await MessageHelper.SendToServer(new C2S_ChangeArenaDressup() { Index = index, CardId = cardId, EquipIds = itemList ,SelfFightPower = scoreList});
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
                     ArenaDataManager.Instance.DressupList[index].cardId = cardId;
                     ArenaDataManager.Instance.DressupList[index].itemList = itemList;
-
                     return true;
                 }
             }
@@ -470,5 +469,21 @@ namespace GFGGame
 
             return fightData;
         }
+
+        //获取对手战力
+        public static async ETTask<bool> ReqArenaTargetPowerScore(long targetId,List<long> targetPawerList,int targetIndex)
+        {
+            var response = (S2C_GetTargetNewFightPower)await MessageHelper.SendToServer(new C2S_GetTargetNewFightPower() { RoleId = RoleDataManager.roleId, TargetRoleId = targetId });
+            if (!(response is { Error: ErrorCode.ERR_Success })) return false;
+            for(int i =0;i<targetPawerList.Count;i++)
+            {
+                if(targetPawerList[i] != response.TargetFightPower[i])
+                {
+                    ArenaDataManager.Instance.Targets[targetIndex].FightPower = response.TargetFightPower;
+                    return false;
+                }
+            }
+            return true;
+        }
     }
 }

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaDressInfoView.cs

@@ -162,7 +162,8 @@ namespace GFGGame
                 ArenaDataManager.Instance.SetMineFightAttr(roleData, scoreType);
                 ScoreSystemData.Instance.SetEquipScoresWithPartId(roleData);
                 _roleDatas = ArenaDataManager.Instance.DressupList;
-                bool result = await ArenaSproxy.ReqChangeArenaDressup(i, roleData.cardId, roleData.itemList);
+                List<long> fightScoreDatas = ArenaDataManager.Instance.GetFightScoreList(_roleDatas);
+                bool result = await ArenaSproxy.ReqChangeArenaDressup(i, roleData.cardId, roleData.itemList , fightScoreDatas);
                 if (!result)
                 {
                     PromptController.Instance.ShowFloatTextPrompt("保存失败");

+ 12 - 2
GameClient/Assets/Game/HotUpdate/Views/Arena/ArenaView.cs

@@ -427,13 +427,23 @@ namespace GFGGame
             UI_ListTargetItem.ProxyEnd();
         }
 
-        private void OnSelectRoleClick(EventContext context)
+        private async void OnSelectRoleClick(EventContext context)
         {
             int index = (int)(context.sender as GObject).data;
             _targetData = _dataManager.Targets[index];
+            if (_targetData.Type != FightTargetType.ROBOT)
+            {
+                bool result = await ArenaSproxy.ReqArenaTargetPowerScore( _targetData.RoleInfo.roleId, _targetData.FightPower, index);
+                if(!result)
+                {
+                    _ui.m_listTarget.numItems = _dataManager.Targets.Count;
+                    PromptController.Instance.ShowFloatTextPrompt("玩家战力发生变化,请重新选择");
+                    return;
+                }
+            }
+
             this.viewData = _targetData;
             _dataManager.SelectTargetIndex = index;
-
             _ui.m_c1.selectedIndex = 1;
             UpdateRole();
         }

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

@@ -22,6 +22,9 @@ namespace GFGGame
         private List<int> _currentList4 = new List<int>();
         private int _currentMenuType;
         private int _currentSuitId;
+
+        //暂存cardid
+        private int cardId;
         // private StoryLevelCfg _levelCfg;
         // private StoryFightCfg _fightCfg;
 
@@ -155,6 +158,7 @@ namespace GFGGame
             UpdateValueInfo();
             SendLog();
 
+            cardId = _roleData.cardId;
         }
 
         protected override void OnHide()
@@ -195,6 +199,7 @@ namespace GFGGame
                 AlertUI.Show("当前穿搭尚未保存,是否确定退出?")
                   .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
                 {
+                    _roleData.cardId = cardId;
                     GoBackToView();
                 });
             }
@@ -456,7 +461,8 @@ namespace GFGGame
             }
             else
             {
-                bool result = await ArenaSproxy.ReqChangeArenaDressup(_dataManager.SelectThemeIndex, 0, MyDressUpHelper.dressUpObj.itemList);
+                List<long> fightScoreDatas = ArenaDataManager.Instance.GetFightScoreList(ArenaDataManager.Instance.DressupList);
+                bool result = await ArenaSproxy.ReqChangeArenaDressup(_dataManager.SelectThemeIndex, 0, MyDressUpHelper.dressUpObj.itemList, fightScoreDatas);
                 if (result)
                 {
                     _itemList = new List<int>(MyDressUpHelper.dressUpObj.itemList);

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs

@@ -257,7 +257,7 @@ namespace GFGGame
                 ArenaDataManager dataManager = ArenaDataManager.Instance;
                 dataManager.DressupList[dataManager.SelectThemeIndex].cardId = cardId;
                 dataManager.SetMineFightAttr(dataManager.DressupList[dataManager.SelectThemeIndex],
-                    dataManager.SelectThemeIndex);
+                    dataManager.ThemeList[dataManager.SelectThemeIndex]);
                 EventAgent.DispatchEvent(ConstMessage.CARD_SELECTED);
             }
         }
@@ -288,8 +288,8 @@ namespace GFGGame
             if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
             {
                 ArenaDataManager dataManager = ArenaDataManager.Instance;
-                ArenaSproxy.ReqChangeArenaDressup(dataManager.SelectThemeIndex, cardId,
-                    MyDressUpHelper.dressUpObj.itemList).Coroutine();
+                List<long> fightScoreDatas = dataManager.GetFightScoreList(dataManager.DressupList);
+                ArenaSproxy.ReqChangeArenaDressup(dataManager.SelectThemeIndex, cardId,MyDressUpHelper.dressUpObj.itemList, fightScoreDatas).Coroutine();
                 if (InstanceZonesDataManager.FightScene == ConstInstanceZonesType.Arena)
                 {
                     //ViewManager.GoBackFrom(typeof(ArenaDressUpFightView).FullName);

BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0.png


BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3!a.png


+ 120 - 0
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3!a.png.meta

@@ -0,0 +1,120 @@
+fileFormatVersion: 2
+guid: 4d59a2aab5ef67b4bb691ad52fdabbe5
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 1
+    wrapV: 1
+    wrapW: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: 50
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 1
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: 50
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 1
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 5e97eb03825dee720800000000000000
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3.png


+ 120 - 0
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_atlas0_3.png.meta

@@ -0,0 +1,120 @@
+fileFormatVersion: 2
+guid: ff234877776602b4ca347deaf03cd528
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 1
+    wrapV: 1
+    wrapW: 1
+  nPOTScale: 0
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 1
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 1
+  spriteTessellationDetail: -1
+  textureType: 8
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: iPhone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: 50
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 1
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  - serializedVersion: 3
+    buildTarget: Android
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: 50
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 1
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 5e97eb03825dee720800000000000000
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_fui.bytes