Hashing now supports xp. Simply append "-xp" to the algorithm name.
Fixed kicking for mana over 200, max mana was raised to 400 in 1.0.6.
This commit is contained in:
parent
923358a4b2
commit
2a0bf9036a
4 changed files with 30 additions and 34 deletions
|
|
@ -448,7 +448,7 @@ namespace TShockAPI
|
|||
|
||||
private void OnChat(messageBuffer msg, int ply, string text, HandledEventArgs e)
|
||||
{
|
||||
if (e.Handled)
|
||||
if (e.Handled)
|
||||
return;
|
||||
|
||||
var tsplr = Players[msg.whoAmI];
|
||||
|
|
@ -560,7 +560,7 @@ namespace TShockAPI
|
|||
|
||||
private void GetData(GetDataEventArgs e)
|
||||
{
|
||||
if (e.Handled)
|
||||
if (e.Handled)
|
||||
return;
|
||||
|
||||
PacketTypes type = e.MsgID;
|
||||
|
|
@ -732,8 +732,8 @@ namespace TShockAPI
|
|||
|
||||
public static bool HackedHealth(TSPlayer player)
|
||||
{
|
||||
return (player.TPlayer.statManaMax > 200) ||
|
||||
(player.TPlayer.statMana > 200) ||
|
||||
return (player.TPlayer.statManaMax > 400) ||
|
||||
(player.TPlayer.statMana > 400) ||
|
||||
(player.TPlayer.statLifeMax > 400) ||
|
||||
(player.TPlayer.statLife > 400);
|
||||
}
|
||||
|
|
@ -759,22 +759,7 @@ namespace TShockAPI
|
|||
RconHandler.Password = file.RconPassword;
|
||||
RconHandler.ListenPort = file.RconPort;
|
||||
|
||||
Type hash;
|
||||
if (Tools.HashTypes.TryGetValue(file.HashAlgorithm, out hash))
|
||||
{
|
||||
lock (Tools.HashAlgo)
|
||||
{
|
||||
if (!Tools.HashAlgo.GetType().Equals(hash))
|
||||
{
|
||||
Tools.HashAlgo.Dispose();
|
||||
Tools.HashAlgo = (HashAlgorithm)Activator.CreateInstance(Tools.HashTypes[file.HashAlgorithm]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.ConsoleError("Invalid or not supported hashing algorithm: " + file.HashAlgorithm);
|
||||
}
|
||||
Tools.HashAlgo = file.HashAlgorithm;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue