Commit graph

817 commits

Author SHA1 Message Date
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
b5c3b430fa Standardize permission rejection message again 2020-06-02 10:20:13 +09:30
Chris
d46f534533 Standardize permission rejection messages 2020-06-02 10:18:40 +09:30
Chris
badba523e7
Merge branch 'general-devel' into projectilestruct-addition 2020-06-01 19:12:38 +09:30
Chris
a7166536c2
Update projectilestruct to add brief documentation 2020-06-01 19:12:14 +09:30
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
e658af32ef merge general-devel into fix-sts 2020-06-01 15:21:55 +09:30
Olink
96c7453b33 Merge branch 'general-devel' of github.com:Pryaxis/TShock into fix-bugs 2020-05-30 11:54:09 -04:00
Patrikkk
9934a3935d ProjectileStruct - Adding extra data
Can we store the type of the recent projectile as well? This could be used in my upcoming PR regarding the golf packet where I check for recently created projectiles, and their types. Having only the index is not useful in this scenario, because the projectile can already be killed, so cannot access the Main.projectile array to get the projectile type.

Can this be public instead of internal? Developers could make good use of it, instead of having to implement their own version of RecentProjectiles in their plugins.
2020-05-30 11:22:50 +02:00
Patrikkk
9a49f6ad15
Merge branch 'general-devel' into fishoutnpc-event 2020-05-30 10:53:51 +02: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
Olink
fd6913f7df Update GetDataHandlers ExtraValue packet handling to match the network protocol.
Update the validation logic to be accurate:
  * use pixels and not tiles
  * allow master mode
  * use npc position and not player position
Cleanup some style inconsistencies in NetHooks_SendData.
2020-05-29 16:44:03 -04:00
Patrikkk
47dd4a4345 FishOutNPC - Simplify bouncer logic. Fix check in event. 2020-05-29 12:00:33 +02:00
Chris
ecb1a8a4e7
Update GetDataHandlers.cs 2020-05-29 17:14:56 +09:30
Chris
45e5773c23 Fix a read bug on NetTiles that causes tiles to have junk data 2020-05-29 17:12:46 +09:30
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
Lucas Nicodemus
814801d894
Experimentally change spawn rules for #1849
This change applies @AxeelAnder's suggeted patch from #1845 to attempt
to resolve spawn point issues. If you remove your bed spawn point it
should send you back to the map spawn point with this.
2020-05-27 20:24:43 -07:00
Lucas Nicodemus
720feed7af
Fix journey mode / kick on death conflict
This fixes an issue where kick/ban on hardcore/mediumcore death
penalties applied to journey mode characters unintentionally.

Fixes #1901.
2020-05-26 22:22:41 -07:00
Lucas Nicodemus
d1b27d8b7a
Only process journey research updates for SSC mode
This commit changes the logic for sending and accepting journey research
requests -- only processing those requests in SSC makes sense. This
stops sending extra data to clients that may not know what to do with it
when it's not relevant (not in both SSC and journey mode).

