Commit graph

289 commits

Author SHA1 Message Date
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
Luke
aa0bd7deb2 Merge branch 'general-devel' into otapi3 2022-09-06 22:23:34 +10:00
punchready
9358f11e51 Improve comments 2022-08-14 01:22:22 +02:00
punchready
82a095f3cf fix a region bypass exploit using the ice rod 2022-07-26 08:58:56 +02:00
Lucas Nicodemus
78169c87cb Merge remote-tracking branch 'origin/general-devel' into otapi3 2022-02-16 18:44:33 -08:00
0x3fcf1bbd
874b3b2746 Reverted STS change, added STSC, fixed STS/STSC usage. 2022-02-01 16:00:05 +01:00
Lucas Nicodemus
724858b42d Merge branch 'general-devel' into otapi3 2021-12-12 12:36:31 -08:00
Lucas Nicodemus
e42da74f85 Merge remote-tracking branch 'tru321/general-devel' into general-devel 2021-12-12 12:35:13 -08:00
tru321
f20ce4aaa9
Update Bouncer.cs 2021-12-10 10:57:56 +08:00
tru321
16f7c876e1
Apply suggestions from code review
Co-authored-by: Lucas Nicodemus <shank@shanked.me>
2021-12-08 14:44:03 +08:00
Lucas Nicodemus
c62fca5353 Merge remote-tracking branch 'deathcradle/otapi3' into otapi3 2021-12-07 21:06:48 -08:00
tru321
26a46ef40c
Update Bouncer.cs 2021-12-08 11:48:55 +08:00
tru321
d4befdeff0
Update Bouncer.cs 2021-12-08 11:10:12 +08:00
Zoom L1
5230598ba3
Comments updated 2021-12-04 10:37:16 +07:00
Zoom L1
77ded28826
Corrected customDeathReason in OnPlayerDamage
Previously it was called for absolutely any damage from the player.
2021-12-02 22:13:25 +07:00
AkjaHAsLk1IALk0MasH
823293ed43 Updated code comments 2021-12-02 10:03:36 +07:00
AkjaHAsLk1IALk0MasH
a00512fcf4 Added protection to OnPlayerDamage 2021-11-30 21:14:53 +07:00
AkjaHAsLk1IALk0MasH
cdeec8aa04 Added protection in OnKillMe 2021-11-30 20:53:19 +07:00
AkjaHAsLk1IALk0MasH
df5c118055 Added comments to help other developers understand what I used and why 2021-11-30 14:36:19 +07:00
AkjaHAsLk1IALk0MasH
77032ccbea Renamed value in config 2021-11-30 14:23:49 +07:00
AkjaHAsLk1IALk0MasH
1a62d1dfed Added ai[0] check 2021-11-30 14:22:41 +07:00
AkjaHAsLk1IALk0MasH
6cec7e71cd Fixed the ability to spawn Zenith projectile with non-original items. 2021-11-28 15:35:50 +07:00
Lucas Nicodemus
0751f0cb5a Merge remote-tracking branch 'agaspace/general-devel' into general-devel 2021-11-27 17:15:44 -08:00
Luke
cec53c780f Merge branch 'general-devel' into otapi3 2021-11-27 17:53:28 +10:00
AkjaHAsLk1IALk0MasH
76b0d9e563 Removed unnecessary code comments. 2021-11-27 11:59:49 +07:00
AkjaHAsLk1IALk0MasH
606b9e43d7 Fixed the minimum value that made the "Bouncer" not work properly 2021-11-27 11:57:48 +07:00
Zoom L1
246c67a622
Updated the dictionaries. 2021-11-27 09:34:14 +07:00
Zoom L1
f11ffd2b91
Fixed the maximum and minimum values.
Co-authored-by: Arthri <41360489+Arthri@users.noreply.github.com>
2021-11-27 09:30:52 +07:00
AkjaHAsLk1IALk0MasH
bf605a2127 Added "Bouncer," which prohibits the creation of large projectiles. 2021-11-27 00:00:55 +07:00
Stargazing Koishi
db8d56cba7
Update BuffId typo 2021-11-26 06:54:56 -08:00
Stargazing Koishi
2217d63dc7
Update new buffs for NPC
The new TentacleSpike buff is allowed
2021-11-26 06:52:30 -08:00
Arthri
a1eaf285cd Merge remote-tracking branch 'parent/general-devel' into fix-invalid-place-style 2021-11-24 09:21:40 +08:00
Luke
8edd0393e5 Initial OTAPI3 port
TODO: sqlite
2021-11-23 20:49:41 +10:00
Lucas Nicodemus
f523d38300 Check RegionProtectGemLocks before enforcing perms
Fixes #2485. Bouncer now checks to ensure that RegionProtectGemLocks is
enabled before attempting to reject changes from gem locks from players
that don't have build permissions.
2021-11-20 18:19:47 -08:00
Arthri
d1459bb1ba Fix spaghetti one liner 2021-08-28 10:42:19 +08:00
Arthri
01d551aa30 Clarify multi-block tiles 2021-08-18 18:39:53 +08:00
Arthri
638b7cc54f Remove multiblock tiles 2021-08-18 17:39:28 +08:00
Arthri
8c5e7b4d47 Polish docs 2021-08-18 17:09:58 +08:00
Arthri
307ff79170 This isnt XML 2021-08-17 23:42:01 +08:00
Arthri
16451ec0e9 Complete docs and polish 2021-08-17 23:41:23 +08:00
Arthri
96f26be50b Complete correctors 2021-08-17 23:11:22 +08:00
Arthri
265cd2012f Transfer checks to a dictionary 2021-08-17 22:37:49 +08:00
Lucas Nicodemus
7b4042bf77 Merge branch 'general-devel' into fix-invalid-place-style 2021-08-16 16:10:41 -07:00
Chris
288698ce42 Some refactoring for variable naming & code flow 2021-08-16 22:14:02 +09:30
Arthri
ab30f5da70 Explain conditions in booster track check 2021-07-29 07:55:15 +08:00
Arthri
ca31a15be9 Add helper method for getting max placeStyle 2021-07-25 16:29:48 +08:00
Arthri
fd3e857f06 Declare BiomeTorchPlaceStyle's purpose 2021-07-25 14:12:17 +08:00
Arthri
de22400b3f Biome Torch check is suppose to check for 0 2021-07-25 14:06:47 +08:00
Arthri
8004b3f079 Declare how biome torch works 2021-07-25 13:55:56 +08:00
Killia0
9b249d72a8
Merge branch 'general-devel' into upstream-general-devel 2021-07-24 19:48:54 -04:00