Browse Source

添加战报

DESKTOP-FB72PO8\Administrator 15 hours ago
parent
commit
d10d2f15a9

+ 36 - 11
Assets/Editor/CombatEditor/HeroEntityCombatReport.cs

@@ -20,10 +20,12 @@ namespace xy002Editor.CombatEditor
         private ProgressBarShowModle cjShuXing;
         private ProgressBarShowModle shangHangXingXi;
         private ProgressBarShowModle zhiLiaoModle;
+        private ProgressBarShowModle beiZhiLiaoModel;
         private ProgressBarShowModle shouDaoShangHangXingXi;
         private CombatPeportMassgeModle combatPeportMassgeModle;
 
         public Foldout miaoShuFoldout;
+
         public void Init(CombatReportEntityInfo combatReportEntityInfo,
             CombaReportEnditorManager combaReportEnditorManager)
         {
@@ -55,15 +57,16 @@ namespace xy002Editor.CombatEditor
             VisualElement visualElement_h = new VisualElement();
             // VisualElement visualElement_h =combaReportEnditorManager.Copy<VisualElement>("hengxiang"); 
             foldout.Add(visualElement_h);
-            VisualElement visualElement_v = combaReportEnditorManager.Copy<VisualElement>("value_data_entity_style"); //英雄信息
+            VisualElement visualElement_v =
+                combaReportEnditorManager.Copy<VisualElement>("value_data_entity_style"); //英雄信息
             visualElement_h.Add(visualElement_v);
             Label label = new Label();
             label.text = "玩家名" + combatReportEntityInfo.CombatHeroEntity.CurrCombatHeroInfo.heroName;
             visualElement_v.Add(label);
-             label = new Label();
+            label = new Label();
             label.text = "等级" + combatReportEntityInfo.CombatHeroEntity.CurrCombatHeroInfo.level;
             visualElement_v.Add(label);
-            
+
             ScrollView ScrollView = combaReportEnditorManager.Copy<ScrollView>("value_scrollview");
 
             foldout.Add(ScrollView);
@@ -89,7 +92,7 @@ namespace xy002Editor.CombatEditor
             shangHangXingXi = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
             foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
-            foldout1.text = "治疗和被治疗信息";
+            foldout1.text = "治疗信息";
             foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
             foldout1.value = false;
             visualElement_h.Add(foldout1);
@@ -97,6 +100,15 @@ namespace xy002Editor.CombatEditor
             foldout1.Add(progressVe);
             zhiLiaoModle = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
 
+            foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
+            foldout1.text = "被治疗信息";
+            foldout1.style.unityFontStyleAndWeight = FontStyle.Bold;
+            foldout1.value = false;
+            visualElement_h.Add(foldout1);
+            progressVe = combaReportEnditorManager.Copy<VisualElement>("value_data_style");
+            foldout1.Add(progressVe);
+            beiZhiLiaoModel = new ProgressBarShowModle(progressVe, combaReportEnditorManager);
+
 
             foldout1 = combaReportEnditorManager.Copy<Foldout>("foldout_style");
             foldout1.text = "受到伤害信息";
@@ -115,7 +127,7 @@ namespace xy002Editor.CombatEditor
             visualElement_h.Add(miaoShuFoldout);
             VisualElement miaoshuve = combaReportEnditorManager.Copy<VisualElement>("miaoshuve"); //英雄信息
             miaoShuFoldout.Add(miaoshuve);
-            combatPeportMassgeModle=new CombatPeportMassgeModle();
+            combatPeportMassgeModle = new CombatPeportMassgeModle();
             combatPeportMassgeModle.Init(miaoshuve, combatReportEntityInfo, combaReportEnditorManager);
         }
 
@@ -127,10 +139,16 @@ namespace xy002Editor.CombatEditor
             }
 
             DrwaBattleReportValueDataModule(combatReportEntityInfo.HeroInfoModule, cjShuXing);