This also stops us from accepting erroneous journey mode NPC spawn rate
update requests when journey mode isn't on but SSC is on due to a weird
client glitch in 1.4.0.4.
2020-05-25 01:01:47 -07:00
Lucas Nicodemus
7b8bbd1e16
Fix typos in journey permission checks 2020-05-25 00:48:57 -07:00
Lucas Nicodemus
e9ded60396
Merge branch 'general-devel' into fix-1904 2020-05-25 00:17:35 -07:00
Lucas Nicodemus
9020e2f43f
Merge branch 'general-devel' into fix-1907 2020-05-25 00:16:49 -07:00
Olink
91998deaf3 Add spawn boss packet handlers for pets. 2020-05-25 03:03:29 -04:00
Olink
56b695b80b Add initial support for Journey mode in SSC. 2020-05-25 02:24:03 -04:00
Lucas Nicodemus
6eb8038991
Refactor grammar of permission error 2020-05-24 22:19:10 -07:00
Patrikkk
9a8c2fee0d Merge branch 'journeymode_permissions' of https://github.com/Pryaxis/TShock into journeymode_permissions 2020-05-25 02:13:28 +02:00
Patrikkk
a1621329a3 Add enums for magic numbers. 2020-05-25 02:12:59 +02:00
Patrikkk
1f8ae96229
Merge branch 'general-devel' into journeymode_permissions 2020-05-25 01:47:33 +02:00
Patrikkk
6fa288e5db Read PowerModule netmodule data and check for permissions
Removed leftover from previous commit. Fixed a typeo.
2020-05-25 01:36:26 +02:00
Olink
d04f57d864 Fixes #1867 2020-05-24 17:09:25 -04:00
Olink
39028484f0 Fixes #1890. Added support for two new invasions. 2020-05-24 16:36:13 -04:00
Olink
16d1cdd360 Track projectile updates being sent by the server, instead of received by the server. 2020-05-24 16:00:20 -04:00
鱼鱼
e39af6f917 fix npc home removal. rename something related. 2020-05-24 16:47:54 +08:00
Olink
3105a977a4 Add fluid rockets. 2020-05-24 04:37:15 -04:00
Olink
b73088306d Move the projectile refresh to Bouncer.
Bouncer now has an OnSecondUpdate().
Move projectile created tracking to GetDataHandler from Bouncer.
2020-05-24 04:27:12 -04:00
Olink
965361c406 Add a projectile tracker, so that we can allow fluid bombs. 2020-05-24 03:48:08 -04:00
Lucas Nicodemus
a457e8c9ee
Support lava absorbant sponge (fixes #1852) 2020-05-22 23:22:48 -07:00
Lucas Nicodemus
b87f5d0a1b
Fix probable typo in sundail special perm
This check used & instead of && which is technically possible but
probably not the right thing to do here.
2020-05-22 21:11:37 -07:00
Lucas Nicodemus
f227a2a1e4
Add verbose logging to rest of GetDataHandlers
Should help put the nail in the coffin of many 1.4 bugs
2020-05-22 21:06:16 -07:00
Olink
7d83e06e83 Fix the snake flute item. 2020-05-22 18:02:03 -04:00
Olink
836fd1d156
Fix for spawn issues when using SSC and beds
It looks like the only time the client informs the server of the spawn location is via the PlayerSpawn packet. In SSC, understandably, we don't trust any updates from the client if we can avoid it. In this scenario, we have code in PlayerSpawn to check for beds when they attempt to spawn, but no code to handle negative spawn locations. The client sends -1,-1 coordinates when the player has no spawn. We should trust this.
2020-05-22 14:21:15 -07:00
Axeel
56a9e27365
Fix player respawn again (#1830)
* fix respawn time unit, add spawn bouncer, add respawn time config warning

Co-authored-by: Lucas Nicodemus <shank@shanked.me>
2020-05-21 13:37:31 +08:00
鱼鱼
946d54b69e fix player spawn stuff 2020-05-20 21:27:49 +08:00
Lucas Nicodemus
e6df3edeec
Merge branch 'general-devel' into h/betterlogs 2020-05-19 23:02:46 -07:00
Lucas Nicodemus
e20f717269
Remove reimplementation of Terraria player sync
The reimplementation of Terraria player sync was first created by
@Zidonuke when introducing better antihack and the item ban system. He
added this because he was probably attempting to correct the client that
sent that sent bad data. The primary purpose was to send data back to
the client, not necessarily for the purpose of doing anything for the
server. This is demonstrated by the fact that when we added player
update handling, we started rejecting the packets outright and not
sending the player any packets. This means that functionally we don't
run this code hardly ever if someone is actually disabled.

Some of those code was related to /confuse. That is also being removed.
2020-05-19 22:26:46 -07:00
Lucas Nicodemus
e9098d0e78
Add verbose debug logs to a variety of checks
These are high priority checks we really want to look at. I want to add
more of these debug statements to all checks in Bouncer and other parts
of GetDataHandlers, but I think this is good enough for now.
2020-05-19 22:11:21 -07:00
Lucas Nicodemus
92f8095277
Read extra data for kill portal 2020-05-18 00:00:55 -07:00