projectiles
This commit is contained in:
@@ -1,31 +1,63 @@
|
||||
namespace GameServer.Dungeon;
|
||||
|
||||
public enum ProjectileSource
|
||||
{
|
||||
Mob,
|
||||
Player
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A projectile in flight
|
||||
/// </summary>
|
||||
public class ProjectileInstance
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int SourceMobId { get; set; }
|
||||
public int AbilityId { get; set; }
|
||||
|
||||
|
||||
// Source tracking
|
||||
public ProjectileSource SourceType { get; set; }
|
||||
public int SourceMobId { get; set; } // Used when SourceType = Mob
|
||||
public ulong SourcePlayerId { get; set; } // Used when SourceType = Player
|
||||
public int AbilityId { get; set; } // For mob abilities
|
||||
|
||||
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";
|
||||
|
||||
// Player projectile properties
|
||||
/// <summary>
|
||||
/// Item definition ID of the ammunition used (for recovery)
|
||||
/// Null if not recoverable (mob projectiles, throwables that don't recover)
|
||||
/// </summary>
|
||||
public int? AmmunitionItemDefinitionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Recovery chance (0.0 to 1.0) for this specific projectile
|
||||
/// </summary>
|
||||
public float RecoveryChance { get; set; } = 0.05f;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this projectile can hit players (for PvP)
|
||||
/// </summary>
|
||||
public bool CanHitPlayers { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this projectile can hit mobs
|
||||
/// </summary>
|
||||
public bool CanHitMobs { get; set; } = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user