Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.41k stars 377 forks source link

All buffs reset when leaving the server (ssc and logins enabled) #2850

Closed TomAltonator closed 1 year ago

TomAltonator commented 1 year ago

Tested with potion buffs and food buffs / debuffs. You can easily test this yourself. Drink a potion (with ssc enabled) then leave and rejoin the server. Buffs will no longer be present. Is the same case for don't starve style hunger. When you leave and rejoin the server, hunger will be reset to 8 mins of peckish.

My guess is this happens because the server considers you logged out when you leave the server and resets everything.

drunderscore commented 1 year ago

FWIW, this is how this has functioned for a long time, so hopefully you are reporting this as more of a feature request than bug report.

Specifically looking at the Don't Starve buffs, I do see how it's a bit weird and pretty wrong.

I do believe a change like this would be cool and something I'd be willing to implement, but would certainly need a configuration option, as it would be a breaking one.

drunderscore commented 1 year ago

I played around with this idea, but the server is so uninvolved in buffs, that it doesn't get crucial information, such as buff duration. Instead, the client just tells the server (who tells all other clients) the buffs you have, and when a buff expires, the client does the same thing again, just without the expired buff.

I did an implementation of it here if you want to check it out, but unfortunately it won't be coming to TShock.