From 9752fbc0a91360921cd31e70d4935e19f1168ec4 Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sat, 30 May 2026 17:35:19 +0700 Subject: [PATCH 01/10] hot fix add log --- .../Scripts/Common/DebugSessionLog.cs | 118 +++++++++--------- .../Scripts/Skills/EC_HostSkillModel.cs | 19 ++- .../Scripts/UI/Dialogs/CDlgSkillSubList.cs | 39 +++++- 3 files changed, 112 insertions(+), 64 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs b/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs index f18fbd16bc..d7b0eb0327 100644 --- a/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs +++ b/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs @@ -1,59 +1,59 @@ -#if UNITY_EDITOR || DEVELOPMENT_BUILD -using System; -using System.IO; -using System.Text; -using UnityEngine; - -namespace BrewMonster -{ - /// NDJSON debug session logger (agent instrumentation). - public static class DebugSessionLog - { - const string LogPath = @"c:\Hoang\PW\debug-a9c674.log"; - const string SessionId = "a9c674"; - - public static void Write(string location, string message, string hypothesisId, object data, string runId = "pre-fix") - { - try - { - var ts = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); - var dataJson = data != null ? JsonUtility.ToJson(data) : "{}"; - var line = $"{{\"sessionId\":\"{SessionId}\",\"runId\":\"{runId}\",\"hypothesisId\":\"{hypothesisId}\",\"location\":\"{Escape(location)}\",\"message\":\"{Escape(message)}\",\"data\":{dataJson},\"timestamp\":{ts}}}\n"; - File.AppendAllText(LogPath, line, Encoding.UTF8); - } - catch { /* ignore */ } - } - - static string Escape(string s) => (s ?? "").Replace("\\", "\\\\").Replace("\"", "\\\""); - } - - [Serializable] - public class DebugSessionPayload - { - public int skillId; - public int hostId; - public int castTargetId; - public int targetId; - public int targetCount; - public bool castInTargets; - public bool alreadyFired; - public int flyClusterCount; - public int flyDelayMs; - public int eventId; - public string flyGfx; - public string prevState; - public string newState; - public int frame; - public float spawnX; - public float spawnY; - public float spawnZ; - public float targetX; - public float targetY; - public float targetZ; - public float radius; - public float offsetMag; - public bool isCluster; - public bool isArea; - } -} -#endif +#if UNITY_EDITOR || DEVELOPMENT_BUILD +using System; +using System.IO; +using System.Text; +using UnityEngine; + +namespace BrewMonster +{ + /// NDJSON debug session logger (agent instrumentation). + public static class DebugSessionLog + { + const string LogPath = @"c:\Hoang\PW\debug-a9c674.log"; + const string SessionId = "a9c674"; + + public static void Write(string location, string message, string hypothesisId, DebugSessionPayload data, string runId = "pre-fix") + { + try + { + var ts = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + var dataJson = data != null ? JsonUtility.ToJson(data) : "{}"; + var line = $"{{\"sessionId\":\"{SessionId}\",\"runId\":\"{runId}\",\"hypothesisId\":\"{hypothesisId}\",\"location\":\"{Escape(location)}\",\"message\":\"{Escape(message)}\",\"data\":{dataJson},\"timestamp\":{ts}}}\n"; + File.AppendAllText(LogPath, line, Encoding.UTF8); + } + catch { /* ignore */ } + } + + static string Escape(string s) => (s ?? "").Replace("\\", "\\\\").Replace("\"", "\\\""); + } + + [Serializable] + public class DebugSessionPayload + { + public int skillId; + public int hostId; + public int castTargetId; + public int targetId; + public int targetCount; + public bool castInTargets; + public bool alreadyFired; + public int flyClusterCount; + public int flyDelayMs; + public int eventId; + public string flyGfx; + public string prevState; + public string newState; + public int frame; + public float spawnX; + public float spawnY; + public float spawnZ; + public float targetX; + public float targetY; + public float targetZ; + public float radius; + public float offsetMag; + public bool isCluster; + public bool isArea; + } +} +#endif diff --git a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs index 97be7203c8..329051fecf 100644 --- a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs +++ b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs @@ -191,6 +191,10 @@ namespace BrewMonster.Scripts.Skills m_bInitialized = true; + // #region agent log + BMLogger.LogError($"[SkillSubList][H-A] CECHostSkillModel.Initialize prof={professionOverride ?? (CECGameRun.Instance?.GetHostPlayer()?.GetProfession() ?? -1)} profSkills={m_allProfSkills.Count} rankBuckets={m_allRankProfSkills.Count} hostNull={CECGameRun.Instance?.GetHostPlayer() == null}"); + // #endregion + // ÖØÐ´¦ÀíNPCLIST ProcessServiceList(); } @@ -544,6 +548,9 @@ namespace BrewMonster.Scripts.Skills public void InitAllSkillsOfCurProf(int? professionOverride) { + int npcSkillsCount = 0; + int matchedSkillsCount = 0; + int playerProfession = -1; // --- B1: Thu thập toàn bộ skill từ các NPC có cung cấp dịch vụ học skill --- HashSet npcSkills = new HashSet(); { @@ -574,20 +581,24 @@ namespace BrewMonster.Scripts.Skills } } + npcSkillsCount = npcSkills.Count; + var hostPlayer = CECGameRun.Instance?.GetHostPlayer(); + playerProfession = professionOverride ?? (hostPlayer != null ? hostPlayer.GetProfession() : -1); + // --- B2: Duyệt tất cả skill, lọc skill theo class hiện tại của người chơi --- uint curID = 0; while ((curID = ElementSkill.NextSkill(curID)) != 0) { ElementSkill pSkill = ElementSkill.Create(curID, 1); int cls = pSkill.GetCls(); - int playerCls = professionOverride ?? - CECGameRun.Instance.GetHostPlayer().GetProfession(); + int playerCls = playerProfession; bool isSameClass = (cls == playerCls || cls == 255); bool isProvidedByNPC = npcSkills.Contains(curID); if (isSameClass && isProvidedByNPC) { + matchedSkillsCount++; m_allProfSkills[(int)curID] = pSkill; if (!m_allRankProfSkills.ContainsKey(pSkill.GetRank())) m_allRankProfSkills[pSkill.GetRank()] = new List(); @@ -595,6 +606,10 @@ namespace BrewMonster.Scripts.Skills } } + // #region agent log + BMLogger.LogError($"[SkillSubList][H-B] InitAllSkillsOfCurProf npcSkills={npcSkillsCount} matched={matchedSkillsCount} profSkills={m_allProfSkills.Count} rankBuckets={m_allRankProfSkills.Count} profession={playerProfession} hostNull={hostPlayer == null}"); + // #endregion + foreach (var kvp in m_allRankProfSkills) { kvp.Value.Sort((lhs, rhs) => diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs index bd749400e9..12eb0d1cfa 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs @@ -105,6 +105,9 @@ namespace BrewMonster.UI { if (m_bAllocRankDlgs || m_pSubRank == null || m_contentRoot == null) { + // #region agent log + BMLogger.LogError($"[SkillSubList][H-E] InitRankDlgs skipped reason={(m_bAllocRankDlgs ? "already_alloc" : (m_pSubRank == null ? "no_sub_rank" : "no_content_root"))} allocRank={m_bAllocRankDlgs} subSkill={m_pSubSkill != null} contentRoot={m_contentRoot != null}"); + // #endregion return; } m_bAllocRankDlgs = true; @@ -159,7 +162,13 @@ namespace BrewMonster.UI skill.Show(false); } - IReadOnlyDictionary> allRankProfSkills = CECHostSkillModel.Instance?.GetAllRankProfSkills(); + var skillModel = CECHostSkillModel.Instance; + IReadOnlyDictionary> allRankProfSkills = skillModel?.GetAllRankProfSkills(); + + // #region agent log + int totalCatalogSkills = allRankProfSkills != null ? allRankProfSkills.Values.Sum(l => l?.Count ?? 0) : -1; + BMLogger.LogError($"[SkillSubList][H-A] ResetDialog start modelNull={skillModel == null} rankBuckets={allRankProfSkills?.Count ?? -1} catalogSkills={totalCatalogSkills} isEvil={IsEvil()} allocRank={m_bAllocRankDlgs} subSkillTpl={m_pSubSkill != null} contentRoot={m_contentRoot != null} hostNull={GetHostPlayer() == null}"); + // #endregion for (CECTaoistRank taoistRank = CECTaoistRank.GetBaseRankBegin(); taoistRank != CECTaoistRank.GetBaseRankEnd(); @@ -191,6 +200,10 @@ namespace BrewMonster.UI ShowLastSelectedSkill(); } UpdateTotalSPText(); + + // #region agent log + BMLogger.LogError($"[SkillSubList][H-E] ResetDialog end shownSkills={m_skillSubCount} rankBuckets={allRankProfSkills?.Count ?? -1} isEvil={IsEvil()} allocRank={m_bAllocRankDlgs}"); + // #endregion } public void UpdateTotalSPText() @@ -280,29 +293,43 @@ namespace BrewMonster.UI if (allRankProfSkills == null) { + // #region agent log + BMLogger.LogError($"[SkillSubList][H-A] AddDlgsOfOneRank skip reason=allRankProfSkills_null rankId={rankID}"); + // #endregion return; } if (IsEvil() && taoistRank.IsGodRank()) { + // #region agent log + BMLogger.LogError($"[SkillSubList][H-C] AddDlgsOfOneRank skip reason=evil_hides_god rankId={rankID}"); + // #endregion return; } else if (!IsEvil() && taoistRank.IsEvilRank()) { + // #region agent log + BMLogger.LogError($"[SkillSubList][H-C] AddDlgsOfOneRank skip reason=non_evil_hides_evil rankId={rankID}"); + // #endregion return; } if (!allRankProfSkills.TryGetValue(rankID, out var rankItr) || rankItr == null || rankItr.Count == 0) { + // #region agent log + BMLogger.LogError($"[SkillSubList][H-A] AddDlgsOfOneRank skip reason=rank_empty rankId={rankID}"); + // #endregion return; } List rankSkills = new List(); + int overriddenSkipped = 0; foreach (var skillID in rankItr) { if (ElementSkill.IsOverridden((uint)skillID)) { - BMLogger.LogError("HoangDev: AddDlgsOfOneRank ElementSkill.IsOverridden for skillID " + skillID); + overriddenSkipped++; + BMLogger.LogError($"[SkillSubList][H-D] skill overridden skillId={skillID} rankId={rankID}"); continue; } /* bool bOnlyShowSkillCanLearn = GetGameUIMan()->m_pDlgSkillAction->IsOnlyShowSkillCanLearn(); @@ -323,10 +350,16 @@ namespace BrewMonster.UI } if (rankSkills.Count == 0) { - BMLogger.LogError("HoangDev: AddDlgsOfOneRank rankSkills.Count == 0"); + // #region agent log + BMLogger.LogError($"[SkillSubList][H-D] AddDlgsOfOneRank skip reason=all_overridden rankId={rankID} raw={rankItr.Count} overriddenSkipped={overriddenSkipped}"); + // #endregion return; } + // #region agent log + BMLogger.LogError($"[SkillSubList][H-E] AddDlgsOfOneRank adding rankId={rankID} raw={rankItr.Count} shown={rankSkills.Count} overriddenSkipped={overriddenSkipped} isEvil={IsEvil()}"); + // #endregion + AddRankSubDig(rankID); rankSkills.Sort(); foreach (int skillID in rankSkills) From e8b8153d91db757df57c94b9f681e1cdb6ae43ed Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sat, 30 May 2026 17:54:23 +0700 Subject: [PATCH 02/10] update log --- Assets/AddressableAssetsData/AssetGroups/gfx.asset | 6 ------ Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs | 1 + Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs | 7 ++++++- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Assets/AddressableAssetsData/AssetGroups/gfx.asset b/Assets/AddressableAssetsData/AssetGroups/gfx.asset index 3c3ca35f47..b04be0329a 100644 --- a/Assets/AddressableAssetsData/AssetGroups/gfx.asset +++ b/Assets/AddressableAssetsData/AssetGroups/gfx.asset @@ -1241,12 +1241,6 @@ MonoBehaviour: m_SerializedLabels: - RemoteContent FlaggedDuringContentUpdateRestriction: 0 - - m_GUID: 96405357221afa34990f1c8b0ad64755 - m_Address: "gfx/\u7B56\u5212\u8054\u5165/\u4EBA\u7269\u6280\u80FD/\u51FB\u4E2D/\u517D\u738B\u9524\u51FB\u4E2D.gfx" - m_ReadOnly: 0 - m_SerializedLabels: - - RemoteContent - FlaggedDuringContentUpdateRestriction: 0 - m_GUID: 97bb43aeae9345e4ea58bd33e8257cb0 m_Address: "gfx/\u7B56\u5212\u8054\u5165/\u4EBA\u7269\u6280\u80FD/\u98DE\u884C/\u9F99\u73B0\u98DE\u884C.gfx" m_ReadOnly: 0 diff --git a/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs b/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs index d91f075567..7942b3f018 100644 --- a/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs +++ b/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs @@ -140,6 +140,7 @@ namespace BrewMonster s_allTaoistRanks[i] = new CECTaoistRank(); } s_allTaoistRanks[i].m_id = TaoistRankIDs[i]; + BMLogger.LogError("HoangDev: CECUIManager.Instance.GetInGameUIMan() " + CECUIManager.Instance.GetInGameUIMan()); s_allTaoistRanks[i].m_name = CECUIManager.Instance.GetInGameUIMan().GetStringFromTable(1001 + s_allTaoistRanks[i].m_id); if (i != (int)ToaistRank.BaseRankCount - 1 && i != (int)ToaistRank.BaseRankCount + (int)ToaistRank.GodRankCount - 1 && diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs index 12eb0d1cfa..241e45aa4c 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs @@ -60,6 +60,7 @@ namespace BrewMonster.UI private void OnShowDialog() { + BMLogger.LogError("HoangDev: OnShowDialog "); InitRankDlgs(); ResetDialog(); @@ -138,6 +139,7 @@ namespace BrewMonster.UI // ��ʼ�����������ڶԻ���һ���Է�����ڴ� / Initialize rank sub-dialogs once to avoid realloc private void CreateOneRankDlg(CECTaoistRank taoistRank) { + BMLogger.LogError("HoangDev: CreateOneRankDlg"); AUISubDialog pSubRank = Instantiate(m_pSubRank, m_contentRoot, transform); pSubRank.SetName($"{m_pSubRank.GetName()}{taoistRank.GetID()}"); pSubRank.Show(false); @@ -226,7 +228,7 @@ namespace BrewMonster.UI // �޸�ijһ����������״̬ / Refresh a single skill sub dialog private void UpdateOneSubDlg(int skillID) { - //BMLogger.LogError("UpdateOneSubDlg"); + BMLogger.LogError("UpdateOneSubDlg"); if (!m_skillSubDialogsMap.TryGetValue(skillID, out var pSub)) { return; @@ -239,6 +241,7 @@ namespace BrewMonster.UI } subListItem.UpdateSkill(skillID); subListItem.Show(true); + BMLogger.LogError("HoangDEv subListItem true"); if (GetSelectedSkillID() == skillID) { //GetGameUIMan()->m_pDlgSkillAction->ShowSkillTree(skillID); @@ -264,6 +267,7 @@ namespace BrewMonster.UI // ����һ�����ܶԻ��򣬵��øú����������UpdateOneSubDlg / Add a skill sub dialog then update it private void AddSkillSubDlg(int skillID, int rankID) { + BMLogger.LogError("HoangDev: AddSkillSubDlg(int skillID, int rankID)"); if (m_pSubSkill == null || m_contentRoot == null) { return; @@ -286,6 +290,7 @@ namespace BrewMonster.UI // ��ijһ�����漶���Ӧ�����м���������Ի��� / Add dialogs for one rank private void AddDlgsOfOneRank(CECTaoistRank taoistRank) { + BMLogger.LogError("HoangDev: AddDlgsOfOneRank(CECTaoistRank taoistRank)"); CECHostSkillModel model = CECHostSkillModel.Instance; IReadOnlyDictionary> allRankProfSkills = model.GetAllRankProfSkills(); From 87cea0adcbed8aa94a61e6a6cd69225e03a8c86b Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sun, 31 May 2026 14:18:44 +0700 Subject: [PATCH 03/10] for log --- .../Scripts/Common/DebugSessionLog.cs | 177 ++++++++++++------ .../Scripts/UI/Dialogs/CDlgSkillSubList.cs | 72 +++++-- .../GamePlay/SkillUI/CDlgSkillSubListItem.cs | 24 ++- .../Scripts/UI/MiniMap/CDlgMiniMap.cs | 2 +- 4 files changed, 191 insertions(+), 84 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs b/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs index d7b0eb0327..b1e677e059 100644 --- a/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs +++ b/Assets/PerfectWorld/Scripts/Common/DebugSessionLog.cs @@ -1,59 +1,118 @@ -#if UNITY_EDITOR || DEVELOPMENT_BUILD -using System; -using System.IO; -using System.Text; -using UnityEngine; - -namespace BrewMonster -{ - /// NDJSON debug session logger (agent instrumentation). - public static class DebugSessionLog - { - const string LogPath = @"c:\Hoang\PW\debug-a9c674.log"; - const string SessionId = "a9c674"; - - public static void Write(string location, string message, string hypothesisId, DebugSessionPayload data, string runId = "pre-fix") - { - try - { - var ts = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); - var dataJson = data != null ? JsonUtility.ToJson(data) : "{}"; - var line = $"{{\"sessionId\":\"{SessionId}\",\"runId\":\"{runId}\",\"hypothesisId\":\"{hypothesisId}\",\"location\":\"{Escape(location)}\",\"message\":\"{Escape(message)}\",\"data\":{dataJson},\"timestamp\":{ts}}}\n"; - File.AppendAllText(LogPath, line, Encoding.UTF8); - } - catch { /* ignore */ } - } - - static string Escape(string s) => (s ?? "").Replace("\\", "\\\\").Replace("\"", "\\\""); - } - - [Serializable] - public class DebugSessionPayload - { - public int skillId; - public int hostId; - public int castTargetId; - public int targetId; - public int targetCount; - public bool castInTargets; - public bool alreadyFired; - public int flyClusterCount; - public int flyDelayMs; - public int eventId; - public string flyGfx; - public string prevState; - public string newState; - public int frame; - public float spawnX; - public float spawnY; - public float spawnZ; - public float targetX; - public float targetY; - public float targetZ; - public float radius; - public float offsetMag; - public bool isCluster; - public bool isArea; - } -} -#endif +#if UNITY_EDITOR || DEVELOPMENT_BUILD + +using System; + +using System.IO; + +using System.Text; + +using UnityEngine; + + + +namespace BrewMonster + +{ + + /// NDJSON debug session logger (agent instrumentation). + + public static class DebugSessionLog + + { + + const string LogPath = @"c:\Hoang\PW\debug-a9c674.log"; + + const string SessionId = "a9c674"; + + + + public static void Write(string location, string message, string hypothesisId, DebugSessionPayload data, string runId = "pre-fix") + + { + + try + + { + + var ts = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + var dataJson = data != null ? JsonUtility.ToJson(data) : "{}"; + + var line = $"{{\"sessionId\":\"{SessionId}\",\"runId\":\"{runId}\",\"hypothesisId\":\"{hypothesisId}\",\"location\":\"{Escape(location)}\",\"message\":\"{Escape(message)}\",\"data\":{dataJson},\"timestamp\":{ts}}}\n"; + + File.AppendAllText(LogPath, line, Encoding.UTF8); + + } + + catch { /* ignore */ } + + } + + + + static string Escape(string s) => (s ?? "").Replace("\\", "\\\\").Replace("\"", "\\\""); + + } + + + + [Serializable] + + public class DebugSessionPayload + + { + + public int skillId; + + public int hostId; + + public int castTargetId; + + public int targetId; + + public int targetCount; + + public bool castInTargets; + + public bool alreadyFired; + + public int flyClusterCount; + + public int flyDelayMs; + + public int eventId; + + public string flyGfx; + + public string prevState; + + public string newState; + + public int frame; + + public float spawnX; + + public float spawnY; + + public float spawnZ; + + public float targetX; + + public float targetY; + + public float targetZ; + + public float radius; + + public float offsetMag; + + public bool isCluster; + + public bool isArea; + + } + +} + +#endif + diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs index 241e45aa4c..fd773b0e31 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs @@ -150,6 +150,7 @@ namespace BrewMonster.UI // ���¶������Ի�����в��� / Reset dialog with all rank/skill sub dialogs public void ResetDialog() { + m_skillSubDialogs.RemoveAll(item => item == null); m_skillSubDialogsMap.Clear(); m_skillSubCount = 0; m_curBottom = m_originBottom; @@ -228,15 +229,16 @@ namespace BrewMonster.UI // �޸�ijһ����������״̬ / Refresh a single skill sub dialog private void UpdateOneSubDlg(int skillID) { - BMLogger.LogError("UpdateOneSubDlg"); if (!m_skillSubDialogsMap.TryGetValue(skillID, out var pSub)) { + BMLogger.LogError($"[SkillSubList] UpdateOneSubDlg missing map entry skillId={skillID}"); return; } CDlgSkillSubListItem subListItem = pSub; - if(subListItem == null ) + if (subListItem == null) { + BMLogger.LogError($"[SkillSubList] UpdateOneSubDlg subListItem null skillId={skillID} poolCount={m_skillSubDialogs.Count} shown={m_skillSubCount}"); return; } subListItem.UpdateSkill(skillID); @@ -267,26 +269,63 @@ namespace BrewMonster.UI // ����һ�����ܶԻ��򣬵��øú����������UpdateOneSubDlg / Add a skill sub dialog then update it private void AddSkillSubDlg(int skillID, int rankID) { - BMLogger.LogError("HoangDev: AddSkillSubDlg(int skillID, int rankID)"); if (m_pSubSkill == null || m_contentRoot == null) + { + BMLogger.LogError($"[SkillSubList] AddSkillSubDlg aborted skillId={skillID} subSkillTpl={m_pSubSkill != null} contentRoot={m_contentRoot != null}"); + return; + } + + CDlgSkillSubListItem curSubSkill = AcquireSkillSubDialog(skillID, rankID); + if (curSubSkill == null) { return; } - if (m_skillSubCount >= m_skillSubDialogs.Count) - { - CDlgSkillSubListItem pSubSkill = Instantiate(m_pSubSkill, m_rankSubDialogs[rankID].transform); - m_skillSubDialogs.Add(pSubSkill); - } - - CDlgSkillSubListItem curSubSkill = m_skillSubDialogs[m_skillSubCount]; - curSubSkill?.SetHighlight(false); - + curSubSkill.SetHighlight(false); m_skillSubDialogsMap[skillID] = curSubSkill; m_skillSubCount++; UpdateOneSubDlg(skillID); } + private CDlgSkillSubListItem AcquireSkillSubDialog(int skillID, int rankID) + { + while (m_skillSubCount < m_skillSubDialogs.Count) + { + CDlgSkillSubListItem pooled = m_skillSubDialogs[m_skillSubCount]; + if (pooled != null) + { + return pooled; + } + + m_skillSubDialogs.RemoveAt(m_skillSubCount); + } + + if (!m_rankSubDialogs.TryGetValue(rankID, out AUISubDialog rankSub) || rankSub == null) + { + BMLogger.LogError($"[SkillSubList] rank dialog missing rankId={rankID} allocRank={m_bAllocRankDlgs} rankDialogs={m_rankSubDialogs.Count}"); + if (!m_bAllocRankDlgs) + { + InitRankDlgs(); + } + + if (!m_rankSubDialogs.TryGetValue(rankID, out rankSub) || rankSub == null) + { + BMLogger.LogError($"[SkillSubList] cannot instantiate skill item skillId={skillID} rankId={rankID}"); + return null; + } + } + + CDlgSkillSubListItem created = Instantiate(m_pSubSkill, rankSub.transform); + if (created == null) + { + BMLogger.LogError($"[SkillSubList] Instantiate returned null skillId={skillID} rankId={rankID} template={m_pSubSkill.name}"); + return null; + } + + m_skillSubDialogs.Add(created); + return created; + } + // ��ijһ�����漶���Ӧ�����м���������Ի��� / Add dialogs for one rank private void AddDlgsOfOneRank(CECTaoistRank taoistRank) { @@ -402,10 +441,14 @@ namespace BrewMonster.UI Destroy(kv.Value.gameObject); } m_rankSubDialogs.Clear(); + m_bAllocRankDlgs = false; foreach (var dlg in m_skillSubDialogs) { - Destroy(dlg.gameObject); + if (dlg != null) + { + Destroy(dlg.gameObject); + } } m_skillSubDialogs.Clear(); @@ -422,8 +465,7 @@ namespace BrewMonster.UI if (isActiveAndEnabled) { InitRankDlgs(); - FitSize(); - ShowLastSelectedSkill(); + ResetDialog(); } } diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs index 1da346a909..8f6085fb2f 100644 --- a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs @@ -167,13 +167,26 @@ namespace BrewMonster public void UpdateSkill(int skillID) { + if (m_skillIconImgPic == null || m_skillNameLbl == null || skillLevel == null) + { + BMLogger.LogError($"[SkillSubList] UpdateSkill missing refs skillId={skillID} icon={m_skillIconImgPic != null} nameLbl={m_skillNameLbl != null} levelLbl={skillLevel != null} go={name}"); + return; + } + + var uiMan = CECUIManager.Instance?.GetInGameUIMan(); + if (uiMan == null) + { + BMLogger.LogError($"[SkillSubList] UpdateSkill InGameUIMan null skillId={skillID}"); + return; + } + CECHostSkillModel model = CECHostSkillModel.Instance; m_skillID = skillID; m_curLevel = model.GetSkillCurrentLevel(m_skillID); enumSkillLearnedState learnedState = model.GetSkillLearnedState(m_skillID); var spriteName = model.GetSkillIcon(skillID); - var slot = CECUIManager.Instance.GetInGameUIMan().SetCover(m_skillIconImgPic, spriteName, EC_GAMEUI_ICONS.ICONS_SKILL); + var slot = uiMan.SetCover(m_skillIconImgPic, spriteName, EC_GAMEUI_ICONS.ICONS_SKILL); if (slot is AUIImagePicture picture) { picture.SetSkillId(skillID); @@ -229,14 +242,7 @@ namespace BrewMonster { skillName += ACString(GetStringFromTable(11322)); }*/ - if (m_skillNameLbl == null) - { - BMLogger.LogError("HoangDev: CDlgSkillSubListItem m_skillNameLbl is null for skillID " + skillID); - } - else - { - this.name = "Item_"+m_skillID; - } + name = "Item_" + m_skillID; m_skillNameLbl.text = skillName; UpdateUpgradeBtn(); diff --git a/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs b/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs index eaa7ba6baa..377d1a5948 100644 --- a/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs +++ b/Assets/PerfectWorld/Scripts/UI/MiniMap/CDlgMiniMap.cs @@ -190,7 +190,7 @@ namespace PerfectWorld.UI.MiniMap if (_txtSystemTime != null) _txtSystemTime.text = strText; - BMLogger.Log($"[Cuong] {strText}"); + // BMLogger.Log($"[Cuong] {strText}"); } /// From 366a857a9ed887a2b12d65dc3547ab6c447848d3 Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sun, 31 May 2026 14:24:26 +0700 Subject: [PATCH 04/10] make sure list is init --- Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs index 329051fecf..d09cc832e8 100644 --- a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs +++ b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs @@ -98,6 +98,7 @@ namespace BrewMonster.Scripts.Skills public CECHostSkillModel() { + m_allProfSkills = new Dictionary(); m_skillLearnNPCNID = 0; m_bReceivedNPCGreeting = false; m_bInitialized = false; From 28092ce6c8880bd2fec6a943f657231ae774f3f4 Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sun, 31 May 2026 15:45:52 +0700 Subject: [PATCH 05/10] log in build --- Assets/Scripts/EC_GameRun.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/EC_GameRun.cs b/Assets/Scripts/EC_GameRun.cs index 5e1471f369..5d60cf1ef9 100644 --- a/Assets/Scripts/EC_GameRun.cs +++ b/Assets/Scripts/EC_GameRun.cs @@ -95,7 +95,7 @@ public partial class CECGameRun : ITickable public void Init() { #if !UNITY_EDITOR - Debug.unityLogger.logEnabled = false; + // Debug.unityLogger.logEnabled = false; QualitySettings.vSyncCount = 0; Application.targetFrameRate = 30; #endif From c4b9320b3c59aca8cffe722642af06d7f78d4de7 Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sun, 31 May 2026 16:21:47 +0700 Subject: [PATCH 06/10] add more log --- .../Scripts/Skills/EC_HostSkillModel.cs | 43 ++++++--- .../Scripts/UI/Dialogs/CDlgSkillSubList.cs | 40 ++++++++- .../GamePlay/SkillUI/CDlgSkillSubListItem.cs | 87 ++++++++++++------- ProjectSettings/ScriptableBuildPipeline.json | 2 +- ProjectSettings/VisualScriptingSettings.asset | 2 +- 5 files changed, 124 insertions(+), 50 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs index d09cc832e8..1da0d8f674 100644 --- a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs +++ b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs @@ -147,9 +147,19 @@ namespace BrewMonster.Scripts.Skills return enumEvilGod.SKILL_BASE; } } + static CECHostPlayer TryGetHostPlayer() => CECGameRun.Instance?.GetHostPlayer(); + public enumSkillLearnedState GetSkillLearnedState(int skillID) { - CECSkill pSkill = CECGameRun.Instance.GetHostPlayer().GetNormalSkill(skillID); + CECHostPlayer host = TryGetHostPlayer(); + if (host == null) + { + return ElementSkill.IsOverridden((uint)skillID) + ? enumSkillLearnedState.SKILL_OVERRIDDEN + : enumSkillLearnedState.SKILL_NOT_LEARNED; + } + + CECSkill pSkill = host.GetNormalSkill(skillID); if (pSkill != null) { if (pSkill.GetSkillLevel() < pSkill.GetMaxLevel()) @@ -314,9 +324,15 @@ namespace BrewMonster.Scripts.Skills BMLogger.LogError("skillID not exist in m_allProfSkills"); return default; } - int maxLevel = CECGameRun.Instance.GetHostPlayer().GetMaxLevelSofar(); - int rank = CECGameRun.Instance.GetHostPlayer().GetBasicProps().iLevel2; - int realmLevel = CECGameRun.Instance.GetHostPlayer().GetRealmLevel(); + CECHostPlayer host = TryGetHostPlayer(); + if (host == null) + { + return enumSkillFitLevelState.SKILL_NOT_FIT_LEVEL; + } + + int maxLevel = host.GetMaxLevelSofar(); + int rank = host.GetBasicProps().iLevel2; + int realmLevel = host.GetRealmLevel(); return GetSkillFitLevel(skillID, maxLevel, rank, realmLevel); } @@ -329,7 +345,7 @@ namespace BrewMonster.Scripts.Skills } int skillLevel = 1; //½«ÒªÑ§Ï°µÄ¼¼Äܼ¶±ð - CECSkill pSkill = CECGameRun.Instance.GetHostPlayer().GetNormalSkill(skillID); + CECSkill pSkill = TryGetHostPlayer()?.GetNormalSkill(skillID); if (pSkill != null) { skillLevel = pSkill.GetSkillLevel() + 1; @@ -364,7 +380,8 @@ namespace BrewMonster.Scripts.Skills } public int CheckLearnCondition(int skillID) { - return CECGameRun.Instance.GetHostPlayer().CheckSkillLearnCondition(skillID, true); + CECHostPlayer host = TryGetHostPlayer(); + return host != null ? host.CheckSkillLearnCondition(skillID, true) : 0; } public StringBuilder GetSkillDescription(int skillID, int level) { @@ -401,15 +418,13 @@ namespace BrewMonster.Scripts.Skills return 0; } - CECSkill pSkill = CECGameRun.Instance.GetHostPlayer().GetNormalSkill(skillID); + CECSkill pSkill = TryGetHostPlayer()?.GetNormalSkill(skillID); if (pSkill != null) { return pSkill.GetSkillLevel(); } - else - { - return 0; - } + + return 0; } private void InitializeRootOfSkillTree(int rootSkillID) { @@ -525,7 +540,8 @@ namespace BrewMonster.Scripts.Skills } - if (pSkill.GetCls() == CECGameRun.Instance.GetHostPlayer().GetProfession()) + CECHostPlayer host = TryGetHostPlayer(); + if (host != null && pSkill.GetCls() == host.GetProfession()) { // ��NPC������ǰְҵ���ܣ���Ҫ��¼��NPC��ID profCorrect = true; @@ -666,7 +682,8 @@ namespace BrewMonster.Scripts.Skills } public bool CheckPreItem(int itemID) { - return CECGameRun.Instance.GetHostPlayer().GetPack().FindItem(itemID) != -1; + CECHostPlayer host = TryGetHostPlayer(); + return host != null && host.GetPack().FindItem(itemID) != -1; } public bool IsSkillServedByNPC(int skillID) { diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs index fd773b0e31..3cc4f00152 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Linq; using BrewMonster; @@ -40,6 +41,7 @@ namespace BrewMonster.UI private bool m_bAllocRankDlgs; // 是否已创建阶位子对话 / Whether rank sub dialogs are allocated private int m_selectedSkillId; + private Coroutine m_resetDialogCoroutine; private void Awake() { @@ -60,9 +62,12 @@ namespace BrewMonster.UI private void OnShowDialog() { - BMLogger.LogError("HoangDev: OnShowDialog "); InitRankDlgs(); - ResetDialog(); + if (m_resetDialogCoroutine != null) + { + StopCoroutine(m_resetDialogCoroutine); + } + m_resetDialogCoroutine = StartCoroutine(ResetDialogWhenReady()); // 保留原始隐藏新图标逻辑 / Keep original "hide new" logic (pending port) // GetGameUIMan()->m_pDlgSystem->ShowNewImg(false); @@ -71,6 +76,33 @@ namespace BrewMonster.UI // GetGameUIMan()->m_pDlgSystem5b->ShowNewImg(false); } + private IEnumerator ResetDialogWhenReady() + { + const float timeoutSecs = 15f; + float elapsed = 0f; + while (GetHostPlayer() == null && elapsed < timeoutSecs) + { + elapsed += Time.unscaledDeltaTime; + yield return null; + } + + if (GetHostPlayer() == null) + { + BMLogger.LogError("[SkillSubList] ResetDialog skipped: host player still null"); + yield break; + } + + var uiMan = CECUIManager.Instance?.GetInGameUIMan(); + if (uiMan == null) + { + BMLogger.LogError("[SkillSubList] ResetDialog skipped: InGameUIMan null"); + yield break; + } + + ResetDialog(); + m_resetDialogCoroutine = null; + } + // 初始化模板尺寸 / Cache template sizing info private void CacheTemplateInfo() { @@ -241,7 +273,11 @@ namespace BrewMonster.UI BMLogger.LogError($"[SkillSubList] UpdateOneSubDlg subListItem null skillId={skillID} poolCount={m_skillSubDialogs.Count} shown={m_skillSubCount}"); return; } + BMLogger.LogError("HoangDEv subListItem before update "); + subListItem.UpdateSkill(skillID); + BMLogger.LogError("HoangDEv subListItem after update "); + subListItem.Show(true); BMLogger.LogError("HoangDEv subListItem true"); if (GetSelectedSkillID() == skillID) diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs index 8f6085fb2f..d36188ffc4 100644 --- a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs @@ -167,6 +167,7 @@ namespace BrewMonster public void UpdateSkill(int skillID) { + BMLogger.LogError("HoangDev: UpdateSkill skillID:" + skillID); if (m_skillIconImgPic == null || m_skillNameLbl == null || skillLevel == null) { BMLogger.LogError($"[SkillSubList] UpdateSkill missing refs skillId={skillID} icon={m_skillIconImgPic != null} nameLbl={m_skillNameLbl != null} levelLbl={skillLevel != null} go={name}"); @@ -180,6 +181,12 @@ namespace BrewMonster return; } + if (GetHostPlayer() == null) + { + BMLogger.LogError($"[SkillSubList] UpdateSkill host player null skillId={skillID}"); + return; + } + CECHostSkillModel model = CECHostSkillModel.Instance; m_skillID = skillID; m_curLevel = model.GetSkillCurrentLevel(m_skillID); @@ -192,19 +199,6 @@ namespace BrewMonster picture.SetSkillId(skillID); } - /* var sprites = Resources.LoadAll("iconlist_skill_multisprite"); - if (sprites == null || sprites.Length == 0) - return; - - for (int i = 0; i < sprites.Length; i++) - { - if (sprites[i].name == spriteName) - { - skillIcon.sprite = sprites[i]; - break; - } - }*/ - StringBuilder skillDsc; int reqLevel; int reqRealmLevel; @@ -222,30 +216,32 @@ namespace BrewMonster reqLevel = ElementSkill.GetRequiredLevel((uint)m_skillID, m_curLevel); reqRealmLevel = ElementSkill.GetRequiredRealmLevel((uint)m_skillID, m_curLevel); } + + if (skillDsc == null) + { + BMLogger.LogError($"[SkillSubList] UpdateSkill skill description null skillId={skillID}"); + return; + } + if (reqLevel == 0) { reqLevel = 1; } - skillDsc.AppendLine(GPDataTypeHelper.ReplacePercentD(GetStringFromTable(11328), reqLevel)); + skillDsc.AppendLine(GPDataTypeHelper.ReplacePercentD(GetTableString(uiMan, 11328), reqLevel)); if (reqRealmLevel != 0) { - skillDsc.AppendLine(GetStringFromTable(11401)); - skillDsc.AppendLine(GetGameUIMan().GetRealmName(reqRealmLevel)); + skillDsc.AppendLine(GetTableString(uiMan, 11401)); + skillDsc.AppendLine(uiMan.GetRealmName(reqRealmLevel)); } var str = EC_Utility.FormatForTextMeshPro(skillDsc.ToString()); - // Store hint for tooltip display when clicking skill icon m_skillIconImgPic.SetHint(str); string skillName = model.GetSkillName(m_skillID); - /* if (model.IsPassiveSkill(m_skillID)) - { - skillName += ACString(GetStringFromTable(11322)); - }*/ name = "Item_" + m_skillID; - m_skillNameLbl.text = skillName; + m_skillNameLbl.text = skillName ?? string.Empty; - UpdateUpgradeBtn(); + UpdateUpgradeBtn(uiMan); if (enumSkillLearnedState.SKILL_NOT_LEARNED == learnedState) { @@ -254,12 +250,29 @@ namespace BrewMonster else { skillLevel.gameObject.SetActive(true); - skillLevel.text = GetStringFromTable(11323).Replace("%d", m_curLevel.ToString()); + skillLevel.text = GetTableString(uiMan, 11323).Replace("%d", m_curLevel.ToString()); } } - private void UpdateUpgradeBtn() + static string GetTableString(CECGameUIMan uiMan, int id) { + if (uiMan == null) + { + return string.Empty; + } + + return uiMan.GetStringFromAuiDialogTable(id) ?? uiMan.GetStringFromTable(id) ?? string.Empty; + } + + private void UpdateUpgradeBtn(CECGameUIMan uiMan = null) + { + uiMan ??= CECUIManager.Instance?.GetInGameUIMan(); + if (m_upgradeBtn == null) + { + BMLogger.LogError($"[SkillSubList] UpdateUpgradeBtn m_upgradeBtn null skillId={m_skillID}"); + return; + } + CECHostSkillModel model = CECHostSkillModel.Instance; enumSkillFitLevelState fitLevel = model.GetSkillFitLevel(m_skillID); enumSkillLearnedState learnedState = model.GetSkillLearnedState(m_skillID); @@ -270,14 +283,20 @@ namespace BrewMonster (requiredItem == 0 || model.CheckPreItem(requiredItem))) { m_upgradeBtn.gameObject.SetActive(true); - string str; if (model.IsSkillServedByNPC(m_skillID)) { int needSp = model.GetSkillSp(m_skillID, m_curLevel + 1); int needMoney = model.GetSkillMoney(m_skillID, m_curLevel + 1); - int curSp = GetHostPlayer().GetBasicProps().iSP; - uint curMoney = GetHostPlayer().GetMoneyAmount(); + CECHostPlayer host = GetHostPlayer(); + if (host == null) + { + m_upgradeBtn.gameObject.SetActive(false); + return; + } + + int curSp = host.GetBasicProps().iSP; + uint curMoney = host.GetMoneyAmount(); bool spOK = curSp >= needSp; bool moneyOK = curMoney >= needMoney; @@ -295,7 +314,7 @@ namespace BrewMonster } } } - //if (m_skillID == 234) + if (spOK && moneyOK && preSkillOK) { m_upgradeDisabledReason = null; @@ -306,25 +325,27 @@ namespace BrewMonster if (!spOK) { - string strSp = GPDataTypeHelper.ReplacePercentD(GetStringFromTable(11402), needSp); + string strSp = GPDataTypeHelper.ReplacePercentD(GetTableString(uiMan, 11402), needSp); sb.AppendLine(l_colorRed + strSp + l_colorClose); } if (!moneyOK) { - string strMoney = GPDataTypeHelper.ReplacePercentD(GetStringFromTable(11403), needMoney); + string strMoney = GPDataTypeHelper.ReplacePercentD(GetTableString(uiMan, 11403), needMoney); sb.AppendLine(l_colorRed + strMoney + l_colorClose); } if (!preSkillOK) - sb.AppendLine(GetStringFromTable(11404)); + { + sb.AppendLine(GetTableString(uiMan, 11404)); + } m_upgradeDisabledReason = sb.ToString().TrimEnd(); } } else { - m_upgradeDisabledReason = GetStringFromTable(11321); + m_upgradeDisabledReason = GetTableString(uiMan, 11321); } } else diff --git a/ProjectSettings/ScriptableBuildPipeline.json b/ProjectSettings/ScriptableBuildPipeline.json index dfa4f083cf..551b978e8e 100644 --- a/ProjectSettings/ScriptableBuildPipeline.json +++ b/ProjectSettings/ScriptableBuildPipeline.json @@ -5,7 +5,7 @@ "threadedArchiving": true, "logCacheMiss": false, "logAssetWarnings": true, - "slimWriteResults": true, + "slimWriteResults": false, "maximumCacheSize": 20, "useDetailedBuildLog": false, "useV2Hasher": true, diff --git a/ProjectSettings/VisualScriptingSettings.asset b/ProjectSettings/VisualScriptingSettings.asset index a0c0824c08..fc319fdade 100644 --- a/ProjectSettings/VisualScriptingSettings.asset +++ b/ProjectSettings/VisualScriptingSettings.asset @@ -14,7 +14,7 @@ MonoBehaviour: m_EditorClassIdentifier: _data: _json: '{"dictionary":{"aotSafeMode":{"$content":true,"$type":"System.Boolean"},"favoriteMembers":{"$content":[],"$type":"System.Collections.Generic.HashSet`1[[Unity.VisualScripting.Member, - Unity.VisualScripting.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"LinkerPropertyProviderSettings":{"$content":[true,true,true],"$type":"System.Collections.Generic.List`1[[System.Boolean, + Unity.VisualScripting.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"LinkerPropertyProviderSettings":{"$content":[false,false,false],"$type":"System.Collections.Generic.List`1[[System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"assemblyOptions":{"$content":["mscorlib","Assembly-CSharp-firstpass","Assembly-CSharp","UnityEngine","UnityEngine.CoreModule","UnityEngine.InputModule","UnityEngine.ClusterInputModule","UnityEngine.InputLegacyModule","UnityEngine.PhysicsModule","UnityEngine.Physics2DModule","UnityEngine.TerrainPhysicsModule","UnityEngine.VehiclesModule","UnityEngine.AudioModule","UnityEngine.AnimationModule","UnityEngine.VideoModule","UnityEngine.DirectorModule","UnityEngine.Timeline","UnityEngine.ParticleSystemModule","UnityEngine.ParticlesLegacyModule","UnityEngine.WindModule","UnityEngine.ClothModule","UnityEngine.TilemapModule","UnityEngine.SpriteMaskModule","UnityEngine.TerrainModule","UnityEngine.ImageConversionModule","UnityEngine.TextRenderingModule","UnityEngine.ClusterRendererModule","UnityEngine.ScreenCaptureModule","UnityEngine.AIModule","UnityEngine.UI","UnityEngine.UIModule","UnityEngine.IMGUIModule","UnityEngine.UIElementsModule","UnityEngine.StyleSheetsModule","UnityEngine.VR","UnityEngine.VRModule","UnityEngine.ARModule","UnityEngine.HoloLens","UnityEngine.SpatialTracking","UnityEngine.GoogleAudioSpatializer","UnityEngine.Networking","UnityEngine.Analytics","UnityEngine.Advertisements","UnityEngine.Purchasing","UnityEngine.UnityConnectModule","UnityEngine.UnityAnalyticsModule","UnityEngine.GameCenterModule","UnityEngine.AccessibilityModule","UnityEngine.AndroidJNIModule","UnityEngine.AssetBundleModule","UnityEngine.FileSystemHttpModule","UnityEngine.JSONSerializeModule","UnityEngine.UmbraModule","Unity.Timeline","Unity.Timeline.Editor","Cinemachine","com.unity.cinemachine.editor","Unity.InputSystem","Unity.TextMeshPro","Unity.VisualScripting.Core","Unity.VisualScripting.Flow","Unity.VisualScripting.State"],"$type":"System.Collections.Generic.List`1[[Unity.VisualScripting.LooseAssemblyName, Unity.VisualScripting.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"typeOptions":{"$content":["System.Object","System.Boolean","System.Int32","System.Single","System.String","UnityEngine.Vector2","UnityEngine.Vector3","UnityEngine.Vector4","UnityEngine.Quaternion","UnityEngine.Matrix4x4","UnityEngine.Rect","UnityEngine.Bounds","UnityEngine.Color","UnityEngine.AnimationCurve","UnityEngine.LayerMask","UnityEngine.Ray","UnityEngine.Ray2D","UnityEngine.RaycastHit","UnityEngine.RaycastHit2D","UnityEngine.ContactPoint","UnityEngine.ContactPoint2D","UnityEngine.ParticleCollisionEvent","UnityEngine.SceneManagement.Scene","UnityEngine.Application","UnityEngine.Resources","UnityEngine.Mathf","UnityEngine.Debug","UnityEngine.Input","UnityEngine.Touch","UnityEngine.Screen","UnityEngine.Cursor","UnityEngine.Time","UnityEngine.Random","UnityEngine.Physics","UnityEngine.Physics2D","UnityEngine.SceneManagement.SceneManager","UnityEngine.GUI","UnityEngine.GUILayout","UnityEngine.GUIUtility","UnityEngine.Audio.AudioMixerGroup","UnityEngine.AI.NavMesh","UnityEngine.Gizmos","UnityEngine.AnimatorStateInfo","UnityEngine.EventSystems.BaseEventData","UnityEngine.EventSystems.PointerEventData","UnityEngine.EventSystems.AxisEventData","System.Collections.IList","System.Collections.IDictionary","Unity.VisualScripting.AotList","Unity.VisualScripting.AotDictionary","System.Exception"],"$type":"System.Collections.Generic.List`1[[System.Type, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"projectSetupCompleted":{"$content":false,"$type":"System.Boolean"},"savedVersion":{"major":1,"minor":9,"patch":8,"label":null,"increment":0,"$type":"Unity.VisualScripting.SemanticVersion"}}}' From 263f7bfbc3550aab1a291425f941873be440d4c1 Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sun, 31 May 2026 17:14:44 +0700 Subject: [PATCH 07/10] fix lable rank --- .../Scripts/Skills/EC_HostSkillModel.cs | 17 +----- Assets/PerfectWorld/Scripts/UI/AUIManager.cs | 15 ++--- .../Scripts/UI/Dialogs/CDlgSkillSubList.cs | 58 +------------------ .../GamePlay/SkillUI/CDlgSkillSubListItem.cs | 6 -- 4 files changed, 10 insertions(+), 86 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs index 1da0d8f674..f9975427fe 100644 --- a/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs +++ b/Assets/PerfectWorld/Scripts/Skills/EC_HostSkillModel.cs @@ -202,10 +202,6 @@ namespace BrewMonster.Scripts.Skills m_bInitialized = true; - // #region agent log - BMLogger.LogError($"[SkillSubList][H-A] CECHostSkillModel.Initialize prof={professionOverride ?? (CECGameRun.Instance?.GetHostPlayer()?.GetProfession() ?? -1)} profSkills={m_allProfSkills.Count} rankBuckets={m_allRankProfSkills.Count} hostNull={CECGameRun.Instance?.GetHostPlayer() == null}"); - // #endregion - // ÖØÐ´¦ÀíNPCLIST ProcessServiceList(); } @@ -565,9 +561,6 @@ namespace BrewMonster.Scripts.Skills public void InitAllSkillsOfCurProf(int? professionOverride) { - int npcSkillsCount = 0; - int matchedSkillsCount = 0; - int playerProfession = -1; // --- B1: Thu thập toàn bộ skill từ các NPC có cung cấp dịch vụ học skill --- HashSet npcSkills = new HashSet(); { @@ -598,9 +591,8 @@ namespace BrewMonster.Scripts.Skills } } - npcSkillsCount = npcSkills.Count; - var hostPlayer = CECGameRun.Instance?.GetHostPlayer(); - playerProfession = professionOverride ?? (hostPlayer != null ? hostPlayer.GetProfession() : -1); + var hostPlayer = TryGetHostPlayer(); + int playerProfession = professionOverride ?? (hostPlayer != null ? hostPlayer.GetProfession() : -1); // --- B2: Duyệt tất cả skill, lọc skill theo class hiện tại của người chơi --- uint curID = 0; @@ -615,7 +607,6 @@ namespace BrewMonster.Scripts.Skills if (isSameClass && isProvidedByNPC) { - matchedSkillsCount++; m_allProfSkills[(int)curID] = pSkill; if (!m_allRankProfSkills.ContainsKey(pSkill.GetRank())) m_allRankProfSkills[pSkill.GetRank()] = new List(); @@ -623,10 +614,6 @@ namespace BrewMonster.Scripts.Skills } } - // #region agent log - BMLogger.LogError($"[SkillSubList][H-B] InitAllSkillsOfCurProf npcSkills={npcSkillsCount} matched={matchedSkillsCount} profSkills={m_allProfSkills.Count} rankBuckets={m_allRankProfSkills.Count} profession={playerProfession} hostNull={hostPlayer == null}"); - // #endregion - foreach (var kvp in m_allRankProfSkills) { kvp.Value.Sort((lhs, rhs) => diff --git a/Assets/PerfectWorld/Scripts/UI/AUIManager.cs b/Assets/PerfectWorld/Scripts/UI/AUIManager.cs index 9bdf1fbf89..05d8d10d6b 100644 --- a/Assets/PerfectWorld/Scripts/UI/AUIManager.cs +++ b/Assets/PerfectWorld/Scripts/UI/AUIManager.cs @@ -44,8 +44,8 @@ namespace BrewMonster.UI ImportStringTable("Assets/Addressable/ingame.txt"); ImportAuiDialogStringTable("Assets/Addressable/msgbox.txt"); ImportStringBadWords("Assets/Addressable/badwords.txt"); - } - + } + public string Translate(ushort[] str) { if (str == null || str.Length == 0) @@ -283,26 +283,23 @@ namespace BrewMonster.UI { try { - // Wait for GameContentBootstrap gate + URL rewrite, then single shared init. - AddressablesInitService.EnsureInitializedBlocking(); - // Load using Addressables directly with WaitForCompletion (Unity-safe, won't deadlock) // This matches the pattern used in EC_Game.cs var handle = Addressables.LoadAssetAsync(key); var textAsset = handle.WaitForCompletion(); - + if (handle.Status == AsyncOperationStatus.Succeeded && textAsset != null) { // Keep the handle valid; string tables are used for the whole session // Note: We don't release the handle here to keep the asset loaded return textAsset; } - + if (handle.IsValid()) { Addressables.Release(handle); } - + BMLogger.LogError($"[AUIManager] Failed to load TextAsset for key='{key}'"); return null; } @@ -347,7 +344,7 @@ namespace BrewMonster.UI BMLogger.LogError($"[AUIManager] Không tìm thấy prefab dialog '{pszName}'. Add id+prefab to DialogScriptTableObject (Resources/UI/DialogScriptTableObject.asset)."); } } - + return null; } public bool IsDialogShow(string pszName) diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs index 3cc4f00152..37fc84408e 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs @@ -1,7 +1,6 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Linq; using BrewMonster; using BrewMonster.Scripts.Skills; using TMPro; @@ -29,7 +28,7 @@ namespace BrewMonster.UI private readonly Dictionary m_rankSubDialogs = new(); private readonly List m_skillSubDialogs = new(); - private readonly Dictionary m_skillSubDialogsMap = new(); + private Dictionary m_skillSubDialogsMap = new(); private int m_skillSubCount; // 当前显示的技能数量 / Current shown skill count private float m_curBottom; // 当前底部位置 / Current bottom position @@ -88,14 +87,11 @@ namespace BrewMonster.UI if (GetHostPlayer() == null) { - BMLogger.LogError("[SkillSubList] ResetDialog skipped: host player still null"); yield break; } - var uiMan = CECUIManager.Instance?.GetInGameUIMan(); - if (uiMan == null) + if (CECUIManager.Instance?.GetInGameUIMan() == null) { - BMLogger.LogError("[SkillSubList] ResetDialog skipped: InGameUIMan null"); yield break; } @@ -138,9 +134,6 @@ namespace BrewMonster.UI { if (m_bAllocRankDlgs || m_pSubRank == null || m_contentRoot == null) { - // #region agent log - BMLogger.LogError($"[SkillSubList][H-E] InitRankDlgs skipped reason={(m_bAllocRankDlgs ? "already_alloc" : (m_pSubRank == null ? "no_sub_rank" : "no_content_root"))} allocRank={m_bAllocRankDlgs} subSkill={m_pSubSkill != null} contentRoot={m_contentRoot != null}"); - // #endregion return; } m_bAllocRankDlgs = true; @@ -171,7 +164,6 @@ namespace BrewMonster.UI // ��ʼ�����������ڶԻ���һ���Է�����ڴ� / Initialize rank sub-dialogs once to avoid realloc private void CreateOneRankDlg(CECTaoistRank taoistRank) { - BMLogger.LogError("HoangDev: CreateOneRankDlg"); AUISubDialog pSubRank = Instantiate(m_pSubRank, m_contentRoot, transform); pSubRank.SetName($"{m_pSubRank.GetName()}{taoistRank.GetID()}"); pSubRank.Show(false); @@ -197,14 +189,6 @@ namespace BrewMonster.UI skill.Show(false); } - var skillModel = CECHostSkillModel.Instance; - IReadOnlyDictionary> allRankProfSkills = skillModel?.GetAllRankProfSkills(); - - // #region agent log - int totalCatalogSkills = allRankProfSkills != null ? allRankProfSkills.Values.Sum(l => l?.Count ?? 0) : -1; - BMLogger.LogError($"[SkillSubList][H-A] ResetDialog start modelNull={skillModel == null} rankBuckets={allRankProfSkills?.Count ?? -1} catalogSkills={totalCatalogSkills} isEvil={IsEvil()} allocRank={m_bAllocRankDlgs} subSkillTpl={m_pSubSkill != null} contentRoot={m_contentRoot != null} hostNull={GetHostPlayer() == null}"); - // #endregion - for (CECTaoistRank taoistRank = CECTaoistRank.GetBaseRankBegin(); taoistRank != CECTaoistRank.GetBaseRankEnd(); taoistRank = taoistRank.GetNext()) @@ -235,10 +219,6 @@ namespace BrewMonster.UI ShowLastSelectedSkill(); } UpdateTotalSPText(); - - // #region agent log - BMLogger.LogError($"[SkillSubList][H-E] ResetDialog end shownSkills={m_skillSubCount} rankBuckets={allRankProfSkills?.Count ?? -1} isEvil={IsEvil()} allocRank={m_bAllocRankDlgs}"); - // #endregion } public void UpdateTotalSPText() @@ -263,23 +243,17 @@ namespace BrewMonster.UI { if (!m_skillSubDialogsMap.TryGetValue(skillID, out var pSub)) { - BMLogger.LogError($"[SkillSubList] UpdateOneSubDlg missing map entry skillId={skillID}"); return; } CDlgSkillSubListItem subListItem = pSub; if (subListItem == null) { - BMLogger.LogError($"[SkillSubList] UpdateOneSubDlg subListItem null skillId={skillID} poolCount={m_skillSubDialogs.Count} shown={m_skillSubCount}"); return; } - BMLogger.LogError("HoangDEv subListItem before update "); subListItem.UpdateSkill(skillID); - BMLogger.LogError("HoangDEv subListItem after update "); - subListItem.Show(true); - BMLogger.LogError("HoangDEv subListItem true"); if (GetSelectedSkillID() == skillID) { //GetGameUIMan()->m_pDlgSkillAction->ShowSkillTree(skillID); @@ -307,7 +281,6 @@ namespace BrewMonster.UI { if (m_pSubSkill == null || m_contentRoot == null) { - BMLogger.LogError($"[SkillSubList] AddSkillSubDlg aborted skillId={skillID} subSkillTpl={m_pSubSkill != null} contentRoot={m_contentRoot != null}"); return; } @@ -338,7 +311,6 @@ namespace BrewMonster.UI if (!m_rankSubDialogs.TryGetValue(rankID, out AUISubDialog rankSub) || rankSub == null) { - BMLogger.LogError($"[SkillSubList] rank dialog missing rankId={rankID} allocRank={m_bAllocRankDlgs} rankDialogs={m_rankSubDialogs.Count}"); if (!m_bAllocRankDlgs) { InitRankDlgs(); @@ -346,7 +318,6 @@ namespace BrewMonster.UI if (!m_rankSubDialogs.TryGetValue(rankID, out rankSub) || rankSub == null) { - BMLogger.LogError($"[SkillSubList] cannot instantiate skill item skillId={skillID} rankId={rankID}"); return null; } } @@ -354,7 +325,6 @@ namespace BrewMonster.UI CDlgSkillSubListItem created = Instantiate(m_pSubSkill, rankSub.transform); if (created == null) { - BMLogger.LogError($"[SkillSubList] Instantiate returned null skillId={skillID} rankId={rankID} template={m_pSubSkill.name}"); return null; } @@ -365,7 +335,6 @@ namespace BrewMonster.UI // ��ijһ�����漶���Ӧ�����м���������Ի��� / Add dialogs for one rank private void AddDlgsOfOneRank(CECTaoistRank taoistRank) { - BMLogger.LogError("HoangDev: AddDlgsOfOneRank(CECTaoistRank taoistRank)"); CECHostSkillModel model = CECHostSkillModel.Instance; IReadOnlyDictionary> allRankProfSkills = model.GetAllRankProfSkills(); @@ -373,43 +342,27 @@ namespace BrewMonster.UI if (allRankProfSkills == null) { - // #region agent log - BMLogger.LogError($"[SkillSubList][H-A] AddDlgsOfOneRank skip reason=allRankProfSkills_null rankId={rankID}"); - // #endregion return; } if (IsEvil() && taoistRank.IsGodRank()) { - // #region agent log - BMLogger.LogError($"[SkillSubList][H-C] AddDlgsOfOneRank skip reason=evil_hides_god rankId={rankID}"); - // #endregion return; } else if (!IsEvil() && taoistRank.IsEvilRank()) { - // #region agent log - BMLogger.LogError($"[SkillSubList][H-C] AddDlgsOfOneRank skip reason=non_evil_hides_evil rankId={rankID}"); - // #endregion return; } - if (!allRankProfSkills.TryGetValue(rankID, out var rankItr) || rankItr == null || rankItr.Count == 0) { - // #region agent log - BMLogger.LogError($"[SkillSubList][H-A] AddDlgsOfOneRank skip reason=rank_empty rankId={rankID}"); - // #endregion return; } List rankSkills = new List(); - int overriddenSkipped = 0; foreach (var skillID in rankItr) { if (ElementSkill.IsOverridden((uint)skillID)) { - overriddenSkipped++; - BMLogger.LogError($"[SkillSubList][H-D] skill overridden skillId={skillID} rankId={rankID}"); continue; } /* bool bOnlyShowSkillCanLearn = GetGameUIMan()->m_pDlgSkillAction->IsOnlyShowSkillCanLearn(); @@ -430,16 +383,9 @@ namespace BrewMonster.UI } if (rankSkills.Count == 0) { - // #region agent log - BMLogger.LogError($"[SkillSubList][H-D] AddDlgsOfOneRank skip reason=all_overridden rankId={rankID} raw={rankItr.Count} overriddenSkipped={overriddenSkipped}"); - // #endregion return; } - // #region agent log - BMLogger.LogError($"[SkillSubList][H-E] AddDlgsOfOneRank adding rankId={rankID} raw={rankItr.Count} shown={rankSkills.Count} overriddenSkipped={overriddenSkipped} isEvil={IsEvil()}"); - // #endregion - AddRankSubDig(rankID); rankSkills.Sort(); foreach (int skillID in rankSkills) diff --git a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs index d36188ffc4..ce99534d93 100644 --- a/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs +++ b/Assets/PerfectWorld/Scripts/UI/GamePlay/SkillUI/CDlgSkillSubListItem.cs @@ -167,23 +167,19 @@ namespace BrewMonster public void UpdateSkill(int skillID) { - BMLogger.LogError("HoangDev: UpdateSkill skillID:" + skillID); if (m_skillIconImgPic == null || m_skillNameLbl == null || skillLevel == null) { - BMLogger.LogError($"[SkillSubList] UpdateSkill missing refs skillId={skillID} icon={m_skillIconImgPic != null} nameLbl={m_skillNameLbl != null} levelLbl={skillLevel != null} go={name}"); return; } var uiMan = CECUIManager.Instance?.GetInGameUIMan(); if (uiMan == null) { - BMLogger.LogError($"[SkillSubList] UpdateSkill InGameUIMan null skillId={skillID}"); return; } if (GetHostPlayer() == null) { - BMLogger.LogError($"[SkillSubList] UpdateSkill host player null skillId={skillID}"); return; } @@ -219,7 +215,6 @@ namespace BrewMonster if (skillDsc == null) { - BMLogger.LogError($"[SkillSubList] UpdateSkill skill description null skillId={skillID}"); return; } @@ -269,7 +264,6 @@ namespace BrewMonster uiMan ??= CECUIManager.Instance?.GetInGameUIMan(); if (m_upgradeBtn == null) { - BMLogger.LogError($"[SkillSubList] UpdateUpgradeBtn m_upgradeBtn null skillId={m_skillID}"); return; } From 1ae540c872d7b573818cfc69aeeb56d810e55f36 Mon Sep 17 00:00:00 2001 From: NguyenVanDat Date: Sun, 31 May 2026 17:16:38 +0700 Subject: [PATCH 08/10] fix init list --- .../AddressableAssetSettings.asset | 2 +- .../Scripts/UI/Dialogs/CDlgSkillSubList.cs | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset index bd80e9cca7..049dac9a74 100644 --- a/Assets/AddressableAssetsData/AddressableAssetSettings.asset +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset @@ -58,7 +58,7 @@ MonoBehaviour: m_ContentStateBuildPathProfileVariableName: m_CustomContentStateBuildPath: m_ContentStateBuildPath: - m_BuildAddressablesWithPlayerBuild: 0 + m_BuildAddressablesWithPlayerBuild: 2 m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]' m_GroupAssets: - {fileID: 11400000, guid: c99cbfd356e4d487b8da3554688ea241, type: 2} diff --git a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs index 3cc4f00152..b69a271e71 100644 --- a/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs +++ b/Assets/PerfectWorld/Scripts/UI/Dialogs/CDlgSkillSubList.cs @@ -27,9 +27,9 @@ namespace BrewMonster.UI [Header("State")] [SerializeField] private bool m_isEvil; - private readonly Dictionary m_rankSubDialogs = new(); - private readonly List m_skillSubDialogs = new(); - private readonly Dictionary m_skillSubDialogsMap = new(); + private Dictionary m_rankSubDialogs ; + private List m_skillSubDialogs ; + private Dictionary m_skillSubDialogsMap ; private int m_skillSubCount; // 当前显示的技能数量 / Current shown skill count private float m_curBottom; // 当前底部位置 / Current bottom position @@ -49,6 +49,9 @@ namespace BrewMonster.UI { m_contentRoot = transform as RectTransform; } + m_skillSubDialogsMap = new Dictionary(); + m_skillSubDialogs = new List(); + m_rankSubDialogs = new Dictionary(); EventBus.Subscribe(OnModelChange); CacheTemplateInfo(); HideTemplates(); @@ -274,9 +277,10 @@ namespace BrewMonster.UI return; } BMLogger.LogError("HoangDEv subListItem before update "); + BMLogger.LogError("HoangDEv subListItem before2 update "+ subListItem); subListItem.UpdateSkill(skillID); - BMLogger.LogError("HoangDEv subListItem after update "); + BMLogger.LogError("HoangDEv subListItem after update " + subListItem); subListItem.Show(true); BMLogger.LogError("HoangDEv subListItem true"); From 0d18d36fbb51852cdda6147a220c736ebb037351 Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sun, 31 May 2026 17:59:52 +0700 Subject: [PATCH 09/10] remove log --- Assets/PerfectWorld/Scripts/Managers/CECAttacksMan.cs | 1 - Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs | 1 - Assets/PerfectWorld/Scripts/Move/CECPlayer.cs | 3 --- .../PerfectWorld/Scripts/Players/CECPlayerActionController.cs | 1 - 4 files changed, 6 deletions(-) diff --git a/Assets/PerfectWorld/Scripts/Managers/CECAttacksMan.cs b/Assets/PerfectWorld/Scripts/Managers/CECAttacksMan.cs index f410a75352..3c59eeeed7 100644 --- a/Assets/PerfectWorld/Scripts/Managers/CECAttacksMan.cs +++ b/Assets/PerfectWorld/Scripts/Managers/CECAttacksMan.cs @@ -401,7 +401,6 @@ namespace BrewMonster 200, // timeToBeFired 1000 // timeToDoDamage ); - BMLogger.LogError("HoangDev: idTarget:" + idTarget); m_targets.AddLast(newEvent); #if UNITY_EDITOR if (m_AttackList.Count == 0) diff --git a/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs b/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs index 7942b3f018..d91f075567 100644 --- a/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs +++ b/Assets/PerfectWorld/Scripts/ModelFiles/CECTaoistRank.cs @@ -140,7 +140,6 @@ namespace BrewMonster s_allTaoistRanks[i] = new CECTaoistRank(); } s_allTaoistRanks[i].m_id = TaoistRankIDs[i]; - BMLogger.LogError("HoangDev: CECUIManager.Instance.GetInGameUIMan() " + CECUIManager.Instance.GetInGameUIMan()); s_allTaoistRanks[i].m_name = CECUIManager.Instance.GetInGameUIMan().GetStringFromTable(1001 + s_allTaoistRanks[i].m_id); if (i != (int)ToaistRank.BaseRankCount - 1 && i != (int)ToaistRank.BaseRankCount + (int)ToaistRank.GodRankCount - 1 && diff --git a/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs b/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs index fc16307e4c..bf766aac63 100644 --- a/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs +++ b/Assets/PerfectWorld/Scripts/Move/CECPlayer.cs @@ -957,7 +957,6 @@ namespace BrewMonster continue; string strGFXFile = szBasePath + strEffect; - BMLogger.LogError("HoangDevGFXSTATE: strGFXFile: " +strGFXFile); // [中文] TestProcessPetCureGFX — 宠愈 GFX 系统尚未移植,跳过(等价于始终返回 false) // [English] TestProcessPetCureGFX — pet-cure GFX system not ported yet; skip (equivalent to always false) // if (TestProcessPetCureGFX(strGFXFile, dwFlag2 != 0, i + idState * bitSize)) continue; @@ -2607,9 +2606,7 @@ namespace BrewMonster if (GetMoveEnv() == (int)MoveEnvironment.MOVEENV_GROUND) { riseName = EC_Utility.BuildActionName(data, weapon_type, "_施放起_"); - Debug.Log("HoangDev: riseName: " + riseName); fallName = EC_Utility.BuildActionName(data, weapon_type, "_施放落_"); - Debug.Log("HoangDev: fallName: " + fallName); } else { diff --git a/Assets/PerfectWorld/Scripts/Players/CECPlayerActionController.cs b/Assets/PerfectWorld/Scripts/Players/CECPlayerActionController.cs index ab0281b1db..a8e8ea8c59 100644 --- a/Assets/PerfectWorld/Scripts/Players/CECPlayerActionController.cs +++ b/Assets/PerfectWorld/Scripts/Players/CECPlayerActionController.cs @@ -115,7 +115,6 @@ namespace BrewMonster public bool PlaySkillAttackActionWithName(int idSkill, string szActName, bool bNoFX = false, CECAttackEvent attackEvent = null, uint dwFlagMode = 0) { - BMLogger.LogError("HoangDev PlaySkillAttackActionWithName:"+szActName); bool? pActFlag = null; if (m_actionPlayPolicy != null && m_actionPlayPolicy.PlaySkillAttackActionWithName(idSkill, szActName, bNoFX, attackEvent, dwFlagMode)) From 40849047b58a0330527ebdac497e0a1bde07c300 Mon Sep 17 00:00:00 2001 From: vuong dinh hoang Date: Sun, 31 May 2026 18:00:32 +0700 Subject: [PATCH 10/10] disable log --- Assets/Scripts/EC_GameRun.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/EC_GameRun.cs b/Assets/Scripts/EC_GameRun.cs index 5d60cf1ef9..5e1471f369 100644 --- a/Assets/Scripts/EC_GameRun.cs +++ b/Assets/Scripts/EC_GameRun.cs @@ -95,7 +95,7 @@ public partial class CECGameRun : ITickable public void Init() { #if !UNITY_EDITOR - // Debug.unityLogger.logEnabled = false; + Debug.unityLogger.logEnabled = false; QualitySettings.vSyncCount = 0; Application.targetFrameRate = 30; #endif