Commit graph

3367 commits

Author SHA1 Message Date
Lucas Nicodemus
92f8095277
Read extra data for kill portal 2020-05-18 00:00:55 -07:00
Lucas Nicodemus
0a95457a7e
Merge branch 'general-devel' of github.com:Pryaxis/TShock into general-devel 2020-05-17 23:48:55 -07:00
Lucas Nicodemus
12d40e98ad
Disable always return on HandleLoadNetModule
As of 1.4.x.x, these are used for more than just chat text and we need
to start handling them separately. The original check here would just
return true (handling the event) for any module that's not text. Now, we
need to actually do processing and check for exploits on these.
2020-05-17 23:47:29 -07:00
Chris
ea53fdf04a Merge branch 'general-devel' of https://github.com/Pryaxis/TShock into general-devel 2020-05-18 15:47:40 +09:30
Chris
c2e3f65a2a Add modeling to new projectile handling 2020-05-18 15:47:31 +09:30
Lucas Nicodemus
926f97b49f
Update OnTeleport hook with new changes 2020-05-17 23:17:03 -07:00
Lucas Nicodemus
16df9bb16c
Update "spawn boss invasion" get data handler
This is really "spawn arbitrary stuff" and it can create invasions,
pets, and bosses now.
2020-05-17 22:44:10 -07:00
Chris
ea6425a2e2 Update Bouncer/Item Bans refs for new models 2020-05-18 14:45:36 +09:30
Chris
db84a9fc8f Adds models for the random bitsbyte data received in packet 13 - player update 2020-05-18 14:42:29 +09:30
Patrikkk
f48a18aa7a Fixing my random if logic.
Really.. time for bed.
The Any wasn't terrible, but itwould have allow cross sending projectiles within that dictionary. (send gold stab with copper in hand, or vice versa etc)
2020-05-18 02:44:39 +02:00
Patrikkk
91e3ebf4f0 Fix false cheat catch on stab items.
Stab items (swords) now send projectiles to imitate directional stabbing. Bouncer catched since there was no handling of these new projectiles.
2020-05-18 02:37:39 +02:00
Patrikkk
a02f959f58 Update Buff related packets
Buff IDs no longer fit in a byte. Vanilla reads/writes ushorts but they get converted to int.
- Added helptip for Zone4 in playerzones eventargs.
2020-05-18 02:02:02 +02:00
Patrikkk
3b3fa9fc72 Update Modify Tile packet.
Only updating. Did not patch any possible exploits. Requesting someone to tend to this when possible.
2020-05-18 00:41:12 +02:00
Patrikkk
2d5166cfa4 Updating SpawnPlayer and PlayerUpdate packet
Fixing the HasHackedItemStacks method by adding missing Void Vault check.
2020-05-18 00:04:49 +02:00
Patrikkk
9a05678933 Updating HandleProjectileNew
Packet structure order is different in 1.4
2020-05-17 21:41:31 +02:00
Lucas Nicodemus
1078b579c4
Incorporate @Patrikkk's changes over Axeel's
The TSAPI that Patrikkk has does not contain public fields for the
referenced GameMode types.
2020-05-17 11:58:21 -07:00
Lucas Nicodemus
96468871a0
Merge branch 'general-devel' into 1.4 2020-05-17 11:14:42 -07:00
鱼鱼
01cf85c9ad use GameModeID instead of other consts 2020-05-17 21:46:03 +08:00
鱼鱼
1ed95c737e pass compile; add void vault code 2020-05-17 21:38:47 +08:00
鱼鱼
43f586cde5 Merge branch 'general-devel' of https://github.com/Pryaxis/TShock
 Conflicts:
	CHANGELOG.md
	TShockAPI/GetDataHandlers.cs
	TShockAPI/TShock.cs
