Merge remote-tracking branch 'drunderscore/fix/add-player-buff' into general-devel

This commit is contained in:
Lucas Nicodemus 2022-10-14 23:49:15 -07:00
commit 20fb5023c1
No known key found for this signature in database
3 changed files with 251 additions and 44 deletions

View file

@ -79,20 +79,8 @@ namespace TShockAPI
{
private static Dictionary<PacketTypes, GetDataHandlerDelegate> GetDataHandlerDelegates;
public static int[] WhitelistBuffMaxTime;
public static void InitGetDataHandler()
{
#region Blacklists
WhitelistBuffMaxTime = new int[Main.maxBuffTypes];
WhitelistBuffMaxTime[20] = 600;
WhitelistBuffMaxTime[0x18] = 1200;
WhitelistBuffMaxTime[0x1f] = 120;
WhitelistBuffMaxTime[0x27] = 420;
#endregion Blacklists
GetDataHandlerDelegates = new Dictionary<PacketTypes, GetDataHandlerDelegate>
{
{ PacketTypes.PlayerInfo, HandlePlayerInfo },
@ -3467,8 +3455,7 @@ namespace TShockAPI
if (OnPlayerBuff(args.Player, args.Data, id, type, time))
return true;
args.Player.SendData(PacketTypes.PlayerAddBuff, "", id);
return true;
return false;
}
private static bool HandleUpdateNPCHome(GetDataHandlerArgs args)