iopietro / Travianz-Legacy

Join our Discord Server: https://discordapp.com/invite/9fbJKP9 | New repo: https://github.com/iopietro/Travianz
GNU General Public License v3.0
160 stars 95 forks source link

Create Users not working with small map word 25x25 #549

Closed ghost closed 6 years ago

ghost commented 6 years ago

In the admin panel, the function Create Users should create tot players with village. It get stuck in an infinite loop due to dimension of the map.

The function does not consider small words and keeps searching the database for a village in coordinates like 80<X<25 and -25<Y<-80. That's because the values "$wide1, $wide2" are calculated without considering WORLD_MAX

There is the case where $wide1 = 80 and $wide2 = WORLD_MAX

Maybe it's enough to change the mode when invoking the function in 'GameEngine\Admin\Mods\addUsers.php' at line 138 from

$wid = $database->generateBase($kid,0,false);

to

$wid = $database->generateBase($kid,1,false);

iopietro commented 6 years ago

Fixed in 9efbe9f, let me know if you still can't create them.

velhbxtyrj commented 6 years ago

It works. Yesterday checked.