adjust skill find the issue cause logic handle remove gfx faild

This commit is contained in:
VDH
2026-03-17 10:24:30 +07:00
parent 31176c1ad6
commit 0f55a32f97
5 changed files with 20 additions and 702 deletions
@@ -124,3 +124,5 @@ namespace BrewMonster.Scripts
}
}
}
/// d 2000 la kn
/// d 1988 + so tien
@@ -426,8 +426,8 @@ namespace BrewMonster
// 这与C++逻辑匹配:当投射物击中地面(无目标)时使用m_szHitGrndGfx
bool bTargetExists = m_bTargetExist && m_nTargetID != 0;
GameObject prefab = bTargetExists ? m_pComposer.GetHitGFX() : m_pComposer.GetHitGrdGFX();
BMLogger.LogError("bTargetExists : " + bTargetExists);
BMLogger.LogError("HitGfx : " + m_pComposer.hitGfxName);
//BMLogger.LogError("bTargetExists : " + bTargetExists);
//BMLogger.LogError("HitGfx : " + m_pComposer.hitGfxName);
if (prefab == null)
{
@@ -460,14 +460,14 @@ namespace BrewMonster
if (m_bTraceTarget)
{
SkillGfxMan.InstanceSub?.AddTraceTargetGfx(m_hitGfxInstance, 0); // Skill ID not available, use 0
BMLogger.Log($"[TRACE_TARGET_GFX] SpawnHitGfx: Added hit GFX to trace target list (m_bTraceTarget=true)");
//BMLogger.Log($"[TRACE_TARGET_GFX] SpawnHitGfx: Added hit GFX to trace target list (m_bTraceTarget=true)");
}
else
{
// Destroy hit GFX after 5 seconds (unless m_bTraceTarget is true, then it follows target until destroyed)
// 5秒后销毁命中特效(除非m_bTraceTarget为true,否则它会跟随目标直到被销毁)
//HIT_GFX_MAX_TIMESPAN 5000
BMLogger.Log($"[TRACE_TARGET_GFX] SpawnHitGfx: GameObject.Destroy(m_hitGfxInstance, 5.0f);");
//BMLogger.Log($"[TRACE_TARGET_GFX] SpawnHitGfx: GameObject.Destroy(m_hitGfxInstance, 5.0f);");
GameObject.Destroy(m_hitGfxInstance, 5.0f);
}
}
@@ -120,7 +120,6 @@ namespace BrewMonster
m_AttFlyMode = (GfxAttackMode)0;
m_AttHitMode = (GfxAttackMode)0;
m_dwFlyTime = 200;
m_bTraceTarget = true;
m_FlyClusterCount = 1;
m_FlyClusterInterval = 0;
m_HitClusterCount = 1;
+5 -5
View File
@@ -1112,19 +1112,19 @@ namespace BrewMonster
float fSkillRange = m_pPrepSkill.GetCastRange(m_ExtProps.ak.AttackRange, GetPrayDistancePlus());
bool bCanTouch = CanTouchTarget(vTargetPos, cECNPC.GetTouchRadius(), 2); // 2 = skill
BMLogger.Log($"[DISTANCE_DEBUG] CastSkill: Before sending c2s_CmdCastSkill (regular), skillID={prepSkillID}, " +
/* BMLogger.Log($"[DISTANCE_DEBUG] CastSkill: Before sending c2s_CmdCastSkill (regular), skillID={prepSkillID}, " +
$"hostPos=({vHostPos.x:F2}, {vHostPos.y:F2}, {vHostPos.z:F2}), " +
$"targetPos=({vTargetPos.x:F2}, {vTargetPos.y:F2}, {vTargetPos.z:F2}), " +
$"distance={fDistance:F2}, skillRange={fSkillRange:F2}, " +
$"targetRadius={cECNPC.GetTouchRadius():F2}, CanTouch={bCanTouch}, " +
$"target={idTarget}, byPVPMask={byPVPMask2}");
$"target={idTarget}, byPVPMask={byPVPMask2}");*/
}
else
/* else
{
BMLogger.Log($"[DISTANCE_DEBUG] CastSkill: Before sending c2s_CmdCastSkill (regular), skillID={prepSkillID}, " +
$"hostPos=({vHostPos.x:F2}, {vHostPos.y:F2}, {vHostPos.z:F2}), " +
$"target={idTarget} (target object is null), byPVPMask={byPVPMask2}");
}
}*/
// Debug.Log($"[SKILL_CAST_DEBUG] CastSkill: Sending c2s_CmdCastSkill (regular), skillID={prepSkillID}, " +
// $"target={idTarget}, count={targets}, byPVPMask={byPVPMask2}");
@@ -1924,4 +1924,4 @@ namespace BrewMonster
#endif
}
}
}
File diff suppressed because one or more lines are too long