Open mdziekon opened 4 years ago
Hi,
regarding the https://github.com/mdziekon/UniEngine/issues/88. How about changing the line 582 from
if ($resourceCurrentAmount >= $resourceMaxStorage)
to if ($resourceCurrentAmount > $resourceMaxStorage)
?
this way it does not block the resource mysql recalculation when the values are equal.
Worked for me.
Hi @theGroom66, thanks for your suggestion, really appreciate it! I haven't touched this bug in a long time, so I'll have to read that code through again and try to validate if your proposal works fine - resource calculation code can be tricky, especially when it comes to stacked updates. I hope I can get this validated in a couple of days.
As an additional question, what did you do to validate this fix on your end? Did you run some extensive tests? What about your testing environment, if you don't mind sharing that info? Did you run it locally, or on some public/semi-public instance where other people than yourself play the game on a regular basis?
Hi @mdziekon , You're welcome. I was just interested in Your project, so I cloned and ran it to give it a try. I've seen some of Your issues and tried to figure one out. The instance is living on my personal server to used only by me. It is a nice reading, the code, must have been a lot of work. Appreciate it man!
Steps to reproduce
What should happen
What actually happens
Regression tracking
Caused by (PR):
Caused by (relevant code pieces):
https://github.com/mdziekon/UniEngine/blob/1cfbf0ec7cac5272e00a830caa035718cd9363ca/includes/helpers/planets/functions.php#L582-L587