TravianZ icon indicating copy to clipboard operation
TravianZ copied to clipboard

Resources count display bug?

Open 221V opened this issue 5 years ago • 6 comments

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?)

221V avatar Aug 14 '19 22:08 221V

I add you as collaborator , you can edit it

Shadowss avatar Aug 27 '19 08:08 Shadowss

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!)

221V avatar Sep 14 '19 22:09 221V

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.

AlfredoPagano avatar Jan 07 '20 21:01 AlfredoPagano

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

221V avatar Mar 15 '20 10:03 221V

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 avatar Mar 15 '20 10:03 221V

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 ))

221V avatar Mar 29 '20 22:03 221V