-            DrwaBattleReportValueDataModule(combatReportEntityInfo.zhiLiao, zhiLiaoModle);
-            DrwaBattleReportValueDataModule(combatReportEntityInfo.CombatInfoModule, shangHangXingXi);
-            DrwaBattleReportValueDataModule(combatReportEntityInfo.InjuredInfoModule, shouDaoShangHangXingXi);
-            
+
+            DrwaBattleReportValueDataModule(combatReportEntityInfo.zhiLiao, zhiLiaoModle,
+                combatReportEntityInfo.allZhiLiao);
+            DrwaBattleReportValueDataModule(combatReportEntityInfo.beiZhiLiao, beiZhiLiaoModel,
+                combatReportEntityInfo.allBeiZhiLiao);
+            DrwaBattleReportValueDataModule(combatReportEntityInfo.CombatInfoModule, shangHangXingXi,
+                combatReportEntityInfo.allHarm);
+            DrwaBattleReportValueDataModule(combatReportEntityInfo.InjuredInfoModule, shouDaoShangHangXingXi,
+                combatReportEntityInfo.allChengShang);
+
             if (miaoShuFoldout.value)
             {
                 combatPeportMassgeModle.OnGui();
@@ -138,19 +156,26 @@ namespace xy002Editor.CombatEditor
         }
 
         private void DrwaBattleReportValueDataModule(BattleReportValueDataModule battleReportValueDataModule,
-            ProgressBarShowModle progressBarShowModle)
+            ProgressBarShowModle progressBarShowModle, float maxValue = -1)
         {
             foreach (var VARIABLE in battleReportValueDataModule.fightValueData_long.Values)
             {
                 ReportFightValueData<long> reportFightValueData = VARIABLE;
+                float max = reportFightValueData.maxValue;
+                if (maxValue > 0)
+                {
+                    max = maxValue;
+                }
+
                 progressBarShowModle.CrendHarmValue(reportFightValueData.name, reportFightValueData.value,
-                    reportFightValueData.maxValue);
+                    max);
             }
         }
 
         public void Dispose()
         {
             combatReportEntityInfo = null;
+            root.Remove(foldout);
         }
     }
 }

+ 44 - 5
Assets/Scripts/GameLogic/Combat/CombatTool/CombatReport/CombatReportEntityInfo.cs

@@ -3,6 +3,7 @@ using Common.Utility.CombatEvent;
 using Core.BattleReport;
 using Core.Language;
 using Fort23.Core;
+using GameLogic.Combat.Buff;
 using GameLogic.Combat.Skill;
 
 namespace GameLogic.Combat.CombatTool.CombatReport
@@ -27,6 +28,11 @@ namespace GameLogic.Combat.CombatTool.CombatReport
         /// </summary>
         public BattleReportValueDataModule zhiLiao = new BattleReportValueDataModule();
 
+        /// <summary>
+        /// 被治疗信息
+        /// </summary>
+        public BattleReportValueDataModule beiZhiLiao = new BattleReportValueDataModule();
+
         /// <summary>
         /// 战斗受到伤害信息面板
         /// </summary>
@@ -37,6 +43,11 @@ namespace GameLogic.Combat.CombatTool.CombatReport
         /// </summary>
         public ReportFightMassgeLogDataModule MsgModule = new ReportFightMassgeLogDataModule();
 
+        public long allHarm = 0;
+        public long allZhiLiao = 0;
+        public long allBeiZhiLiao = 0;
+        public long allChengShang = 0;
+
         public void Init(CombatHeroEntity combatHeroEntity)
         {
             CombatHeroEntity = combatHeroEntity;
@@ -60,9 +71,16 @@ namespace GameLogic.Combat.CombatTool.CombatReport
                 SkillBasic skillBasic = recoverUpdateEventData.HarmReturnInfo.triggerData.Source as SkillBasic;
                 if (skillBasic != null)
                 {
-                    harmKey = LanguageManager.Instance.Text(skillBasic.SelfSkillConfig.name);
+                    harmKey = "S" + LanguageManager.Instance.Text(skillBasic.SelfSkillConfig.name);
                 }
 
+                BuffBasic buffBasic = recoverUpdateEventData.HarmReturnInfo.triggerData.Source as BuffBasic;
+                if (buffBasic != null)
+                {
+                    harmKey = "B" + LanguageManager.Instance.Text(buffBasic.buffInf.BuffConfig.buffName);
+                }
+
+                allZhiLiao += recoverUpdateEventData.HarmReturnInfo.att;
                 zhiLiao.Add(harmKey, recoverUpdateEventData.HarmReturnInfo.att);
             }
             else if (recoverUpdateEventData.HarmReturnInfo.target.combatHeroEntity == CombatHeroEntity)
