Commit graph

184 commits

Author SHA1 Message Date
Patrikkk
f5e1510f58 Bouncer OnTileEdit - Add new personalstorage tiles for ssc check.
We do not allow piggybank and safe to be placed if SSC is enabled.
The DefendersFroge and VoidVault have the same functionality as far as I know. So adding these two missing tiles.
2020-06-12 00:56:51 +02:00
Patrikkk
f81155dac1
Merge branch 'general-devel' into bounceronnewproj 2020-06-09 17:11:58 +02:00
Patrikkk
5decc50bd9 Bouncer OnNewProjectile - Add checks on directional projectiles.
**This commit does not have any effect on actual gameplay as of current project state, but it does let valid projectile creation pass through instead of getting caught up in Bouncer. That catch is currently disabled for the time being, until all valid projectile creation check is added.**

Things would have get caught up in our bouncer eversince 1.4. We commented out the catch (the disable and handling) for now, but none of these new projectiles were added to let them pass.
Renaming stabProjectile to directionalProjectile. Adding staffs to directionalProjectiles
Adding check for GolfClubHelper projectile.

Left in a debug check for golfball projectile. I would want to see if the reject gets triggered in a proper server enviroment. I didn't want to handle the projectile just yet.
Adding GolfBallItemIDs list in Handlers.LandGolfBallInCupHandler.cs
2020-06-09 14:04:27 +02:00
Patrikkk
6c22cfd57c Bouncer OnTileData - Add more checks on ReplaceTile/ReplaceWall 2020-06-09 00:39:04 +02:00
Patrikkk
0d0641c8c0 Bouncer OnTileEdit - Adding more checks on ReplaceTile action. 2020-06-09 00:23:23 +02:00
Patrikkk
4f66e660d4 Bouncer OnTileEdit - Add tile replace action to tileban check.
Tiny change, but a pressing matter. My smallest PR ever? hahah.
2020-06-09 00:01:57 +02:00
Chris
ff38075426
Merge branch 'general-devel' into patch-14 2020-06-07 12:41:49 +09:30
Patrikkk
156cf4930b FishOutNPC - Fix some rods not fishing out NPCs.
I was wrong, not all bobbers are named "Bobber".
Just found that Projectile now has an extra field which determines if the given type is a bobber. This field is set in Projectile.SetDefaults method in the following logic
`((type >= 360 && type <= 366) || type == 381 || type == 382 || type == 760 || type == 775)`
I think it is reasonable to use the bobber field, as it would be updateproof too.
Tested and working. Fixes #1985
2020-06-06 22:28:37 +02:00
moisterrific
e90d84be02
Condense if/else statements
And clean up OnNPCStrike while I'm at it
2020-06-05 11:53:21 -04:00
moisterrific
e009febdca
Add config defined threshold kicks to Bouncer
along with various other minor refinements
2020-06-04 22:25:34 -04:00
Patrikkk
00161088e7 OnFishoutNPC - Use ConsoleDebug for message. 2020-06-04 12:25:55 +02:00
Patrikkk
2fd5941821 OnFishout - Fixing #1985 - Making debug messages clearer. Modifying redundant check.
The actual issue was a missing `!` beind IsInRange. If player was doing a valid fishing event, it handled the NPC spawning.
I've split up the checks to make clearer debug messages.
Main.projectile objects are never null. Bobber projectile is never killed when the FishOutNPC event occurs. The projectile type in the check can only be 0 if no recent projectile found that has the name Bobber.
2020-06-04 12:23:48 +02:00
Patrikkk
e738d8e794 Implementing SyncTilePickingHandler. Patching tile damage related exploits.
With this packet, players could kick all players by sending invalid world position data.
2020-06-02 19:20:27 +02:00
Chris
a661841448 Hello sir you dropped your ident 2020-06-02 19:37:03 +09:30
Chris
7b316f3cd5 Refactor LandGolfBallInCupHandler to use IPacketHandler<TArgs> 2020-06-02 19:35:53 +09:30
Patrikkk
0a1f608a3a Fix conflict resolve merge. Make project buildable.
Had a duplicate HandleSyncRevengeMarker method.
2020-06-02 11:59:24 +02:00
Patrikkk
f9c59bb023
Merge branch 'general-devel' into handlegolfpacket 2020-06-02 11:53:32 +02:00
Patrikkk
d919c11add
Merge branch 'general-devel' into handlegolfpacket 2020-06-02 11:52:32 +02:00
Chris
7c98a7b19a Missed a refactor 2020-06-02 19:19:49 +09:30
Patrikkk
3cc8a75b9b
Merge branch 'general-devel' into emojipacketevent 2020-06-02 11:21:19 +02:00
Patrikkk
acdbfecaf1 EmojiHandler - Adding requested PR changes. Changing debug message. Fix wordings. 2020-06-02 11:20:04 +02:00
Patrikkk
f7a8695c8f
Merge branch 'general-devel' into handlegolfpacket 2020-06-02 11:15:17 +02:00
Chris
c7a6d044f4 Minor refactors 2020-06-02 17:19:00 +09:30
Chris
48d610d33f Move netmodule handling into handlers namespace
Add handler for teleport pylons, and permission for teleport pylons
2020-06-02 12:59:14 +09:30
Chris
5b72ff6c0a Add IPacketHandler 2020-06-02 10:44:10 +09:30
Patrikkk
c94d15e634 Commit EmojiHandler.cs and register OnEmoji hook. 2020-06-01 15:31:45 +02:00
Patrikkk
4944ee3144 Implement Handler.LandGolfBalInCupHandler and handle packet exploits.
Added multiple checks to prevent clients from sending the golfball packet directly, without having golf play actions.
2020-06-01 12:59:40 +02:00
Chris
26aac0dab9
Merge branch 'general-devel' into fishoutnpc-event 2020-06-01 18:58:06 +09:30
Lucas Nicodemus
dff5f043aa
Merge branch 'general-devel' into fix-bugs 2020-06-01 02:21:21 -07:00
Chris
9fb27543b9 Some refactoring from feedback 2020-06-01 18:35:58 +09:30
Chris
e658af32ef merge general-devel into fix-sts 2020-06-01 15:21:55 +09:30
Lucas Nicodemus
6ca9a98a91
Bump max player damage to 42,000 for empress of light
Based on feedback from #1936, empress of light needs to do more damage,
so we're going to boost it to a higher arbitrary number than it was
before.
2020-05-31 13:11:01 -07:00
Patrikkk
1398b1e079
Merge branch 'general-devel' into fishoutnpc-event 2020-05-31 15:52:59 +02:00
Lucas Nicodemus
ac76ccf589
Fix doors in the lamest way possible (!)
Fixes #1774.

