diff --git a/Economics.Skill/AIStyle.cs b/Economics.Skill/AIStyle.cs index d4446458..f927867f 100644 --- a/Economics.Skill/AIStyle.cs +++ b/Economics.Skill/AIStyle.cs @@ -52,7 +52,7 @@ public static void Revolve(Projectile projectile, AIStyleOption aIStyleOption) if (Main.time % aIStyleOption.Interval == 0.0 && target != null) { var speed = projectile.DirectionTo(target.Center).SafeNormalize(-Vector2.UnitY); - int index = EconomicsAPI.Utils.SpawnProjectile.NewProjectile(Terraria.Projectile.GetNoneSource(), projectile.Center, speed.ToLenOf(aIStyleOption.Speed), aIStyleOption.ProjID, aIStyleOption.Damage, 10, projectile.owner); + int index = EconomicsAPI.Utils.SpawnProjectile.NewProjectile(Terraria.Projectile.GetNoneSource(), projectile.Center, speed.ToLenOf(aIStyleOption.Speed), aIStyleOption.ProjID, aIStyleOption.Damage, 10, projectile.owner, aIStyleOption.AI[0], aIStyleOption.AI[1], aIStyleOption.AI[2]); TSPlayer.All.SendData(PacketTypes.ProjectileNew, "", index); } } @@ -65,7 +65,7 @@ public static void Hover(Projectile projectile, AIStyleOption aIStyleOption) if (Main.time % aIStyleOption.Interval == 0.0 && target != null) { var speed = projectile.DirectionTo(target.Center).SafeNormalize(-Vector2.UnitY); - int index = EconomicsAPI.Utils.SpawnProjectile.NewProjectile(Terraria.Projectile.GetNoneSource(), projectile.Center, speed.ToLenOf(aIStyleOption.Speed), aIStyleOption.ProjID, aIStyleOption.Damage, 10, projectile.owner); + int index = EconomicsAPI.Utils.SpawnProjectile.NewProjectile(Terraria.Projectile.GetNoneSource(), projectile.Center, speed.ToLenOf(aIStyleOption.Speed), aIStyleOption.ProjID, aIStyleOption.Damage, 10, projectile.owner, aIStyleOption.AI[0], aIStyleOption.AI[1], aIStyleOption.AI[2]); TSPlayer.All.SendData(PacketTypes.ProjectileNew, "", index); } } diff --git a/Economics.Skill/Model/Options/AIStyleOption.cs b/Economics.Skill/Model/Options/AIStyleOption.cs index dc29d9ea..ea9086af 100644 --- a/Economics.Skill/Model/Options/AIStyleOption.cs +++ b/Economics.Skill/Model/Options/AIStyleOption.cs @@ -23,4 +23,7 @@ public class AIStyleOption [JsonProperty("攻击间隔")] public int Interval { get; set; } = 10; + + [JsonProperty("AI")] + public float[] AI { get; set; } = new float[3]; }