Merge branch 'general-devel' of https://github.com/nyxstudios/TShock into general-devel
This commit is contained in:
commit
0794b89407
5 changed files with 29 additions and 13 deletions
|
|
@ -7,6 +7,11 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Fixed a bug where /user group failing would output no error. (@nicatronTg)
|
* Fixed a bug where /user group failing would output no error. (@nicatronTg)
|
||||||
* Fixed a bug where /user group would fail. @(Enerdy)
|
* Fixed a bug where /user group would fail. @(Enerdy)
|
||||||
* Added the ability to disable backup autosave messages. (@nicatronTg)
|
* Added the ability to disable backup autosave messages. (@nicatronTg)
|
||||||
|
* Fixed /buff malfunctioning when entering an invalid buff name. (@Enerdy)
|
||||||
|
* Fixed projectiles 435-438 (martian invasion) freezing everyone under certain conditions. (@Enerdy)
|
||||||
|
* DisableTombstones now works properly with the new golden gravestones. (@Enerdy)
|
||||||
|
* REST module now properly catches exceptions during Start(). (@Patrikkk)
|
||||||
|
* Added /expert command to toggle expert mode. (@WhiteXZ)
|
||||||
|
|
||||||
## TShock 4.3.0.0
|
## TShock 4.3.0.0
|
||||||
|
|
||||||
|
|
@ -26,4 +31,4 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Fixed ```UseServerName``` config option so that it correctly sends the config server name any time that Main.WorldName is used. (@Olink)
|
* Fixed ```UseServerName``` config option so that it correctly sends the config server name any time that Main.WorldName is used. (@Olink)
|
||||||
* Fixed a bug where people could ban themselves. (@nicatronTg)
|
* Fixed a bug where people could ban themselves. (@nicatronTg)
|
||||||
* Fixed a bug where banning a player who never logged in caused problems. (@nicatronTg)
|
* Fixed a bug where banning a player who never logged in caused problems. (@nicatronTg)
|
||||||
* Terraria 1.3.0.3 support.
|
* Terraria 1.3.0.3 support.
|
||||||
|
|
|
||||||
|
|
@ -2419,15 +2419,15 @@ namespace TShockAPI
|
||||||
|
|
||||||
private static bool HandleProjectileNew(GetDataHandlerArgs args)
|
private static bool HandleProjectileNew(GetDataHandlerArgs args)
|
||||||
{
|
{
|
||||||
var ident = args.Data.ReadInt16();
|
short ident = args.Data.ReadInt16();
|
||||||
var pos = new Vector2(args.Data.ReadSingle(), args.Data.ReadSingle());
|
var pos = new Vector2(args.Data.ReadSingle(), args.Data.ReadSingle());
|
||||||
var vel = new Vector2(args.Data.ReadSingle(), args.Data.ReadSingle());
|
var vel = new Vector2(args.Data.ReadSingle(), args.Data.ReadSingle());
|
||||||
var knockback = args.Data.ReadSingle();
|
float knockback = args.Data.ReadSingle();
|
||||||
var dmg = args.Data.ReadInt16();
|
short dmg = args.Data.ReadInt16();
|
||||||
var owner = args.Data.ReadInt8();
|
byte owner = args.Data.ReadInt8();
|
||||||
var type = args.Data.ReadInt16();
|
short type = args.Data.ReadInt16();
|
||||||
var bits = (BitsByte) args.Data.ReadInt8();
|
BitsByte bits = args.Data.ReadInt8();
|
||||||
owner = (byte)args.Player.Index;
|
//owner = (byte)args.Player.Index;
|
||||||
float[] ai = new float[Projectile.maxAI];
|
float[] ai = new float[Projectile.maxAI];
|
||||||
|
|
||||||
for (int i = 0; i < Projectile.maxAI; i++)
|
for (int i = 0; i < Projectile.maxAI; i++)
|
||||||
|
|
@ -2474,7 +2474,7 @@ namespace TShockAPI
|
||||||
bool hasPermission = !TShock.CheckProjectilePermission(args.Player, index, type);
|
bool hasPermission = !TShock.CheckProjectilePermission(args.Player, index, type);
|
||||||
if (!TShock.Config.IgnoreProjUpdate && !hasPermission && !args.Player.Group.HasPermission(Permissions.ignoreprojectiledetection))
|
if (!TShock.Config.IgnoreProjUpdate && !hasPermission && !args.Player.Group.HasPermission(Permissions.ignoreprojectiledetection))
|
||||||
{
|
{
|
||||||
if (type == 100 || type == 164 || type == 180 || type == 261 || (type > 289 && type < 298) || (type >= 325 && type <= 328) || (type >= 345 && type <= 352))
|
if (type == 100 || type == 164 || type == 180 || type == 261 || (type > 289 && type < 298) || (type >= 325 && type <= 328) || (type >= 345 && type <= 352) || (type >= 435 && type <= 438))
|
||||||
{
|
{
|
||||||
TShock.Log.Debug("Certain projectiles have been ignored for cheat detection.");
|
TShock.Log.Debug("Certain projectiles have been ignored for cheat detection.");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,20 @@ namespace Rests
|
||||||
|
|
||||||
public virtual void Start()
|
public virtual void Start()
|
||||||
{
|
{
|
||||||
if (listener == null)
|
try
|
||||||
{
|
{
|
||||||
listener = HttpListener.Create(Ip, Port);
|
listener = HttpListener.Create(Ip, Port);
|
||||||
listener.RequestReceived += OnRequest;
|
listener.RequestReceived += OnRequest;
|
||||||
listener.Start(int.MaxValue);
|
listener.Start(int.MaxValue);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TShock.Log.Error("Fatal Startup Exception");
|
||||||
|
TShock.Log.Error(ex.ToString());
|
||||||
|
TShock.Log.ConsoleError("Invalid REST configuration: \nYou may already have a REST service bound to port {0}. \nPlease adjust your configuration and restart the server. \nPress any key to exit.", Port);
|
||||||
|
Console.ReadLine();
|
||||||
|
Environment.Exit(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start(IPAddress ip, int port)
|
public void Start(IPAddress ip, int port)
|
||||||
|
|
|
||||||
|
|
@ -422,15 +422,18 @@ namespace TShockAPI
|
||||||
public List<int> GetBuffByName(string name)
|
public List<int> GetBuffByName(string name)
|
||||||
{
|
{
|
||||||
string nameLower = name.ToLower();
|
string nameLower = name.ToLower();
|
||||||
|
string buffname;
|
||||||
for (int i = 1; i < Main.maxBuffTypes; i++)
|
for (int i = 1; i < Main.maxBuffTypes; i++)
|
||||||
{
|
{
|
||||||
if (Main.buffName[i].ToLower() == nameLower)
|
buffname = Main.buffName[i];
|
||||||
|
if (!String.IsNullOrWhiteSpace(buffname) && buffname.ToLower() == nameLower)
|
||||||
return new List<int> {i};
|
return new List<int> {i};
|
||||||
}
|
}
|
||||||
var found = new List<int>();
|
var found = new List<int>();
|
||||||
for (int i = 1; i < Main.maxBuffTypes; i++)
|
for (int i = 1; i < Main.maxBuffTypes; i++)
|
||||||
{
|
{
|
||||||
if (Main.buffName[i].ToLower().StartsWith(nameLower))
|
buffname = Main.buffName[i];
|
||||||
|
if (!String.IsNullOrWhiteSpace(buffname) && buffname.ToLower().StartsWith(nameLower))
|
||||||
found.Add(i);
|
found.Add(i);
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit d0bd38b5b12a6c0cb4cc54706550e94153856ce4
|
Subproject commit fa9e1e19757cde7b92c44687224f7435a8193c18
|
||||||
Loading…
Add table
Add a link
Reference in a new issue