@@ -73,14 +91,21 @@ namespace GameLogic.Combat.CombatTool.CombatReport
                 float t = CombatController.currActiveCombat.combatTime;
                 MsgModule.Add(t, msg);
 
-                string harmKey = "";
+                string harmKey = "其他";
                 SkillBasic skillBasic = recoverUpdateEventData.HarmReturnInfo.triggerData.Source as SkillBasic;
                 if (skillBasic != null)
                 {
-                    harmKey = LanguageManager.Instance.Text(skillBasic.SelfSkillConfig.name);
+                    harmKey = "S" + LanguageManager.Instance.Text(skillBasic.SelfSkillConfig.name);
                 }
 
-                zhiLiao.Add(harmKey, recoverUpdateEventData.HarmReturnInfo.att);
+                BuffBasic buffBasic = recoverUpdateEventData.HarmReturnInfo.triggerData.Source as BuffBasic;
+                if (buffBasic != null)
+                {
+                    harmKey = "B" + LanguageManager.Instance.Text(buffBasic.buffInf.BuffConfig.buffName);
+                }
+
+                allBeiZhiLiao += recoverUpdateEventData.HarmReturnInfo.att;
+                beiZhiLiao.Add(harmKey, recoverUpdateEventData.HarmReturnInfo.att);
             }
         }
 
@@ -102,6 +127,13 @@ namespace GameLogic.Combat.CombatTool.CombatReport
                     harmKey = LanguageManager.Instance.Text(skillBasic.SelfSkillConfig.name);
                 }
 
+                BuffBasic buffBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as BuffBasic;
+                if (buffBasic != null)
+                {
+                    harmKey = "B" + LanguageManager.Instance.Text(buffBasic.buffInf.BuffConfig.buffName);
+                }
+
+                allHarm += heroInjuredEventData.HarmReturnInfo.att;
                 CombatInfoModule.Add(harmKey, heroInjuredEventData.HarmReturnInfo.att);
             }
             else if (heroInjuredEventData.HarmReturnInfo.target.combatHeroEntity == CombatHeroEntity)
@@ -112,13 +144,20 @@ namespace GameLogic.Combat.CombatTool.CombatReport
                 float t = CombatController.currActiveCombat.combatTime;
                 MsgModule.Add(t, msg);
 
-                string harmKey = "";
+                string harmKey = "其他";
                 SkillBasic skillBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as SkillBasic;
                 if (skillBasic != null)
                 {
                     harmKey = LanguageManager.Instance.Text(skillBasic.SelfSkillConfig.name);
                 }
 
+                BuffBasic buffBasic = heroInjuredEventData.HarmReturnInfo.triggerData.Source as BuffBasic;
+                if (buffBasic != null)
+                {
+                    harmKey = "B" + LanguageManager.Instance.Text(buffBasic.buffInf.BuffConfig.buffName);
+                }
+
+                allBeiZhiLiao += heroInjuredEventData.HarmReturnInfo.att;
                 InjuredInfoModule.Add(harmKey, heroInjuredEventData.HarmReturnInfo.att);
             }
         }

+ 1 - 0
XiuXianGame.sln.DotSettings.user

@@ -3,6 +3,7 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACollectionExtensions_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fde80aed0bd3646409e8bfb15c101f005e2000_003Fb3_003F5c77f01e_003FCollectionExtensions_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACollider_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F2193ba18cb0546b2832917f7674384cf20000_003F3a_003Fa0da6a1e_003FCollider_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACompareFunction_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F84_003Ff4158f3a_003FCompareFunction_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003Fad_003Fcb4b4f1f_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5004a53079e04c2991f89460a5186cf010fc00_003Fd5_003F42d076c8_003FEnumerable_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ff2b6204eed6b41348236173e8a2f539817a880_003F16_003Ff8f742c5_003FEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003AC_0021_003FUsers_003Fadmin_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003Fd3_003F4533b7c3_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>