TravianZ
TravianZ copied to clipboard
Resources count display bug?
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?)
I add you as collaborator , you can edit it
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!)
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.
Hi @AlfredoPagano ! thank you! checked and fixed :)
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!
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 ))