Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources count display bug? #2

Open
221V opened this issue Aug 14, 2019 · 6 comments
Open

Resources count display bug? #2

221V opened this issue Aug 14, 2019 · 6 comments

Comments

@221V
Copy link
Collaborator

221V commented Aug 14, 2019

There are some display bug --
when resources update, we reload page and get old count of resources!
after reload again -- resources count are ok, updated.

so bug is next -- in code we get old count of resources, update it, save to database,
but show at page old value, not new!

https://github.com/Shadowss/TravianZ/blob/master/GameEngine/Village.php#L47-L48
maybe this strings needs swap places ?

or just update here values (add some code at function ends)
https://github.com/Shadowss/TravianZ/blob/master/GameEngine/Village.php#L171

$this->awood = $nwood;
$this->aclay = $nclay;
$this->airon = $niron;
$this->acrop = $ncrop;

(i not configure own server yet, can not test it, so just think,, can you test that?)

@Shadowss
Copy link
Owner

I add you as collaborator , you can edit it

@221V
Copy link
Collaborator Author

221V commented Sep 14, 2019

hey!)

i look for code,
look at server a bit,
found a lot of bugs and some-scary-ux-moments

and i can fix many of that

are you interested in my fixes?
can i expect some money for pay coffee with cookies?

if twice "yes" -- better send fixes at github(open source), or at my private git server?

you can answer me in telegram --
@TTaraskin
https://t.me/TTaraskin

thank you!)

@AlfredoPagano
Copy link

AlfredoPagano commented Jan 7, 2020

Hi all,
the mentioned solutions doesnt works: seems that putting
call_user_func(get_class($database).'::clearVillageCache'); at line https://github.com/Shadowss/TravianZ/blob/master/GameEngine/Village.php#L171
the solution is working... im testing it locally.

The fix is working

Regards
Alfredo.

@221V
Copy link
Collaborator Author

221V commented Mar 15, 2020

Hi @AlfredoPagano !
thank you! checked and fixed :)

@221V
Copy link
Collaborator Author

221V commented Mar 15, 2020

Hi @Shadowss !

i am not sure i really want to refactoring this ugly php code... ;(
i think i can really more quickly implement this all in haskell with postgresql
so i will try it :)

so you can delete me from collaborators :)

i'd like to talk with you in telegram, if you can :)

thank you very much!

@221V
Copy link
Collaborator Author

221V commented Mar 29, 2020

found bugs:

when enabled setting "show admin in statistic/ranks",
we get all-time-in top admin ))
even he is in top only for 1st week and not plays for next weeks))
in other words -- admin's top-10 -of-week stats not resets to 0

traders does not goes three times when player offline
in other words -- i send x3 times traders and close tabs
(or not close tab, just php session became inactive instead) --
resources goes only for 1st time, no 2nd and 3rd times...

cereal not calculates in non-15-village when offline (like x3 times traders) --
so army can die ))

gdinit added a commit to gdinit/TravianZ that referenced this issue Mar 15, 2022
Thanks to AlfredoPagano for the fix!

See issue Shadowss#2, Resources count display bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants