From a55075d00afa438d89c0663cb83a338696205cf8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Sat, 31 May 2025 21:16:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=8E=92=E8=A1=8C=E6=A6=9C?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetRaw/UI/UIGameWorldRankForm.prefab | 4 +-- .../HotFix/GameLogic/Common/CommonData.cs | 1 + .../GameLogic/Manager/DataGameModelManager.cs | 1 + .../GameLogic/UI/UIGameWorldRankForm.cs | 28 +++++++++++++++++-- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/UnityProject/Assets/AssetRaw/UI/UIGameWorldRankForm.prefab b/UnityProject/Assets/AssetRaw/UI/UIGameWorldRankForm.prefab index cf788d92..3705b7bc 100644 --- a/UnityProject/Assets/AssetRaw/UI/UIGameWorldRankForm.prefab +++ b/UnityProject/Assets/AssetRaw/UI/UIGameWorldRankForm.prefab @@ -940,7 +940,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0.00038004026, y: -0.004007142} + m_AnchoredPosition: {x: 0.00038004026, y: 0.00013983398} m_SizeDelta: {x: 0, y: 1292.4} m_Pivot: {x: 0, y: 1} --- !u!114 &6944785608262845692 @@ -3377,7 +3377,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0.00038004026, y: -0.00406069} + m_AnchoredPosition: {x: 0.00038004026, y: -0.00003568369} m_SizeDelta: {x: 0, y: 1292.4} m_Pivot: {x: 0, y: 1} --- !u!114 &5343428874745105376 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/CommonData.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/CommonData.cs index fa9417fa..9ad66467 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/CommonData.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/CommonData.cs @@ -241,6 +241,7 @@ namespace GameLogic public string useClientData; public long exp; public long lv; + public string campName; // 家族名称 } public class RoomInfoData diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs index c2c0921f..a35bf140 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameModelManager.cs @@ -81,6 +81,7 @@ public class DataGameModelManager : GameBase.Singleton postPlayRankData.avatar = item.Value.protCustMessageData.imgURL; postPlayRankData.exp = item.Value.protCustMessageData.rankRo.exp; postPlayRankData.lv = item.Value.protCustMessageData.rankRo.lv; + postPlayRankData.campName = DataGameSceneManager.Instance.GetStrs(int.Parse(item.Value.teamId) - 1); rankInfos.Add(postPlayRankData); } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankForm.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankForm.cs index 4bdb70c1..99a6ed53 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankForm.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameWorldRankForm.cs @@ -152,7 +152,7 @@ namespace GameLogic { if (!isJiaZuInit) { - m_loopListView_JiaZuView.InitListView(m_PlayRankDatas.Count, OnGetItemByIndex); + m_loopListView_JiaZuView.InitListView(m_PlayRankDatas.Count, OnGetItemByIndexJiaZu); isJiaZuInit = true; } m_loopListView_JiaZuView.SetListItemCount(m_PlayRankDatas.Count); @@ -173,6 +173,7 @@ namespace GameLogic } + // LoopListViewItem OnGetItemByIndex(LoopListView listView, int index) { if (index >= m_PlayRankDatas.Count) @@ -186,7 +187,30 @@ namespace GameLogic } - LoopListViewItem item = listView.AllocOrNewListViewItem("RankItem"); + LoopListViewItem item = listView.AllocOrNewListViewItem("m_itemRankItem"); + UIGameWorldRankItem itemScript = item.GetComponent(); + + itemScript.OnInit(index, m_PlayRankDatas[index]); + + return item; + } + + + // + LoopListViewItem OnGetItemByIndexJiaZu(LoopListView listView, int index) + { + if (index >= m_PlayRankDatas.Count) + { + return null; + } + + if (m_PlayRankDatas[index] == null) + { + return null; + } + + + LoopListViewItem item = listView.AllocOrNewListViewItem("m_itemRankItemJiaZu"); UIGameWorldRankItem itemScript = item.GetComponent(); itemScript.OnInit(index, m_PlayRankDatas[index]);