Add projectile AoE distance probe logging for multi-player diagnosis
- Log each alive player's server position and distance to AoE center - Keep existing AoeImpact hit-count log for quick validation
This commit is contained in:
@@ -1044,9 +1044,13 @@ public partial class DungeonSimulation
|
||||
if (!Mobs.TryGetValue(projectile.SourceMobId, out var sourceMob)) return;
|
||||
|
||||
int hits = 0;
|
||||
var probe = new List<string>();
|
||||
foreach (var player in Players.Values.Where(p => p.IsAlive))
|
||||
{
|
||||
if (Distance(x, y, player.X, player.Y) <= projectile.AoeRadius)
|
||||
float distance = Distance(x, y, player.X, player.Y);
|
||||
probe.Add($"p{player.CharacterId}:d={distance:F1}@({player.X:F1},{player.Y:F1})");
|
||||
|
||||
if (distance <= projectile.AoeRadius)
|
||||
{
|
||||
var result = CombatCalculator.CalculateMobToPlayerDamage(
|
||||
sourceMob, player, projectile.DamageTypeKey, projectile.Damage, player.Resistances);
|
||||
@@ -1057,6 +1061,7 @@ public partial class DungeonSimulation
|
||||
|
||||
Console.WriteLine(
|
||||
$"[AoeImpact] sourceMob={sourceMob.Id} ability={ResolveProjectileAbilityKey(projectile)} x={x:F1} y={y:F1} radius={projectile.AoeRadius} hits={hits}");
|
||||
Console.WriteLine($"[AoeProbe] {ResolveProjectileAbilityKey(projectile)} center=({x:F1},{y:F1}) radius={projectile.AoeRadius} players=[{string.Join(", ", probe)}]");
|
||||
}
|
||||
|
||||
private void ApplyDotToPlayer(MobInstance mob, MobAbilityDefinition ability, PlayerInstance target)
|
||||
|
||||
Reference in New Issue
Block a user