Skip to content

solution to add farms with troops #122

@zmn28hgbn59kcmlpio8unfh7fdre523esd28q9a

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.

$database->addUnits($addUnitsWrefs);

$database->addUnits($addUnitsWrefs);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions