projectile fix4
This commit is contained in:
@@ -1167,7 +1167,9 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
|||||||
if (playerSession != null)
|
if (playerSession != null)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[HandleFireProjectile] Sending EVENT_PROJECTILE_SPAWNED (504) to player {playerSession.Character.Name} (CharId={playerSession.CharacterId})");
|
Console.WriteLine($"[HandleFireProjectile] Sending EVENT_PROJECTILE_SPAWNED (504) to player {playerSession.Character.Name} (CharId={playerSession.CharacterId})");
|
||||||
_ = SendAsync(playerSession.Connection, DungeonOpCodes.EVENT_PROJECTILE_SPAWNED, new
|
try
|
||||||
|
{
|
||||||
|
await SendAsync(playerSession.Connection, DungeonOpCodes.EVENT_PROJECTILE_SPAWNED, new
|
||||||
{
|
{
|
||||||
id = projectile.Id,
|
id = projectile.Id,
|
||||||
sourceType = "player",
|
sourceType = "player",
|
||||||
@@ -1182,7 +1184,13 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
|||||||
frontY = projectile.FrontY,
|
frontY = projectile.FrontY,
|
||||||
backX = projectile.BackX,
|
backX = projectile.BackX,
|
||||||
backY = projectile.BackY
|
backY = projectile.BackY
|
||||||
}, CancellationToken.None);
|
}, ct);
|
||||||
|
Console.WriteLine($"[HandleFireProjectile] Successfully sent EVENT_PROJECTILE_SPAWNED to {playerSession.Character.Name}");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"[HandleFireProjectile] ERROR sending EVENT_PROJECTILE_SPAWNED to {playerSession.Character.Name}: {ex.Message}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1257,7 +1265,9 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
|||||||
if (playerSession != null)
|
if (playerSession != null)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[HandleThrowableProjectile] Sending EVENT_PROJECTILE_SPAWNED (504) to player {playerSession.Character.Name}");
|
Console.WriteLine($"[HandleThrowableProjectile] Sending EVENT_PROJECTILE_SPAWNED (504) to player {playerSession.Character.Name}");
|
||||||
_ = SendAsync(playerSession.Connection, DungeonOpCodes.EVENT_PROJECTILE_SPAWNED, new
|
try
|
||||||
|
{
|
||||||
|
await SendAsync(playerSession.Connection, DungeonOpCodes.EVENT_PROJECTILE_SPAWNED, new
|
||||||
{
|
{
|
||||||
id = projectile.Id,
|
id = projectile.Id,
|
||||||
sourceType = "player",
|
sourceType = "player",
|
||||||
@@ -1272,7 +1282,13 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
|||||||
frontY = projectile.FrontY,
|
frontY = projectile.FrontY,
|
||||||
backX = projectile.BackX,
|
backX = projectile.BackX,
|
||||||
backY = projectile.BackY
|
backY = projectile.BackY
|
||||||
}, CancellationToken.None);
|
}, ct);
|
||||||
|
Console.WriteLine($"[HandleThrowableProjectile] Successfully sent EVENT_PROJECTILE_SPAWNED to {playerSession.Character.Name}");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"[HandleThrowableProjectile] ERROR sending EVENT_PROJECTILE_SPAWNED to {playerSession.Character.Name}: {ex.Message}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user