ProjectSWGCore / Holocore

This is the Star Wars Galaxies server emulator for the Java Virtual Machine
https://www.projectswg.com
GNU Affero General Public License v3.0
31 stars 19 forks source link

Player death #1360

Open Undercova opened 1 year ago

Undercova commented 1 year ago

Getting incapped 3x within a 10 min timespan will get your character killed

madsboddum commented 11 months ago

We could change com.projectswg.holocore.resources.support.objects.swg.creature.CreatureObject#lastIncapTime a bit, so instead of being the point in time where the player was incapacitated last, it becomes multiple points in time where the player has been incapacitated (recently).

We should probably only store a certain amount of records in order to prevent a memory leak, though. Seeing as we need 3 for this feature, we could simply store up to 3 and push old records out to make room for new records.

It may also be worthwhile to store java.time.Instant instead of simply Long.