Commit graph

359 commits

Author SHA1 Message Date
Chris
39e13f74d6 Remove TShock.Itembans in favour of TShock.ItemBans 2020-11-13 19:22:10 +10:30
Chris
77fd8c9c9f Add calculated rollback rectangle for tile edits 2020-11-13 18:32:52 +10:30
Chris
ca38d64632 The great refactoring! Squares to Rectangles 2020-11-13 17:46:00 +10:30
Quinci135
253c239f86
Add missing comma 2020-10-14 15:45:43 -07:00
Quinci135
50e0bf0290
Added 1.4.1.0 player inflicted debuffs to bouncer
OnFire3/Hellfire - New magma stone debuff that deals 15 dps instead of 4 dps
Frostburn2/Frostbite - Frost armor new set bonus 25 dps instead of 8 dps
BoneWhipNPCDebuff - Debuff applied from new Spinal Tap whip
2020-10-14 15:21:16 -07:00
Edoan
838d55a737
Updated GravediggerShovel ID
Co-authored-by: Chris <2648373+QuiCM@users.noreply.github.com>
2020-07-07 21:49:08 -03:00
Edoan
c285b50d9f Add Graveyardigger's Shovel support 2020-07-05 13:17:08 -03:00
Lucas Nicodemus
0cfe670038
Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 21:57:00 -07:00
Patrikkk
05829dee3b Missing parenthesis from an if logic. Fix Tile placement reject. 2020-06-25 17:08:58 +02:00
Patrikkk
d4e4692d8b Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 13:41:14 +02:00
Patrikkk
38a1351d38 Register DisplayDollItemSyncHandler.
Moved the type check for 0 before itemSetDefaults to have less code run if the empty slots are clicked.
2020-06-25 01:42:22 +02:00
Patrikkk
972483340a
Merge branch 'general-devel' into addtileentityinteraction 2020-06-18 23:57:40 +02:00
Rustly
0a01ae6d83
Merge branch 'general-devel' into general-devel 2020-06-18 16:53:14 -05:00
Patrikkk
c418dda42c Add RequestTileEntityInteractionHandler. Check Mannequin modif perms.
Users can no longer open a Mannequin if they do not have building permissions at the position of the Mannequin.
(Mannequins work as a chest since 1.4)
2020-06-18 17:08:14 +02:00
Rustly
01bae0475d apply the rest of fixes for snake flute, prevent players from seeing the npc perm error on join 2020-06-15 13:32:42 -05:00
Rustly
013ef4ce98 fix snake rope thingy 2020-06-15 12:37:49 -05:00
Patrikkk
865748fedf
Merge branch 'general-devel' into removebouldercheck 2020-06-13 22:58:36 +02:00
Patrikkk
a80e88b85b
Merge branch 'general-devel' into ontileeditcleanup 2020-06-13 12:13:20 +02:00
Patrikkk
2ed9e320c1 Bouncer OnTileEdit - Remove redundant Boulder placement check 2020-06-13 11:58:36 +02:00
Patrikkk
6bad423d6a
Merge branch 'general-devel' into addpersonalstoragecheck 2020-06-12 14:29:39 +02:00
Patrikkk
e2fad8e77e
Merge branch 'general-devel' into ontileeditcleanup 2020-06-12 14:28:48 +02:00
Patrikkk
c03ac50f81 Bouncer OnTileEdit remove personal storage SSC check.
We are covering/tracking these features properly now in SSC, thus they are unnedded.
2020-06-12 10:38:13 +02:00
Patrikkk
822579277b
Update TShockAPI/Bouncer.cs Add space to comment
Co-authored-by: Lucas Nicodemus <shank@shanked.me>
2020-06-12 10:12:38 +02:00
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
51a0732f0c Bouncer OnTileEdit - Code cleanup
I moved the block that checks for max tile and wall types to the start of the method where it checks for the editData (type) being smaller than 0.
I merged these checks, so it gets caught under the same hood.

We had a block that was a bit chaotic and hard to understand.
I've split it up so its a bit clearer. It checks if the tile data that is being placed, comes from the item they are selecting. There were additional checks merged in it, because terraria does not set the createTile of some items, so without the check it would have get caught as invalid placement.
I added a valid placement check for one of these, which is the Ice Rod/Ice block placement.
Handle action if the player is using icerod but not placing ice block.
There is no need for a check here on Dirtbomb, because the player only sends the projectile, the tiles are being placed by the server.
2020-06-12 00:27:47 +02:00
Patrikkk
fbf7b5791a Bouncer OnTileEdit - Fix issue with placing ropes.
This fixes #1980 .
The issue came from checking for recently created ropecoil projectile. But didn't actually check if the player is holding a ropecoil item.
Because of this, users could not place regular ropes.
2020-06-11 23:41:27 +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