65 lines
1.8 KiB
C#
65 lines
1.8 KiB
C#
namespace Server.Game.Dungeon;
|
|
|
|
/// <summary>
|
|
/// A projectile in flight
|
|
/// </summary>
|
|
public class ProjectileInstance
|
|
{
|
|
public int Id { get; set; }
|
|
public int SourceMobId { get; set; }
|
|
public int AbilityId { get; set; }
|
|
|
|
public float X { get; set; }
|
|
public float Y { get; set; }
|
|
public float VelocityX { get; set; }
|
|
public float VelocityY { get; set; }
|
|
public float Speed { get; set; }
|
|
|
|
public float TargetX { get; set; }
|
|
public float TargetY { get; set; }
|
|
|
|
public int Damage { get; set; }
|
|
public string DamageTypeKey { get; set; } = "physical";
|
|
public float AoeRadius { get; set; }
|
|
|
|
public float DistanceTraveled { get; set; }
|
|
public float MaxRange { get; set; } = 500f;
|
|
|
|
public string SpriteKey { get; set; } = "projectile_default";
|
|
}
|
|
|
|
/// <summary>
|
|
/// A persistent damage zone on the ground
|
|
/// </summary>
|
|
public class HazardZone
|
|
{
|
|
public int Id { get; set; }
|
|
public int SourceMobId { get; set; }
|
|
|
|
public float X { get; set; }
|
|
public float Y { get; set; }
|
|
public float Radius { get; set; }
|
|
|
|
public int DamagePerTick { get; set; }
|
|
public float TickInterval { get; set; }
|
|
public float NextTickIn { get; set; }
|
|
public float Duration { get; set; }
|
|
|
|
public string DamageTypeKey { get; set; } = "fire";
|
|
public string VisualKey { get; set; } = "hazard_default";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Event when an ability is used (for client animations)
|
|
/// </summary>
|
|
public class AbilityEvent
|
|
{
|
|
public EntityType SourceType { get; set; }
|
|
public int SourceId { get; set; }
|
|
public string AbilityKey { get; set; } = "";
|
|
public string AnimationKey { get; set; } = "attack";
|
|
public float TargetX { get; set; }
|
|
public float TargetY { get; set; }
|
|
public int? TargetId { get; set; }
|
|
}
|