From bc4197c636bd2bbf011bf94cd24ebfc7b060f2d7 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 03 九月 2025 20:57:00 +0800
Subject: [PATCH] 117 【武将】武将系统 - 立绘参数

---
 Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB430_tagSCTurnFightReport.cs |    3 ---
 Main/System/Hero/UIHeroController.cs                                                        |   22 +++++++++++++++++++++-
 Main/Config/Configs/HeroSkinConfig.cs                                                       |   23 +++++++++++++++++++----
 Main/System/HappyXB/HeroCallResultWin.cs                                                    |    2 +-
 Main/System/HeroUI/HeroTrainWin.cs                                                          |    2 +-
 Main/System/HeroUI/HeroUIManager.cs                                                         |    2 --
 6 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/Main/Config/Configs/HeroSkinConfig.cs b/Main/Config/Configs/HeroSkinConfig.cs
index af36b72..58404d9 100644
--- a/Main/Config/Configs/HeroSkinConfig.cs
+++ b/Main/Config/Configs/HeroSkinConfig.cs
@@ -1,6 +1,6 @@
 锘�//--------------------------------------------------------
 //    [Author]:           YYL
-//    [  Date ]:           2025骞�8鏈�18鏃�
+//    [  Date ]:           2025骞�9鏈�3鏃�
 //--------------------------------------------------------
 
 using System.Collections.Generic;
@@ -22,6 +22,7 @@
 	public int[] AllBatAttrIDList;
 	public int[] AllBatAttrValueList;
 	public string Tachie;
+	public float[] TachieParam;
 	public string SquareIcon;
 	public string RectangleIcon;
 	public string SpineRes;
@@ -96,11 +97,25 @@
 
 			Tachie = tables[5];
 
-			SquareIcon = tables[6];
+			if (tables[6].Contains("["))
+			{
+				TachieParam = JsonMapper.ToObject<float[]>(tables[6]);
+			}
+			else
+			{
+				string[] TachieParamStringArray = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+				TachieParam = new float[TachieParamStringArray.Length];
+				for (int i=0;i<TachieParamStringArray.Length;i++)
+				{
+					 float.TryParse(TachieParamStringArray[i],out TachieParam[i]);
+				}
+			}
 
-			RectangleIcon = tables[7];
+			SquareIcon = tables[7];
 
-			SpineRes = tables[8];
+			RectangleIcon = tables[8];
+
+			SpineRes = tables[9];
         }
         catch (Exception exception)
         {
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB430_tagSCTurnFightReport.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB430_tagSCTurnFightReport.cs
index 1ab1a03..7203c25 100644
--- a/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB430_tagSCTurnFightReport.cs
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB4_FightDefine/DTCB430_tagSCTurnFightReport.cs
@@ -6,7 +6,6 @@
 
 
 public class DTCB430_tagSCTurnFightReport : DtcBasic {
-    private static GameNetEncode encoder = new GameNetEncode();
 
     static byte[] vCmdBytes = new byte[2];
 
@@ -50,8 +49,6 @@
                 Array.Copy(vPackBytes, 0, vCmdBytes, 0, 2);
                 var cmd = (ushort)((ushort)(vCmdBytes[0] << 8) + vCmdBytes[1]);
                 bool isRegist = false;  // 鏈敞鍐屽皝鍖呭鐞�
-
-                Debug.Log("DTCB430_tagSCTurnFightReport: 鎷嗚В鍒嗗寘 闀垮害锛�" + vBodyLeng + " cmd锛�" + cmd);
 
                 if (PackageRegedit.Contain(cmd))
                 {
diff --git a/Main/System/HappyXB/HeroCallResultWin.cs b/Main/System/HappyXB/HeroCallResultWin.cs
index 0c7a094..64b43dc 100644
--- a/Main/System/HappyXB/HeroCallResultWin.cs
+++ b/Main/System/HappyXB/HeroCallResultWin.cs
@@ -265,7 +265,7 @@
             return;
         }
         var hero = HeroConfig.Get(heroID);
-        roleLHModel.Create(hero.SkinIDList[0], HeroUIManager.lihuiScale, motionName: "", isLh: true);
+        roleLHModel.Create(hero.SkinIDList[0], 1, motionName: "", isLh: true);
         qualityImg.SetSprite("HeroCallQuality" + hero.Quality);
         newMarkLHImg.SetActive(HeroUIManager.Instance.IsNewHero(heroID));
         showLHResultCell.Display(heroID, 0, true);
diff --git a/Main/System/Hero/UIHeroController.cs b/Main/System/Hero/UIHeroController.cs
index ac94bf1..fb01aa1 100644
--- a/Main/System/Hero/UIHeroController.cs
+++ b/Main/System/Hero/UIHeroController.cs
@@ -63,7 +63,27 @@
 			return;
 		}
 		skeletonGraphic.Initialize(true);
-		this.transform.localScale = Vector3.one * scale;
+		if (isLh)
+		{
+			//X杞村亸绉伙紝Y杞村亸绉伙紝缂╂斁锛屾槸鍚︽按骞崇炕杞紙0鍚�1鏄級
+			if (skinConfig.TachieParam.Length == 4)
+			{
+				this.transform.localPosition = new Vector3(skinConfig.TachieParam[0], skinConfig.TachieParam[1], 0);
+				this.transform.localScale = Vector3.one * skinConfig.TachieParam[2];
+				this.transform.localRotation = Quaternion.Euler(0, skinConfig.TachieParam[3] == 0 ? 0 : 180, 0);
+			}
+			else
+			{
+				this.transform.localPosition = Vector3.zero;
+				this.transform.localScale = Vector3.one;
+				this.transform.localRotation = Quaternion.identity;
+			}
+
+		}
+		else
+		{
+			this.transform.localScale = Vector3.one * scale;
+		}
 		spineAnimationState = skeletonGraphic.AnimationState;
 		spineAnimationState.Data.DefaultMix = 0f;
 		if (motionName == "")
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 02ec3ad..bcadf4d 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -172,7 +172,7 @@
 
     public void Display()
     {
-        roleLhModel.Create(hero.SkinID, HeroUIManager.lihuiScale, motionName: "", isLh: true);
+        roleLhModel.Create(hero.SkinID, 1, motionName: "", isLh: true);
         roleXsModel.Create(hero.SkinID);
         jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(hero.heroConfig.Class));
         jobPosNameText.text = HeroUIManager.Instance.GetJobName(hero.heroConfig.Class);
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index e09454c..5507467 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -16,8 +16,6 @@
 
     public WaitHeroFuncResponse waitResponse;    //璇锋眰姝﹀皢鍔熻兘锛屼笌鏈嶅姟绔氦浜�
 
-    public const float lihuiScale = 0.6f;   //绔嬬粯缂╂斁澶у皬
-
     //鐢ㄤ簬闈炰笂闃垫灏嗘垬鍔涘彉鍖栨椂 姝﹀皢ID锛氫笂娆℃垬鍔�
     public KeyValuePair<string, long> lastFightPower = new KeyValuePair<string, long>(); 
 

--
Gitblit v1.8.0