From cd5c1d2c732e41082b0228deadf52df91c50ffbe Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 23 九月 2024 14:06:12 +0800
Subject: [PATCH] 10261 【越南】【砍树】【英文】仙盟徽章,头像框,头像(动态),聊天气泡,聊天表情-表情在聊天界面上的显示大小由(richtext的)FaceSize决定,当配置0取图片原大小

---
 System/Message/ImgAnalysis.cs |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/System/Message/ImgAnalysis.cs b/System/Message/ImgAnalysis.cs
index ceb56e8..a42a79e 100644
--- a/System/Message/ImgAnalysis.cs
+++ b/System/Message/ImgAnalysis.cs
@@ -137,7 +137,24 @@
                         presentImgInfo.IsFace = true;
                         if (RichTextMgr.Inst.presentRichText != null)
                         {
-                            presentImgInfo.height = RichTextMgr.Inst.presentRichText.FaceSize;
+                            int height = 0;
+                            if (RichTextMgr.Inst.presentRichText.FaceSize != 0)
+                            {
+                                height = (int)RichTextMgr.Inst.presentRichText.FaceSize;
+                            }
+                            else
+                            { 
+                                if (UIFrameMgr.Inst.ContainsDynamicImage(presentImgInfo.spriteName))
+                                {
+                                    var list = UIFrameMgr.Inst.GetDynamicImage(presentImgInfo.spriteName);
+                                    height = (int)list[0].rect.height;
+                                }
+                                else
+                                {
+                                    height = 40;
+                                }
+                            }
+                            presentImgInfo.height = height;
                             presentImgInfo.width = presentImgInfo.height;
                         }
                     }
@@ -213,7 +230,7 @@
             {
                 string result = match.Groups[1].Value.Replace("0", "");
                 m_StringBuilder.Append(msg.Substring(index, match.Index - index));
-                if (UIFrameMgr.Inst.ContainsFace(result))
+                if (UIFrameMgr.Inst.ContainsDynamicImage(result))
                 {
                     m_StringBuilder.Append(string.Format("<Img face={0}/>", result));
                 }

--
Gitblit v1.8.0