yyl
2026-04-24 64d526e0f5b9f49fe5bd6dcf043f5071d996e7ad
Main/System/Battle/Skill/SkillBase.Finish.cs
@@ -190,6 +190,22 @@
        if (caster is HeroBattleObject hbo && hbo.motionBase != null)
        {
            casterAnim = $"  caster.motionBase: playingSkillWithAnim={hbo.motionBase.PlayingSkillWithAnimForDebug}";
            //  [卡死诊断] 当 playingSkillWithAnim=true 但本 skillBase 还没 OnSkillStart,
            //  一次性把 MotionBase 的现场也 dump 出来:锁是谁加的 + 活跃轨道列表 + 加锁时的调用栈。
            //  这样 SkillBase 的 120 帧卡死报告就能直接定位到 MotionBase 侧的 owner skill。
            if (hbo.motionBase.PlayingSkillWithAnimForDebug)
            {
                int ownerSid = hbo.motionBase.PlayingSkillAnimOwnerSkillIdForDebug;
                int ownerFrame = hbo.motionBase.PlayingSkillAnimOwnerFrameForDebug;
                int elapsed = ownerFrame > 0 ? (UnityEngine.Time.frameCount - ownerFrame) : -1;
                casterAnim += $"\n  MotionBase锁持有者: skillId={ownerSid} setFrame={ownerFrame} 已持有{elapsed}帧";
                casterAnim += $"\n  MotionBase现场: {hbo.motionBase.DumpActiveTracksForDebug()}";
                string ownerStack = hbo.motionBase.PlayingSkillAnimOwnerStackForDebug;
                if (!string.IsNullOrEmpty(ownerStack))
                {
                    casterAnim += $"\n  MotionBase锁加锁调用栈:\n{ownerStack}";
                }
            }
        }
        string skinInfo = $"  skillSkinConfig.SkillMotionName={(skillSkinConfig == null ? "null" : (string.IsNullOrEmpty(skillSkinConfig.SkillMotionName) ? "(空)" : skillSkinConfig.SkillMotionName))}";
        string skillEffectDump = skillEffect == null ? "  skillEffect=null" : $"  skillEffect: {skillEffect.DumpState()}";