Commit graph

3524 commits

Author SHA1 Message Date
Chris
9dff07e6c2 Refactor EmojiHandler to implement IPacketHandler<TArgs> 2020-06-02 19:18:43 +09:30
Patrikkk
0619092ba5 Fix identing after conflict resolve merge. 2020-06-02 11:41:41 +02:00
Patrikkk
f01274164f
Merge branch 'general-devel' into handlesynccavernmonster 2020-06-02 11:39:11 +02:00
Patrikkk
cd58d79322 Kick player on attempting cavern npc type modification. 2020-06-02 11:34:10 +02:00
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
Chris
21b51c577c This one should use 'Read' instead of 'Load' as well 2020-06-02 17:26:32 +09:30
Chris
c7a6d044f4 Minor refactors 2020-06-02 17:19:00 +09:30
Chris
c9b015027d Rename NetModulesTypes to NetModuleType 2020-06-02 14:28:09 +09:30
Chris
292f310f69 Publicise these handlers 2020-06-02 14:20:03 +09:30
Chris
961c6cd9bc Clean up NetModulePacketHandler a little 2020-06-02 14:18:22 +09:30
Chris
0af69e2bf2 Add ambience handler 2020-06-02 14:17:13 +09:30
Chris
77d04ca4ec Message adjustment 2020-06-02 14:08:07 +09:30
Chris
3b6a9ffcc2 Add bestiary handler 2020-06-02 14:06:18 +09:30
Chris
1c0a649a0c Add handling for liquid net module 2020-06-02 13:34:26 +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
4d1fd54a7c
Respect tile bans for tile objects in send tile square handler 2020-06-02 12:55:46 +09:30
Chris
5b72ff6c0a Add IPacketHandler 2020-06-02 10:44:10 +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
Patrikkk
ce5ee0d623 Add HandleSyncCavernMonsterType
This packet is never sent from the client to the server in a normal scenario. Although with modded clients, a packet can be sent to modify the cavernMonsterType of the server world and have the world spawn defined NPC types. Can be used to have the server randomly spawn bosses on players in caverns.
Is it okay to have this simple handling in GetDataHandlers? A seperate class felt like an overkill.

Moved the HandleSyncRevengeMarker packet handler to it's "correct" position, so I won't have merge issues between my last PR. As I've mentioned there, we have the Packets in their numerical order.
2020-06-01 17:02:27 +02:00
Patrikkk
c94d15e634 Commit EmojiHandler.cs and register OnEmoji hook. 2020-06-01 15:31:45 +02:00
Patrikkk
f538ceb793 Adding EmojiHandler to handle an exploit. Adding sendemoji permission and checks.
I know, this is not something important, but I'm going through the new packets one by one and adding events developers can work with, patching exploits, and thought this could be a core permission.
2020-06-01 15:24:02 +02:00
Patrikkk
2254df21fd Add Emoji event
This is received from the client when they are trying to display an emoji, this comes in to the server, gets processed, and the server sends back the Emote Bubble packet to the clients.
2020-06-01 14:38:29 +02:00
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
2edfef0dfe
Merge branch 'general-devel' into patch-10 2020-06-01 19:04:45 +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
9fb27543b9 Some refactoring from feedback 2020-06-01 18:35:58 +09:30
Chris
0770e3d125 Comment out dangerous debug code 2020-06-01 16:42:11 +09:30
Chris
e030d54bd6 Fix trapdoors too 2020-06-01 16:40:34 +09:30
Chris
e658af32ef merge general-devel into fix-sts 2020-06-01 15:21:55 +09:30
Chris
36089d96bb Fix doors for real this time.
Should also fix tile entities (such as item frames, pylons) and other tile objects.
Further, fixes a longstanding issue with SendTileSquare that resulted in half squares being sent instead of full squares, causing visual bugs and desyncs most noticeable with doors
2020-06-01 15:12:45 +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
moisterrific
1cb72718c2
Add more bosses to /spawnboss
Add more bosses that has health bars/map icons to the command parameters. Added Lunatic Cultist to /spawnboss "all". Did not include Dark Mage or Ogre bosses since they have two different tier versions. Also added some abbreviations to existing bosses.
2020-05-30 17:57:16 -04: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
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
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
01e3f9c58d
Merge branch 'general-devel' into general-devel 2020-05-30 00:32:57 -07:00
Lucas Nicodemus
a0726ad8bb
Merge branch 'general-devel' into patch-7 2020-05-30 00:18:44 -07:00
Lucas Nicodemus
efeb8b6167
Merge branch 'general-devel' into patch-6 2020-05-30 00:11:18 -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
Lucas Nicodemus
44ad2d2eff
Remove extra debug info from OnGetData
Per packet debug logs are redundant for people with the packet monitor
plugin. If you need packet monitoring, please install the packet monitor
plugin.
2020-05-29 19:52:03 -07:00
Olink
6355f2d9ea Merge branch 'general-devel' of github.com:Pryaxis/TShock into fix-bugs 2020-05-29 17:04:00 -04:00