Commit graph

3552 commits

Author SHA1 Message Date
moisterrific
e90d84be02
Condense if/else statements
And clean up OnNPCStrike while I'm at it
2020-06-05 11:53:21 -04:00
Chris
3d018a27af
Merge branch 'general-devel' into patch-14 2020-06-05 12:17:42 +09:30
Chris
5e3f70382d
Merge branch 'general-devel' into patch-13 2020-06-05 12:09:14 +09:30
moisterrific
e009febdca
Add config defined threshold kicks to Bouncer
along with various other minor refinements
2020-06-04 22:25:34 -04:00
Patrikkk
bcdd0dc8be GetDataHandler - Add missing PlayerInfo data. 2020-06-05 03:46:04 +02:00
moisterrific
fa6a39aafe
Add KickOnThresholdBroken for more thresholds
There's KickOnDamageThresholdBroken but no option for kick for other thresholds, thought I should add it.
2020-06-04 20:51:00 -04:00
Lucas Nicodemus
c8aa67ec4d
Merge branch 'general-devel' into patch-12 2020-06-04 17:26:58 -07:00
Patrikkk
739fa69571
Merge branch 'general-devel' into fixfishoutnpc 2020-06-04 12:28:12 +02: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
Chris
fe4679ba95 Remove invalid dictionary entries in CreativePowerHandler 2020-06-04 19:40:41 +09:30
moisterrific
91c3557610
Change DebugLogs to true by default
Given that this is a pre-release and it no longer makes the CLI unreadable I think it should be on by default to make troubleshooting easier.
2020-06-03 22:54:51 -04:00
Patrikkk
7487afafb6 SyncTilePickingHandler - Remove redundant check. Properly document method. 2020-06-02 19:26:25 +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
Patrikkk
cffdadbc80 Fix previous conflict resolve merging. 2020-06-02 19:10:34 +02:00
Patrikkk
60840807cf Merge branch 'general-devel' into handlesynctilepicking 2020-06-02 19:08:26 +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
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
Patrikkk
f7a8695c8f
Merge branch 'general-devel' into handlegolfpacket 2020-06-02 11:15:17 +02:00
Patrikkk
f674e78308 LandGolfBallInCup - Use ConsoleDebug. Modify display message. 2020-06-02 11:13:02 +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
2177d75066 Add SyncTilePicking event. 2020-06-01 18:31:30 +02:00
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
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