This commit is designed to fix the clientside door desync issue. Based
on the order of events that I've been able to see, the way that door
opening works is like this:

1. Client sends a door open request.
2. Server echoes request back to client.
3. Both server and client simulate door opening.
4. The client that requests the initial door open sends a tile square to
the server for some reason.

In TShock, under all circumstances, we send a tile square back to the
client that sends one in, unless you have the
`tshock.ignore.sendtilesquare` permission. This adds a deviation: it
does not network data back if the event is just a door change. Doing
this is safe from the perspective of actual gameplay. A previous
iteration of this commit synchronized data to other clients, but that
seemed superfluous.

This does not really solve the underlying problem or answer the question
as to why sending a tile square back to the client seems to throw it
off, but it does. I was not able to replicate the desync issue anymore
with this branch. I expect that it will be safe to keep, because the
improved logic will only happen if the tile square had no effective
changes in addition to the door changes.
2020-05-31 00:40:03 -07:00
Zack
c999b4305c
Remove Console debug output. 2020-05-30 11:58:59 -04:00
Olink
96c7453b33 Merge branch 'general-devel' of github.com:Pryaxis/TShock into fix-bugs 2020-05-30 11:54:09 -04:00
Patrikkk
9a49f6ad15
Merge branch 'general-devel' into fishoutnpc-event 2020-05-30 10:53:51 +02:00
Patrikkk
791a6be831
Add additional FoodPlatter event check. Update range check. (#1941)
This is a combination of 3 commits:

* @Olink was right. Adding additional check. Modifying range check.

There are two ways to place food into a plate. One is by having it in hand (mouse) and right clicking, the other is by having the item selected in the... "inventory bar"(?) and right clicking the plate.

Tested range, if player is outside the range, they should not get their item back.

* FoodPlatterHotfix - Update IsInRange range value.

To suggestion of Olink, to consider player lag and increase the range check.

Co-authored-by: Lucas Nicodemus <shank@shanked.me>
2020-05-30 00:39:40 -07:00
Lucas Nicodemus
61e7d10941
Merge branch 'general-devel' into patch-5 2020-05-30 00:02:27 -07:00
Lucas Nicodemus
f82ab41a25
Add /sync command to alleviate door related sadness
Run /sync if your doors disappear. This will resync your local client
with the server state. For more information, please see the associated
changelog entry.
2020-05-29 21:04:48 -07:00
Olink
6355f2d9ea Merge branch 'general-devel' of github.com:Pryaxis/TShock into fix-bugs 2020-05-29 17:04:00 -04:00
Olink
50337a1d2f Add support for all rope coil types. 2020-05-29 17:03:48 -04:00
Patrikkk
47dd4a4345 FishOutNPC - Simplify bouncer logic. Fix check in event. 2020-05-29 12:00:33 +02:00
Chris
d4a0f47e45 WIP - splitting STS into new class and processing methods 2020-05-29 14:05:43 +09:30
Patrikkk
695ca52a9a Fix FishOutNPC bouncer debug message. 2020-05-29 03:27:19 +02:00
Patrikkk
9cd4670436 Add FishOutNPC event handler. 2020-05-29 03:25:11 +02:00
Patrikkk
0fa8ae13d7 Implement FoodPlatter placing event.
This is called when a player is placing a fruit (item) in a plate.
Adding checks to see if they have permission to place or replace a fruit in the item.
Checks if they are within range. And a check to see if they are legitimately placing the item from their hand, and not by sending a raw packet.
2020-05-28 19:24:28 +02:00
Olink
079541d4c9 Initial working commit. 2020-05-27 23:05:45 -04:00
moisterrific
0d2b591760
Update NPCAddBuff to include Sparkle Slime debuff
It's a new cosmetic debuff added in 1.4, like Wet and Slimed that can be applied to Town NPCs. Wiki: https://terraria.gamepedia.com/Sparkle_Slime_Balloon
2020-05-26 13:45:31 -04:00
Lucas Nicodemus
ad82afd800
Merge branch 'general-devel' of github.com:Pryaxis/TShock into general-devel 2020-05-24 14:06:17 -07:00