-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repaired Defense overrides all players after attack #131
Comments
And this fix resolved the problem ? Because I hace a similar bug. |
Hello @Bustux !! I had the same bug like you and i replace the fix that you've posted here. After this, i send an attack to see if everything was ok, but after the attack, the Battle Report didn't appear and the defenses of the attacked planet didn't change at all. Forgive my writting, my english is rusty. |
Hello, im working with @Jorch95 and we tested this fix, at first time with this code we have this error and the battle didn't happen
at second time we change the code for
and the battle went well but we have this error in the log
sorry for my troglodit english |
We tryed again and it's work.. idk the reason because the second error. |
@FedePuratich |
After a attack the repaired defenses of the attacked player overrides the defense of all players.
application\libraries\missions\attack.php Line 773-781
original :
parent::$db->query( "UPDATE
" . PLANETS . ",
" . SHIPS . ",
" . DEFENSES . "SET " . $fleetArray. "
planet_metal=
planet_metal- " . $steal['metal'] . ",
planet_crystal=
planet_crystal- " . $steal['crystal'] . ",
planet_deuterium=
planet_deuterium- " . $steal['deuterium'] . " WHERE
planet_id= '" . $target_planet['planet_id'] . "' AND
ship_planet_id= '" . $target_planet['planet_id'] . "'" );
fix :
parent::$db->query( "UPDATE
" . PLANETS . ",
" . SHIPS . ",
" . DEFENSES . "SET " . $fleetArray. "
planet_metal=
planet_metal- " . $steal['metal'] . ",
planet_crystal=
planet_crystal- " . $steal['crystal'] . ",
planet_deuterium=
planet_deuterium- " . $steal['deuterium'] . " WHERE
planet_id= '" . $target_planet['planet_id'] . "' AND
ship_planet_id= '" . $target_planet['planet_id'] . "' AND
defense_planet_id= '" . $target_planet['planet_id'] . "'" );
The text was updated successfully, but these errors were encountered: