OpenThrone / OpenThrone

Other
4 stars 1 forks source link

Battle upgrades displaying incorrect values #73

Open ghost opened 1 month ago

ghost commented 1 month ago

When purchasing battle upgrades, I went to the page and it displayed 52 Guard Towers. After purchasing 9, it shot up to 93.

https://i.imgur.com/HCiyons.jpeg

After purchasing 9 guard towers: https://i.imgur.com/tWfOIx9.jpeg

uaktags commented 1 month ago

Can't reproduce. Make sure that the page is fully refreshed or atleast you've clicked the reload next to the "Stats". This is only expected to happen in the event where you have two tabs/windows open, and purchase X amount on one window and then do the same on the other tab/window. When you purchase on the first tab/window, it'll instantly update to the new value, while the other t/w will still be on the old value. Then when you purchase on this other t/w, it'll increment by the amount you typed but from the amount that is in the database and listed on the other t/w.

ghost commented 1 month ago

It still appears I'm having the same issue.

So I logged out, fresh browser, log back in.

Guard Towers shows 446. Purchase 1, but now shows I have 459.

It doesn't seem like refreshing the page changes the value displayed. Only when I purchase I get a jump in what's displayed.

Anything I can do to provide more context or something helpful?

uaktags commented 1 month ago

Hmm, and clicking the reload icon on the stats doesn't change anything? I was able to login as you and can confirm it was showing back to 446 again for me, I did the reload icon on stats, and it updated to 459. I was then able to purchase 1 and it incremented to 460, purchased 1 again, incremented to 461, sold 2 and it decreased to 459. So looking like a possible server caching issue, but just want to confirm the reload aspect as that should have resolved it for you like it did for me.

ghost commented 1 month ago

Yes, each time I use the stats reload, it does update to the correct value. It keeps resetting to the lower value when I logout though. I either have to reload or purchase each time I login to get the correct value.

uaktags commented 1 month ago

Very weird, yea relogging back into your account, you're back at 447 while the DB shows 459. interesting.