2020-05-17 21:38:07 +08:00
Lucas Nicodemus
1993900159
Move OnTileEdit ban checks: Bouncer -> Itembans
This change moves the ban checks used to determine, during TileEdit
events, if an item is banned, out of Bouncer and into the newly isolated
ItemBan subsystem. Rather than creating a large pull request for all of
these, I'm just going to create a series of commits and send them in one
at a time. This should result in about one PR per hook that uses item
bans that needs to move.
2020-05-16 21:50:28 -07:00
Lucas Nicodemus
b5f95d5918
Fragments: Separate out item bans (#1595)
* Remove commented out warning disable

* Add initial ItemBans segregation infrastructure

* Add shell for initial OnSecondUpdate stuff

* Add comments yo

* Remove duplicated logic

* Split out more item ban code

This part of the fragments work is primarily aimed at reducing the
complexity of OnSecondUpdate in TShock and moving that check out into
the ItemBans subsytem.

Of major note in this is the removal of "check", which was a string
variable that tracked state and replacement of many of the item ban
activities with sane private methods that are at least somewhat
sensible. Obviously there's a lot to be desired in this system and I'm
really going for a run here by trying to continue a branch from so long
ago that I barely even remember the whole point of existence.

Still to do: GetDataHandlers related item ban code needs to be moved
into its own hook in the ItemBan system. Finally, there is a downside to
some of this: we're basically iterating over players again and again if
we keep this pattern up, which is kinda lame for complexity purposes.

* alt j: comment changes

* Move item ban check out of main playerupdate check

Separates out item ban logic from the rest of GetDataHandlers so that
item bans is more isolated in terms of what fragments is asking for.

* alt-j: convert indentation to tabs

* alt-j: fix botching source code

* Move item ban related chest checks out of gdh

* Remove chest item change detection from item bans

It doesn't do anything. If a user removes an item from a chest, it
bypasses this check. If a user adds an item to a chest, the server seems
to persist the change anyway, even if the event is handled. That's a bug
for sure, but fundamentally, it's not the item ban system's fault.

* Revert "Remove chest item change detection from item bans"

This reverts commit 758541ac5c4d4096df2db05ba2a398968113e1e4.

* Fix logic issues related to item ban handling

Re-implements chest item handling and correctly handles events and
returns after setting handled event state.

* Remove TSPlayer.HasProjectilePermission

In infinite wisdom, it turns out this is not a good method for TSPlayer
to have. It just checks the states of things as per what the item ban
system says is banned and then creates implicit relationships to the
projectile ban system.

Doing this effectively knocks down another external reference to the
item ban system outside of the context of the implementation for the
system itself and its related hooks.

This commit also adds context around what the heck is going on with some
of our more interesting checks as per discussions in Telegram with @Ijwu
and @QuiCM.

* Update changelog

* Remove useless ref to Projectile.SetDefaults

* Change item ban to ban based on ID not strings

I think I was so confused as to why we were passing strings everywhere
that I just felt inclined to continue the trend in previous commits.
2020-05-16 16:27:34 -07:00
Lucas Nicodemus
76150e2500
Provide warning message on invalid group command
This fixes #1742 where users could run group commands that didn't exist
and the server would silently fail rather than giving an error.
2020-05-13 21:10:01 -07:00
moisterrific
6007edeb77
Fix BoC false positive kick in NPCAddBuffTimeMax
360 ticks = 6 seconds, according to the wiki, the max possible duration is proportional to dmg taken, so 7.5 seconds would be the max duration (aka 450 ticks)
2020-02-07 16:14:27 -05:00
moisterrific
f50aba8ba6
Fix for Vortex armor set stealth flicker bug
tests on my end showed it fixed, plz confirm as well
2020-01-10 17:55:49 -05:00
Chris
e3bac1871a
Update Bouncer.cs
Removes double occurrence of daybreak buff from dictionary.
Thanks for pointing this out @AxeelAnder
2019-07-18 13:54:20 +00:00
Chris
ad28771e2c Update players when they die to hopefully stop their items floating at their grave 2019-03-30 16:31:20 +10:30
Chris
34a4ef3b7d Remove healing when disabled 2019-03-30 16:25:30 +10:30
Chris
29fb74e578 Add a check for NPC Item strike packets (solves #1651) 2019-03-30 16:02:50 +10:30
Chris
1dc320dbae Update to Newtonsoft JSON v10.0.3 for parity with OTAPI/TSAPI 2019-03-30 15:47:14 +10:30
Chris
42fb0b10f4 Add bounds checking for packet 51, type = 4 2019-03-30 15:46:46 +10:30
Chris
ac02468038 Update dead packets 2019-03-30 15:09:40 +10:30
Lucas Nicodemus
60f0c3c9df
Merge branch 'general-devel' into backport-verison-tick 2019-03-29 20:45:16 -07:00
Lucas Nicodemus
f30f44d00d
Merge branch 'general-devel' into backport-verison-tick 2019-03-29 20:41:51 -07:00
Chris
9b75342bff
Merge branch 'general-devel' into player-data 2019-03-30 13:58:19 +10:30
Chris
f3627bb45a
Merge branch 'general-devel' into fix-1653 2019-03-30 13:52:25 +10:30
Chris
1ae2e34128
Merge branch 'general-devel' into player-data 2019-03-30 13:47:33 +10:30
Chris
76eeab1090
Merge branch 'general-devel' into fix-1653 2019-03-30 13:46:12 +10:30
Chris
429a5051fd
Merge branch 'general-devel' into general-devel 2019-03-30 13:36:28 +10:30
Lucas Nicodemus
6fce167c10 Verison Tick: TShock 4.3.26 2019-03-29 17:51:35 -07:00
Lucas Nicodemus
fec0d80be6 Verison Tick: TShock 4.3.26 2019-03-29 17:47:17 -07:00
Lucas Nicodemus
f3e33b7ad7 Remove the stat tracker
The stat tracker has been offline for the last several weeks/months and
nobody has done anything to fix that. Because of that, GDPR, and the
fact that we haven't used it, we're discarding it.
2019-03-29 17:46:44 -07:00
Lucas Nicodemus
79f142f908 Change current TShock codename to "Zombie"
This change incorporates feedback from #1661 which indicates
that we should update the source code when changing copyright
dates.
2019-03-29 17:27:34 -07:00
Lucas Nicodemus
70dd72443d Update copyright to 2019 again
Fixes #1658, most likely.
2019-03-29 17:16:37 -07:00
Tyson Strange
6315086cb1 Added to Bouncer NPCAddBuffTimeMax for Solar Eruption Item ID: 3473, Daybreak Item ID: 3543 2019-02-03 17:41:23 +10:00
Tyson Strange
12c34256ac Added confused debuff for Brain of Confusion 2019-02-03 15:56:43 +10:00
Tyson Strange
2440e044b1 Added confused debuff for Brain of Confusion 2019-02-03 15:55:19 +10:00
Chris
550967b430
Merge branch 'general-devel' into player-data 2018-12-24 13:57:10 +10:30
Chris
9975c445f8
Proposed fix for #1653 - Testing required
From #1653:
>From latest version (2301)
If a player puts on a banned peice of armour, they get the message to say "You are wearing banned equipment"
After they take it off, the messages stop, but they keep getting disabled.
Solution:
Approx line 1131 in tShock.cs on `OnSecondUpdate` the `tsplayer.IsDisabledForBannedWearable` gets set to true, but it never gets set to false.
Change:
```csharp
if (check != "none")
player.IsDisabledForBannedWearable = true;
```
>To:
```csharp
if (check != "none")
player.IsDisabledForBannedWearable = true;
else
player.IsDisabledForBannedWearable = false;
```

Requires testing
2018-12-24 13:54:39 +10:30
AxeelAnder
eae1ba5a5c concrete reason when create banned projectile 2018-10-31 18:02:53 +08:00