CDN fight 3
This commit is contained in:
@@ -130,16 +130,11 @@ public sealed class DungeonHandler : IClientMessageHandler
|
||||
}
|
||||
|
||||
// All dungeon operations require authentication
|
||||
if (opCode == DungeonOpCodes.ASSET_MANIFEST_REQUEST)
|
||||
{
|
||||
await HandleAssetManifestRequest(connection, ct);
|
||||
}
|
||||
if (!_sessions.TryGet(connection.Id, out var accountId, out _))
|
||||
{
|
||||
await SendErrorAsync(connection, "auth_required", ct);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Get or create player session
|
||||
var session = await GetOrCreateSessionAsync(connection, accountId, ct);
|
||||
@@ -1947,7 +1942,8 @@ public sealed class DungeonHandler : IClientMessageHandler
|
||||
y = m.Y,
|
||||
health = m.Health,
|
||||
maxHealth = m.MaxHealth,
|
||||
scenePath = m.ScenePath,
|
||||
spriteConfig = string.IsNullOrEmpty(m.SpriteConfigJson) ? null :
|
||||
System.Text.Json.JsonSerializer.Deserialize<object>(m.SpriteConfigJson),
|
||||
tintColor = m.TintColor,
|
||||
scale = m.Scale
|
||||
}),
|
||||
@@ -2496,7 +2492,8 @@ public sealed class DungeonHandler : IClientMessageHandler
|
||||
health = m.Health,
|
||||
maxHealth = m.MaxHealth,
|
||||
state = m.State.ToString().ToLower(),
|
||||
scenePath = m.ScenePath,
|
||||
spriteConfig = string.IsNullOrEmpty(m.SpriteConfigJson) ? null :
|
||||
System.Text.Json.JsonSerializer.Deserialize<object>(m.SpriteConfigJson),
|
||||
tintColor = m.TintColor,
|
||||
scale = m.Scale
|
||||
}),
|
||||
|
||||
@@ -123,7 +123,7 @@ public class DungeonSimulation
|
||||
MaxHealth = stats.MaxHealth,
|
||||
Stats = stats,
|
||||
State = MobState.Idle,
|
||||
ScenePath = mobDef.ScenePath,
|
||||
SpriteConfigJson = mobDef.SpriteConfigJson,
|
||||
TintColor = mobDef.TintColor,
|
||||
Scale = mobDef.Scale,
|
||||
Type = mobDef.Type
|
||||
|
||||
@@ -46,8 +46,8 @@ public class MobInstance
|
||||
public ulong? TargetId { get; set; }
|
||||
public long LastAttackTick { get; set; }
|
||||
|
||||
// Visual - CDN scene path
|
||||
public string? ScenePath { get; set; }
|
||||
// Visual - sprite configuration JSON
|
||||
public string? SpriteConfigJson { get; set; }
|
||||
public string TintColor { get; set; } = "#ffffff";
|
||||
public float Scale { get; set; } = 1.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user