Quick fix to buff hack check.

This commit is contained in:
Zidonuke 2011-12-20 13:33:44 -05:00
parent 428ea92357
commit 9a45a9ab80

View file

@ -49,18 +49,17 @@ namespace TShockAPI
public static class GetDataHandlers public static class GetDataHandlers
{ {
private static Dictionary<PacketTypes, GetDataHandlerDelegate> GetDataHandlerDelegates; private static Dictionary<PacketTypes, GetDataHandlerDelegate> GetDataHandlerDelegates;
public static bool[] WhitelistBuffs; public static int[] WhitelistBuffMaxTime;
public static void InitGetDataHandler() public static void InitGetDataHandler()
{ {
#region Blacklists #region Blacklists
//Check StatusPvp for whats usable WhitelistBuffMaxTime = new int[Main.maxBuffs];
WhitelistBuffs = new bool[Main.maxBuffs]; WhitelistBuffMaxTime[20] = 600;
WhitelistBuffs[20] = true; //Poisoned WhitelistBuffMaxTime[0x18] = 1200;
WhitelistBuffs[0x18] = true; //On Fire WhitelistBuffMaxTime[0x1f] = 120;
WhitelistBuffs[0x1f] = true; //Confused WhitelistBuffMaxTime[0x27] = 420;
WhitelistBuffs[0x27] = true; //Cursed Inferno
#endregion Blacklists #endregion Blacklists
@ -937,7 +936,8 @@ namespace TShockAPI
args.Player.SendData(PacketTypes.PlayerBuff, "", id); args.Player.SendData(PacketTypes.PlayerBuff, "", id);
return true; return true;
} }
if (WhitelistBuffs[type])
if (WhitelistBuffMaxTime[type] > 0 && time < WhitelistBuffMaxTime[type])
{ {
return false; return false;
} }