Added config options for ignoring projectile bugs. Just turn these on if you get debuffed for projectile update/create/kill messages.
This commit is contained in:
parent
00b2d768d7
commit
2a59de5293
3 changed files with 15 additions and 8 deletions
|
|
@ -195,7 +195,13 @@ namespace TShockAPI
|
|||
|
||||
[Description("Allows users to login with any username with /login")] public bool AllowLoginAnyUsername = true;
|
||||
|
||||
[Description("Allows users to login with any username with /login")] public int MaxDamage = 175;
|
||||
[Description("The maximum damage a player/npc can inflict")] public int MaxDamage = 175;
|
||||
|
||||
[Description("The maximum damage a projectile can inflict")] public int MaxProjDamage = 175;
|
||||
|
||||
[Description("Ignores checking to see if player 'can' update a projectile")] public bool IgnoreProjUpdate = false;
|
||||
|
||||
[Description("Ignores checking to see if player 'can' kill a projectile")] public bool IgnoreProjKill = false;
|
||||
|
||||
public static ConfigFile Read(string path)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1538,7 +1538,7 @@ namespace TShockAPI
|
|||
|
||||
if (dmg > TShock.Config.MaxProjDamage)
|
||||
{
|
||||
args.Player.Disable("Projectile damage is higher than 175");
|
||||
args.Player.Disable(String.Format("Projectile damage is higher than {0}", TShock.Config.MaxProjDamage));
|
||||
args.Player.RemoveProjectile(ident, owner);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1549,9 +1549,9 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
|
||||
if (TShock.CheckProjectilePermission(args.Player, index, type))
|
||||
if (!TShock.Config.IgnoreProjUpdate && TShock.CheckProjectilePermission(args.Player, index, type))
|
||||
{
|
||||
args.Player.Disable("Does not have projectile permission to update projectile");
|
||||
args.Player.Disable("Does not have projectile permission to update projectile.");
|
||||
args.Player.RemoveProjectile(ident, owner);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1591,7 +1591,7 @@ namespace TShockAPI
|
|||
|
||||
var type = Main.projectile[index].type;
|
||||
|
||||
if (args.Player.Index != Main.projectile[index].owner && type != 102 && type != 100) // workaround for skeletron prime projectiles
|
||||
if (args.Player.Index != Main.projectile[index].owner && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill) // workaround for skeletron prime projectiles
|
||||
{
|
||||
args.Player.Disable("Owner and player ID does not match to kill projectile");
|
||||
args.Player.RemoveProjectile(ident, owner);
|
||||
|
|
@ -1604,7 +1604,7 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
|
||||
if (TShock.CheckProjectilePermission(args.Player, index, type) && type != 102 && type != 100)
|
||||
if (TShock.CheckProjectilePermission(args.Player, index, type) && type != 102 && type != 100 && !TShock.Config.IgnoreProjKill)
|
||||
{
|
||||
args.Player.Disable("Does not have projectile permission to kill projectile");
|
||||
args.Player.RemoveProjectile(ident, owner);
|
||||
|
|
@ -2031,7 +2031,7 @@ namespace TShockAPI
|
|||
|
||||
if (dmg > TShock.Config.MaxDamage)
|
||||
{
|
||||
args.Player.Disable("Player damage exceeded 175");
|
||||
args.Player.Disable(String.Format("Player damage exceeded {0}", TShock.Config.MaxDamage ) );
|
||||
args.Player.SendData(PacketTypes.PlayerHp, "", id);
|
||||
args.Player.SendData(PacketTypes.PlayerUpdate, "", id);
|
||||
return true;
|
||||
|
|
@ -2084,7 +2084,7 @@ namespace TShockAPI
|
|||
|
||||
if (dmg > TShock.Config.MaxDamage)
|
||||
{
|
||||
args.Player.Disable("NPC damage exceeded 175");
|
||||
args.Player.Disable(String.Format("NPC damage exceeded {0}", TShock.Config.MaxDamage ) );
|
||||
args.Player.SendData(PacketTypes.NpcUpdate, "", id);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1067,6 +1067,7 @@ namespace TShockAPI
|
|||
|
||||
if (proj.hostile)
|
||||
{
|
||||
//player.SendMessage( proj.name, Color.Yellow);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue