TShock/TShockAPI
James Puleo 23fd7acd79
Improve OnPlayerBuff logic to properly handle buffs from other players
Previously, we checked if the target player was null, before checking if
their ID was out of bounds, so the check was moved to be first.
We now check if the buff being applied is within bounds.

We introduce `AddPlayerBuffWhitelist` to replace `WhitelistBuffMaxTime`,
which allows us to specify a maximum amount of ticks a buff can be
applied to another player for, and if it can be applied without the
target being in PvP. If a buff is not within this array, it is *not*
allowed to be applied by other players.

When rejecting from `OnPlayerBuff`, we send a `PlayerBuff` instead of
`PlayerAddBuff`, to sync the current buffs of the target, without
syncing the rejected one.
2022-10-08 13:09:54 -04:00
..
CLI Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
Configuration add strict STR size checking 2022-07-26 08:24:46 +02:00
DB Use a string interpolation and escape single quotes when escaping tables 2022-10-05 13:57:30 -04:00
Extensions Fix sqlite null parameters + unit test 2022-09-08 16:08:16 +10:00
Handlers Merge branch 'general-devel' into otapi3 2022-09-06 22:23:34 +10:00
Hooks PlayerHasBuildPermission hook (#8) 2022-07-24 19:23:10 -04:00
Localization pass compile; add void vault code 2020-05-17 21:38:47 +08:00
Models Update GetDataHandler.HandleProjectileNew to include HasBannerIdToRespondTo 2021-04-05 10:45:41 +08:00
Modules Improve ReduceConsoleSpam module to filter world generation 2022-09-06 23:06:39 +10:00
Net Address feedback from @hakusaro about style & documentation 2021-05-21 13:13:06 +02:00
Rest Typo fixes on comments/strings 2021-07-16 14:53:37 -04:00
Sockets Typo fixes on comments/strings 2021-07-16 14:53:37 -04:00
BackupManager.cs Remove "potential lag spike" warning when saving 2021-06-05 20:30:08 -07:00
Bouncer.cs Improve OnPlayerBuff logic to properly handle buffs from other players 2022-10-08 13:09:54 -04:00
Commands.cs Merge remote-tracking branch 'punchready/general-devel' into general-devel 2022-10-07 20:41:46 -07:00
FileTools.cs separate online players / max slots in stock MOTD 2021-07-15 16:13:51 -04:00
GeoIPCountry.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
GetDataHandlers.cs Improve OnPlayerBuff logic to properly handle buffs from other players 2022-10-08 13:09:54 -04:00
Group.cs Typo fixes on comments/strings 2021-07-16 14:53:37 -04:00
HandlerList.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
ILog.cs Typo fixes on comments/strings 2021-07-16 14:53:37 -04:00
IPackable.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
ItemBans.cs Merge remote-tracking branch 'origin/general-devel' into otapi3 2022-02-16 18:44:33 -08:00
NetItem.cs pass compile; add void vault code 2020-05-17 21:38:47 +08:00
PaginationTools.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
Permissions.cs Added lanterns night event to the worldevent command. 2022-01-15 23:49:37 +01:00
PlayerData.cs Change happyFunTorchTime from true to false 2021-05-23 17:11:06 -07:00
RegionHandler.cs Reverted STS change, added STSC, fixed STS/STSC usage. 2022-02-01 16:00:05 +01:00
SaveManager.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
SqlLog.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
TextLog.cs Refactor for new configuration 2020-12-03 17:43:10 +10:30
TShock.cs Merge branch 'general-devel' into otapi3 2022-09-06 22:23:34 +10:00
TShockAPI.csproj Update dependency Microsoft.Data.Sqlite to v6.0.9 2022-10-06 16:22:58 +00:00
TShockAPI.licenseheader Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
TSPlayer.cs Fix hard/mediumcore ban on death 2022-10-07 18:42:31 +10:00
TSServerPlayer.cs Merge branch 'general-devel' into otapi3 2022-02-28 00:15:06 -08:00
UpdateManager.cs Update copyright to 2019 again 2019-03-29 17:16:37 -07:00
Utils.cs chore: clean up formatting 2022-05-10 12:40:48 +02:00