Fixed the ability to spawn Zenith projectile with non-original items.

This commit is contained in:
AkjaHAsLk1IALk0MasH 2021-11-28 15:35:50 +07:00
parent 87d5b476ea
commit 6cec7e71cd
3 changed files with 12 additions and 1 deletions

View file

@ -1096,7 +1096,13 @@ namespace TShockAPI
return;
}
if (TShock.Config.Settings.DisableAnyZenith && type == ProjectileID.FinalFractal && !Terraria.Graphics.FinalFractalHelper._fractalProfiles.ContainsKey((int)ai[1]))
{
TShock.Log.ConsoleDebug("Bouncer / OnNewProjectile rejected from bouncer modified Zenith projectile from {0}.", args.Player.Name);
args.Player.RemoveProjectile(ident, owner);
args.Handled = true;
return;
}
if (!args.Player.HasPermission(Permissions.ignoreprojectiledetection))
{

View file

@ -456,6 +456,10 @@ namespace TShockAPI.Configuration
/// <summary>Whether or not the server should suppress build permission failure warnings from regions, spawn point, or server edit failure.</summary>
[Description("Whether or not the server should suppress build permission failure warnings from regions, spawn point, or server edit failure.")]
public bool SuppressPermissionFailureNotices = false;
/// <summary>Prohibit the use of Zenith projectile with different objects instead of weapons.</summary>
[Description("Prohibit the use of Zenith projectile with different objects instead of weapons.")]
public bool DisableAnyZenith = true;
#endregion