Commit graph

853 commits

Author SHA1 Message Date
Chris
76ea1760fd
Merge branch 'general-devel' into pscheck 2021-04-22 13:16:40 +09:30
quake1337
207b43e772 Update /godmode to use JourneyMode Godmode power.
- Previous Bouncer checks for GodMode (namely, Hurt) were removed.
- The command now uses the GodmodePower from core Terraria
- The toggle powers (which this command will now make use of) are now
  reset on disconnect to prevent accidentally "gifting" godmode to an
  unsuspecting player.
2021-04-16 06:11:26 +02:00
Chris
3664b81c3f
Merge branch 'general-devel' into pscheck 2021-04-13 16:32:14 +09:30
Stealownz
bc32eab4c8 Update GetDataHandler.HandleProjectileNew to include HasBannerIdToRespondTo 2021-04-05 10:45:41 +08:00
Chris
85fbf593c9 Implement place style checks, courtesy of @AgaSpace 2021-03-22 10:29:09 +10:30
Chris
9423febd0a Refactor for new configuration 2020-12-03 17:43:10 +10:30
Chris
3776a71a20 Handle SyncExtraValue all the time
This may prevent platinum coin duping
2020-12-03 14:26:13 +10:30
Chris
ca38d64632 The great refactoring! Squares to Rectangles 2020-11-13 17:46:00 +10:30
Stealownz
8969ce4a94 Add Torch God's Favor to SSC
Closes #2031
2020-11-01 22:55:50 +08:00
Patrikkk
d4e4692d8b Merge branch 'general-devel' into addtileentityinteraction 2020-06-25 13:41:14 +02:00
Patrikkk
89ab7be0f8 TileEntityInteraction - Pass TileEntity object instead of ID in args. 2020-06-25 01:51:30 +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
90dd61e668 Moving the DisplayDollItemSync hook inside null check.
In crafted (hacked) packet sending, people could send the DisplayDollItemSync packet with an entity ID that is not actually a display doll. This would not happen in a normal scenario.
If they send the crafted packet, our hook would have been invoked and it would have contain a null TEDisplayDoll object since we tried to get the TileEntity object as a TEDisplayDoll object.
2020-06-21 15:03:08 +02:00
Patrikkk
408eaf4383 Add TEDisplayDoll object to the event args. 2020-06-19 14:16:27 +02:00
Patrikkk
69f232b12a Adding DisplayDollItemSync event.
An event that is called when a player modifies the slot of a DisplayDoll (Mannequin).

I was trying to think from a developer friendly perspective here.
Instead of passing seperate variables for type/stack/prefix, thought I pass an Item object.
As well as, instead of having devs who work with this hook figure out and implement how to get the Item of the DisplayDoll, I just provide it in the hook.
I can imagine this being used for creative purposes in plugins.
2020-06-19 14:07:39 +02:00
Patrikkk
3012c92370 GetDataHandlers - Add RequestTileEntityInteraction hook. 2020-06-18 16:48:22 +02:00
Patrikkk
11a2a3e21b GetDataHandler - Code formatting. Modify order of Handler to respect PacketType value. 2020-06-18 16:34:33 +02:00
stacey
067006a092
Add clarity to !HasPermission error messages
And a few other minor formatting/grammar changes.
2020-06-13 13:13:46 -04:00
Patrikkk
bcdd0dc8be GetDataHandler - Add missing PlayerInfo data. 2020-06-05 03:46:04 +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
Patrikkk
0a1f608a3a Fix conflict resolve merge. Make project buildable.
Had a duplicate HandleSyncRevengeMarker method.
2020-06-02 11:59:24 +02:00
Patrikkk
d919c11add
Merge branch 'general-devel' into handlegolfpacket 2020-06-02 11:52:32 +02:00
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
f7a8695c8f
Merge branch 'general-devel' into handlegolfpacket 2020-06-02 11:15:17 +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
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
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
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
26773f61a2 Add LandGolfBallInCup event handler. 2020-06-01 12:07:57 +02:00
Patrikkk
20620f2b47 PacketType handler delegate organization.
We have the elements in GetDataHandlerDelegates dict in order by its packet type.
2020-06-01 11:54:59 +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
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