MyPet icon indicating copy to clipboard operation
MyPet copied to clipboard

Add option to decrement respawn time if pet is stored.

Open OasisArtisan opened this issue 4 years ago • 5 comments

I've setup a configuration where pets can have hours until they respawn to encourage caring about your pet's life, so my players were complaining that they could not use other pets when a pet dies because then the respawn timer for their dead pets would not decrement.

So I added this option to my server

Just thought to share it here in case you want to add it as well.

OasisArtisan avatar Jun 05 '20 02:06 OasisArtisan

This is a great idea!

scomans avatar Jun 05 '20 09:06 scomans

Ways to achieve this feature

  1. The way you suggested. (Update only when we load/display)

  2. Load all pets for online players in RAM and we access it through the API using PlayerManager or MyPetManager, then save it to the database periodically. (Maybe this can be too much RAM usage for big servers with many pets per player idk)

  3. Use the same code I posted but increase the update interval from 5 seconds to maybe 1-5 minutes.

OasisArtisan avatar Jun 05 '20 11:06 OasisArtisan

I guess option 2 would be the only way to have it consistend and don't do frequent updates 🤷‍♂️

scomans avatar Jun 05 '20 11:06 scomans

I hope this will be optional to turn on. I'm not so sure I like the idea of pets having their count-downs progress when they aren't the ones in focus. Kind of defeats the purpose if you ask me, but that's my opinion.

zerafox avatar Jun 05 '20 13:06 zerafox

It will be opt in only

scomans avatar Jun 05 '20 13:06 scomans