-
Notifications
You must be signed in to change notification settings - Fork 163
Description
disclaimer, im not php/js/sql developer. (tho i can read php to some extent, im C developer)
| $q = "UPDATE " . TB_PREFIX . "units SET |
this never worked, and i tried to bruteforce it using a.i., and this seem to work:
$q = "INSERT INTO " . TB_PREFIX . "units (vref,
u".(($tribe-1)*10+1).",
u".(($tribe-1)*10+2).",
u".(($tribe-1)*10+3).",
u".(($tribe-1)*10+4).",
u".(($tribe-1)*10+5).",
u".(($tribe-1)*10+6).")
VALUES (
'".$wid."',
".rand(100, 2000).",
".rand(100, 2400).",
".rand(100, 1600).",
".rand(100, 1500).",
".rand(48, 1700).",
".rand(60, 1800).")";the following calls seem to be useless but also harmless, and addUnits() is defined to take two args, the second being implicitly null if not passed, which is the troops array.
i just commented these lines, but also the addTech() and addABTech() seem to be very useless, since if we are adding farms not an actual bots who will be able to train troops, we shouldnt need addTech() here, same reason goes for armoury/Blacksmith tech.
TravianZ/GameEngine/Admin/Mods/addUsers.php
Line 149 in 3e8a14b
| $database->addUnits($addUnitsWrefs); |
TravianZ/GameEngine/Admin/Mods/addUsers.php
Line 217 in 3e8a14b
| $database->addUnits($addUnitsWrefs); |